Unified Application Messaging.
Crossbar.io is an open-source server platform which enables unified real-time communication between application components and devices in IoT, mobile and Web applications.




Features

Connections at scale

A single Crossbar.io instance can handle 100s of thousands of concurrent connections, and 10s of thousands of messages per second. A multi-router scale-out architecture is under development.

Authentication & Authorization

Crossbario offers integrated authentication and fine-grained, role-based authorization. For more flexibility you can add custom authenticators or authorizers, giving you full control and enabling integration with your existing systems.

REST bridging

Using the REST bridge services, applications can integrate REST services. Call a REST procedure or publish to a REST endpoint from WAMP. Call a WAMP procedure or publish from REST. Benefit from WAMP without discarding existing code.

Component hosting

Run and monitor application components from Crossbar.io, using any runtime available on your system. Spining up your entire application backend can be as simple as 'crossbar start'.

Open Source

Crossbar.io is open source (AGPL v3). You're free to experiment, test and modify as you want - contributions to the project are welcome. For production deployments, there is commercial support by Crossbar.io's core developers.

Open Ecosystem

WAMP, the protocol that Crossbar.io uses, is an open protocol, with 17 client and 9 router implementations. Crossbar.io is written by the main creators of WAMP, and is the most feature-rich and performant WAMP router.

Call into the browser

Components running in the browser are equal to other components. You can register procedures and call them from anywhere. Run code in the browser or in Node.js as best fits the situation.

Show me some code!

Here is what application components look like in some languages supported by Crossbar.io

// 1) SUBSCRIBE to a topic to receive events
function onhello(args) {
   console.log("Got event:", args[0]);
}
session.subscribe('com.myapp.hello', onhello);

// 2) PUBLISH an event
session.publish('com.myapp.hello', ['Hello, world!']);

// 3) REGISTER a procedure for remote calling
function add2(args) {
   return args[0] + args[1];
}
session.register('com.myapp.add2', add2);

// 4) CALL a remote procedure
session.call('com.myapp.add2', [2, 3]).then(
   function (result) {
      console.log("Got result:", result);
   }
);
# 1) SUBSCRIBE to a topic to receive events
def onhello(msg):
   print("Got event: {}".format(msg))
session.subscribe(onhello, 'com.myapp.hello')

# 2) PUBLISH an event
session.publish('com.myapp.hello', 'Hello, world!')

# 3) REGISTER a procedure for remote calling
def add2(x, y):
   return x + y
session.register(add2, 'com.myapp.add2');

# 4) CALL a remote procedure
result = yield from session.call('com.myapp.add2', 2, 3)
print("Got result: {}".format(result))
// 1) SUBSCRIBE to a topic to receive events
void onhello(const anyvec& args, const anymap& kwargs) {
   cout << "Got event: " << any_cast<string>(args[0]) << endl;   
}
session.subscribe("com.myapp.hello", &onhello);

// 2) PUBLISH an event
session.publish("com.myapp.hello", {string("Hello, world!")});

// 3) REGISTER a procedure for remote calling
any add2(const anyvec& args, const anymap& kwargs) {
   return any_cast<uint64_t>(args[0]) + any_cast<uint64_t>(args[1]);
}
session.provide("com.myapp.add2", &add2);

// 4) CALL a remote procedure
session.call("com.mathservice.add2", {2, 3}).then(
   [&](future<any> f) {
      cout << "Got result: " << any_cast<uint64_t> (f.get()) << endl;
   }
);
<?php
// 1) SUBSCRIBE to a topic to receive events
$onHello = function ($args) {
   echo "Got event: {$args[0]}\n";
};
$session->subscribe('com.myapp.hello', $onHello);

// 2) PUBLISH an event
$session->publish('com.example.oncounter', array('Hello, world!'));

// 3) REGISTER a procedure for remote calling
$add2 = function ($args) {
   return $args[0] + $args[1];
};
$session->register('com.myapp.add2', $add2);

// 4) CALL a remote procedure
$session->call('com.myapp.add2', array(2, 3))->then(
   function ($res) {
      echo "Got result: {$res}\n";
   }
);
/?>

Live Demos

Crossbar.io is great for building advanced, distributed applications for Mobile, Web and Internet-of-Things (IoT). To give you a taste, here are a couple of live demos.