What is Nombo and why does it exist?

Nombo is a Node.js framework for building scalable realtime single-page apps.

Realtime systems are great, but they also introduce a number of difficult technical questions/problems such as; Nombo offers a robust solution to all of these problems among others.

From an architectural point of view, Nombo can run on multiple CPU cores out of the box. You just tell it how many load balancers, workers and session stores to use and it will automatically deploy and manage them.

Nombo is resilient - Worker crashes are transparent to users. Session data and server event listeners are maintained for each client even when the worker that they are connected to is rebooted. If you want to do a live update for your server-side code, you can just kill your workers and they will automatically be rebooted with fresh source code. The reboot process typically takes under 4 seconds on a basic machine.

Nombo offers the massive performance benefits of realtime, asynchronous communication with unlimited vertical scalability. Nombo's performance increases linearly with the number of CPU cores and amount of memory on your machine/instance - This buys you a lot of time to scale horizontally. You can expect to handle millions of concurrent users from a single (extra large) instance.

You can get on our mailing list here.

Sample client-side snippets

The following snippets would go in a .js file in your appname/scripts/ directory (for example in appname/scripts/index.js).

Embedding a stylesheet into the DOM dynamically. If this stylesheet (main.css) is pre-bundled by the server (see bundling tutorial), then this call is a no op, otherwise it will load it dynamically. File extensions for $n.grab calls are optional when grabbing scripts, libs, templates and stylesheets.

Requiring a script statically (as part of bundling process) to use in your current script. The path must be relative to the current script.
var dependency = require('./dependency');

Grabbing a template to use in your current script. If this template has been pre-bundled, this call will return the bundled template, otherwise it will be loaded dynamically. Note that you can get this template as a string by calling chatView.render(data) - The data argument is optional.
var chatView = $n.grab.app.template("chatbox");

Making sure all dynamically-loaded resources are available before using them. Using $n.ready(callback) is not compulsory if all your resources have been pre-bundled on the server-side. The callback in $n.ready(callback) is executed when all resources which were $n.grab'd before it are loaded into the DOM and are available to use. $n.ready() is like a RequireJS define() wrapper except that you don't have to specify dependencies explicitly - You can have a main $n.ready() call in every file if you want to be safe. You can even have nested $n.ready() calls if it comes to that.
var chatView = $n.grab.app.template("chatbox");
var chatListView = $n.grab.app.template("chatlist");

$n.ready(function () {
    console.log('styles.css, chatbox.html and chatlist.html have been loaded into the DOM.');

Calling the method of a SIM module (a SIM module is a special Node.js module located on your server which handles IO requests from client-side code). In this case, the addMessage method of the chat.node.js sim module will be called and will be passed messageData as its data argument.
var handlerFunction = function (err, data) {
    console.log('Response from chat.addMessage is:', data);

var messageData = {
    user: nameBox.val(),
    message: sendBox.val()

$n.local.exec('chat', 'addMessage', messageData, handlerFunction);