I am trying to document information and modules I have selected... See also NodeJS Sync, NodeJS Modules

Why

Why Not

Why or Why not?

So seriously... I agree with all the issues of NodeJS, and don't use it for most projects. The one reason I am interested is low CPU cost - both for low powered CPU and Environmental reasons. It is not about thread performance.

This is a good review - http://nodeguide.com/convincing_the_boss.html

Stuff to choose

Frameworks

  • Express & Connect

Authentication

  • TODO: Notes on integrating authentication across domains
    • e.g. http://auth.yourdomain.com/ sets the cookie for yourdomain.com
    • and puts it in redis with user information
    • That can then be used in a nodejs system on another server
  • Basic database & editor
    • A basic user/password with register and profile editor
  • Advanced integration
    • Using everyauth, connect-auth, mongoose-auth modules

Database

Which one - check this out - http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis

General modules

  • XXX

Gotcha

Files

  • Use pause/resume on reading binary data files to send over a slow link - reduces memory

Sync

See NodeJS Sync

Applications

Other things

Production

Virtual hosts

Express Examples has a good worked example of a vhost server. Now lets say I want to make calipso a vhost, and my mobile site another. I should be able to just write:

var calipsoApp = calipso.createServer();
var mobileApp = mymobile.createServer();
var app = express.createServer();
app.use(express.vhost('www.*', calipsoApp))
app.use(express.vhost('m.*', mobileApp));
app.listen(80);

But it seems that most people do not write their app.js in a that method. Express should probably have a standard to do so.

From Perl

So... coming from Perl, how is all this stuff similar.

  • Node JS is event driven. Kind of like POE
  • "npm" is like CPAN, but easier to install locally, and to freeze modules
  • Reuse - node community is all about using modules, just like Perl and CPAN
  • Objects aka Hash - Perl uses lots of complex data, arrays with hash and deep
  • Web developers - you write lots of JS anyway
  • Leverage existing code by spawning helpers - e.g. Perl code.