Crossbar.io is a networking platform for distributed and microservice applications, implementing the open Web Application Messaging Protocol (WAMP). It is feature rich, scalable, robust and secure. Let Crossbar.io take care of the hard parts of messaging so you can focus on your app's features.

Networking for Microservices

Distributed apps and microservices are a challenge, whether they are across different devices, networks, programming languages - or all of the above.

Part of that challenge is having seamless, scalable and secure communication between the distributed parts.

Crossbar.io is an open source application networking platform that solves the recurring communication challenges.

It implements the open Web Application Messaging Protocol (WAMP). This offers both Publish and Subscribe (PubSub) and routed Remote Procedure Calls (rRPC). There are currently open-source WAMP client libraries for 12 languages.

You can easily create powerful applications from loosely coupled components and microservices. All components talk to each other in real-time and as equal peers, across devices, networks and programming languages.

Crossbar.io takes care of the communications plumbing for your applications, so that you can concentrate on solving new problems.


Powering the Internet-of-Things

Crossbar.io is powering Internet-of-things applications. Here is an illustration of how Crossbar.io connects devices, systems and people:

Steps

  • 00. Clients connect to Crossbar.io
  • 01. Clients subscribe to "temperature"
  • 02. Fan registers "start/stop fan"
  • 03. Motor temperature rises.
  • 04. Sensor publishes "temperature"
  • 05. "temperature" event dispatched
  • 06. Backend calls "start/stop fan"
  • 07. "start/stop fan" invoked
  • 08. Motor temperature falls.
  • 09. Sensor publishes "temperature"
  • 10. "temperature" event dispatched
  • 11. Backend calls "start/stop fan"
  • 12. "start/stop fan" invoked

How it works

Features

timeline
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.

fingerprint
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.

sync
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.

cloud_queue
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'.

share
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.

people
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.

devices_other
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.

Real-time Messaging

The cursors in the areas below are synchronized via a Crossbar.io instance running in the cloud:

Crossbar.io icon
Crossbar.io icon
Status: not connected.

Show me some code!

There are client libraries for 12 languages. Here is what application components look like in some languages.

// 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 distributed, real-time enabled applications for Mobile, Web and Internet-of-Things. To give you a taste, here are a couple of live demos: