"Please don't tell me it is wrong because it's unconventional or that I don't need this flexibility. I want to just focus on the business and the product"
"Please don't tell me it is wrong because it's unconventional or that I don't need this flexibility. I want to just focus on the business and the product"
I haven't vetted redis in the same way, so maybe it isn't quite stable enough.Do you think so? Maybe I should look at using memcached instead? (update: looks like redis is being used in production.)
Instead of doing a node.js based web framework and caching, concievably I could use HAProxy, NINGX or Squid as the caching front end. They'll listen to etags, right? And I could use another web framework, maybe something off the shelf... so long as I can pull script code from the database and execute it, I can replicate the CouchApp deployment style.
Node.js is new, and I am most wary of it because it involves the most customization. I may punt and get powerDNS installed and hooked up to a couchDB backend. I may put in a little python based RESTful server to do some of this, or to completely replace node.js if it proves problematic. I think I can load python code from the couch and execute it.
It is the really simple things like form parsing and cookies/sessions that may not be fully fleshed out in Node.js. Not that it won't be soon, but it is a nightmare to spend time on low level issues when you don't have to. This has always been the issue trying new languages and frameworks for projects. I get part of the way there and realize that some basic aspect of web development hasn't been done. Sometimes I start to handle the issues, but if the project is something I want to finish, it usually ends up with me turning back to Python. This might be a bad reflection on myself, but when you want to get something done that doesn't need the latest/greatest tech, it is nothing but frustrating to hit your head against a wall doing basics.
Just my two cents!
I was trying to get out a huge concept in my head, and probably wasn't very clear. The real "web development" will be happening in CouchApp. I'm just putting node.js in front to provide a couple services, each of which I expect to be very small.
I'm expecting to write well less than 100 lines of node.js code to interface in front of CouchApp. Basically, it will just provide a quick lookup into the routes, and switch between two CouchApp handlers for certain pages depending on if the user is authenticated (Eg: if you look at profile of user Y, it woudl be good to know if you're logged in as user Y and thus can edit the profile, or are some other user, and thus see only the public info for user Y.) Also, to pull results from a couple lists or shows and compose them into a single page, which has to be done outside of CouchApp... but really isn't very complicated.
The caching bit will simply be checking to see if the etag for a page in couchapp is in redis, if it is, update its TTL to keep it fresh and send it to the user, if it isn't then get the full/new page from CouchApp, push it into redis and send it along. This will be problematic if the APIs for redis and couchapp are sychronous in their node.js drivers. Will have to check on that.
Anyway, like I said, I'd be interested in hearing of a good replacement for node.js.
Just need something I can write a simple caching, routing code in... have looked at webmachine a bit, and it might be better... not sure I can pull erlang out of the couch an run it, though.
Twisted may also be a possibility.
Then add technology as necessary. I bet you'd be surprised what you could accomplish with couchdb, or node/express+a DB alone.
I'm wet behind the ears with web development (just started late last year), but look forward to seeing how you and your team makes out.
Also, looks like redis has some nice features, but memcached is what I really want. Want that built in LRU for expiring objects from the cache.