node.js + nosql
DESCRIPTION
A talk on NodeJS + NoSQL at NoSQLNow2011 in San Jose, CA.TRANSCRIPT
NodeJS + NoSQL
Shamod Lacoul
NoSQLNow 2011
whoami
CEO of Netoprise - we make social B2B Collaboration platform
NodeJS fan
Java coder
BPM integration consultant
Co-organizer of Silicon Valley Semantic Technology meetup
NodeJS: Server-side Javascript
Evented I/O framework
on top of
V8 javascript by Google
Node code
var http = require('http');
http.createServer(function (req, res) { res.sendHeader(200, {'Content-Type': 'text/plain'}); res.sendBody('Hello World!'); res.finish(); }).listen(8000);
console.log('Listening on port 8000');
MVC in NodeJS
ExpressJS - Sinatra-like (in Ruby on Rails) web framework
Jade - html template
Useful NodeJS Development Packages
Node Package Manager (npm) - package installer
Nodemon - auto-detection node watcher
Node-inspector - browser-based debugger
Vows.js - Behavior-Driven Development (BDD)
More useful packages
Backbone.js - provides models, collections and views to Javascript
Underscore.js - utility library to add functional programming to Javascript: "a tie to JQuery's tux"
Socket.io - a package to help make realtime apps
Coffeescript - a little language that compiles into JavaScript
Find more at http://search.npmjs.org/
Benefits of NodeJS
Extremely fast
Event-driven
2 years old and already a huge community
Javascript all the way down
Pitfalls of Node
Boomerang-shaped code (solution: Step or Flow.js)
Javascript thinking-curve
Demo
https://github.com/shamod/nosqlnow2011demo
NoSQL
* Document Database
* Key-Value Database
* Columnar Database
* Graph Database
Document DB - CouchDB/MongoDB
Key-Value Store - Riak/Redis
Column Store - Cassandra
Graph DB - Neo4J
Cradle = CouchDB + NodeJS
http://cloudhead.io/cradle
Mongoose = MongoDB + NodeJS
http://mongoosejs.com/
Riak.js = Riak + NodeJS
http://riakjs.org/
node_redis = Redis + NodeJS
https://github.com/mranney/node_redis
node-cassandra-client = Cassandra + NodeJS
https://github.com/racker/node-cassandra-client
node-neo4j = Neo4J + NodeJS
https://github.com/bobby/node-neo4j
Questions?
Thank you for listening!