18

Recently I'm interested in doing research about nodejs, nosql (mostly mongodb, redis) and decide to make a simple blog using those modern techs (which university professors wont teach me about). Through this progress I think I can improve my own javascript skill and many things about network service development.

A simple blog is a good start to go, then I find out that nodejs on Github and other node-based web frameworks: express, locomotive, railway, etc... problem is they have too many forks.

Surely that I can work with some of them by my efforts, because the MVC logic seems the same to all. The point is that I want to focus on one framework which is the trend for next 1 year or more later. Express seems well, says railway, locomotive are based on Express, I'll be good if I follow Express at last, but then I found Meteor and Derby. Now it does mess me a lot about choices. People said that use proper tool for your own task, here now I'm having time to waste on some, but not all of them. I think I should clear up some of my thoughts by questioning:

  1. Is that meteor and derby are forks of nodejs?

  2. Should I choose meteor, derby or locomotive, railway or just simply start with express from the scratch to make my own MVC setup?

  3. Why do people use Redis for sessions along with Mongodb (or CouchDB)? Why dont we just use Mongodb for sessions and main data?

user456584
  • 86,427
  • 15
  • 75
  • 107
xgenvn
  • 193
  • 1
  • 1
  • 7
  • 1
    I've tried some of nodejs-express based web frameworks, but not yet meteor and derby. I'll give them a shot later. If you were me, what would you prefer to? I haven't used Rails before, so coding style is not really important to me. – xgenvn May 30 '12 at 06:56
  • I've used meteor and found it at first really cool, and then at last really annoyingly buggy and constrained. I plan to try derby next - its more setup at the start, but more flexible and clear as to how it works. – dsummersl May 30 '12 at 14:02
  • I'm trying out Derby, not really like its own template at first glance. I also setup a project for locomotive and I'm finding the way to config its server.js to deploy on nodester. – xgenvn May 31 '12 at 17:30

1 Answers1

8
  1. No
  2. I liked starting with Express because it gives you basic tools and you can build a project structure that works for you.
  3. Redis is super fast but there also is session middleware for mongodb and couchdb.
Pickels
  • 33,902
  • 26
  • 118
  • 178
  • The reason for the last question is, when I try a fork of node-express-boilerplate which provides activities stream, they use both of redis and mongodb. I dont know why they do that, and most of tutorials I've read, they also use redis session middleware. Maybe the key/value store schema as Redis is great for session store than using document object store like mongodb or couchdb. – xgenvn May 30 '12 at 06:44
  • 2
    You need speed for sessions, and Redis is a fast in-memory database. That's why everybody normally use Redis. – alessioalex May 30 '12 at 06:47
  • I've read meteor and derby docs for a while. Meteor is not a fork of nodejs, I dont really know what behind it until I have time to look at the install script and the source. Derby says can work with nodejs environment, through examples I saw that it's more than an advanced lib. It's really easy to mess up with another express-based web framework. – xgenvn May 30 '12 at 06:48
  • For a php/mysql *normal* user like me, this approach (using more than one database) seems awkward at first. – xgenvn May 30 '12 at 06:52
  • I didn't want to use redis at first because I was trying to keep my stack as simple as possible. But you can just install redis use some sane settings and start using it. You can also just use the mongodb middleware if you really don't want redis. – Pickels May 30 '12 at 10:24
  • Thank Pickels, I had Redis and Mongodb installed, I'll try using mongodb session middleware. I'll upvote your answer when I have enough reps. – xgenvn May 31 '12 at 17:33
  • Using Redis as session is much better than using session with MongoDB because Redis is 100% in-memory DB but MongoDB only stores recently accessed documents in memory. Therefore as data increases, using MongoDB session will be inefficient. – jwchang Aug 18 '12 at 04:05