Home
Download
Tutorials
Reference
Examples
FAQs

Nombo is deprecated

After 2 years, Nombo hasn't gotten the traction it needs to sustain itself as an open source project. Because of this, I have decided to stop supporting it. This will allow me to focus my efforts on SocketCluster: https://github.com/topcloud/socketcluster (a realtime server framework derived from Nombo)

There are a number of factors which lead to this decision. One of the main ones is that developers do not like to invest their time in learning a framework unless they trust the people/community behind it.

Another reason why I think it didn't work out is that developers do not like big, powerful frameworks - Developers are opinionated and like to create their own development stack. They do not want to be locked into big opinionated workflows. The developers of today like to build systems that are made up of many small independent components - The days of fully integrated development solutions such as Flash and Visual Basic are gone. Now it's all about mixing and matching different technologies to get very specific results.

I apologize for the inconvenience. If you have any questions, my email is on GitHub ( https://github.com/jondubois ).

- Jon Dubois



Nombo is a full-stack (client and server) framework. It is designed to be lightweight on the client-side and can work with any client-side framework of your choice. (Check out our AngularJS sample app when you install Nombo).

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 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.
$n.grab.app.style('main');

Requiring a script dependency 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');
console.log(dependency.foo());

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.
$n.grab.app.style('styles.css');
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 which runs on your server and can be called from your 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);