Crossbar.io Examples
Clone or download
Latest commit 89b54c5 Oct 18, 2018
Permalink
Failed to load latest commit information.
_shared-web-resources/autobahn sync Oct 18, 2018
authentication Correct `authorized-keys` to `authorized_keys` in example Sep 21, 2017
authorization/dynamic Missing a required parameter - options Sep 3, 2018
benchmark sync May 24, 2018
containers/failures sync Sep 6, 2017
database replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
demos cosmetic changes Sep 25, 2018
disclose sync Mar 30, 2017
django/realtimemonitor revert db changes Jul 1, 2017
docker/disclose sync May 3, 2017
encryption sync Oct 18, 2018
event-history sync Oct 18, 2018
exclude_subscribers sync Mar 30, 2017
expressjs replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
fileupload upgrade node configs to v2 Apr 7, 2016
flash replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
getting-started Corrected topic names Sep 25, 2018
hello Update nodejs example to use the new syntax Sep 30, 2018
iotcookbook sync Apr 25, 2017
kivy replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
launchpad replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
longpoll replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
longpoll_curl upgrade node configs to v2 Apr 7, 2016
metaapi sync Oct 20, 2017
mqtt polish May 3, 2017
nodeinfo add new 'nodeinfo' web resource example Mar 31, 2017
patternregs fixes Mar 30, 2017
patternsubs fixes Mar 30, 2017
payloadcodec added cbor2 based payload codec example May 4, 2017
prompt replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
pubsub sync Apr 16, 2017
reactjs replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
rest fixes broken link Oct 11, 2018
scaleout/mandelbrot sync Apr 20, 2015
scaling-microservices fixes Mar 30, 2017
serializers sync Apr 5, 2017
sharedregs fixes Mar 30, 2017
templates replace all refs to autobahn.s3.amazonaws.com with local ref Mar 30, 2017
unitransport bring up to date Jun 29, 2017
userconfig/python upgrade node configs to v2 Apr 7, 2016
wolke add 3rd variant Aug 29, 2015
work turn down log noise Apr 3, 2017
wsgi wip Apr 16, 2017
wsrproxy sync Nov 27, 2017
wss/python turn down log noise Apr 3, 2017
.gitignore ignore keys Apr 17, 2016
LICENSE Initial commit Dec 15, 2014
Makefile upgrade node configs to v2 Apr 7, 2016
README.md fix url for votes Jun 3, 2015
cleanme.json moved from Crossbar.io repo (templates) Dec 15, 2014

README.md

Crossbar.io Examples

This repository contains example code and applications for Crossbar.io.

Using the examples

The examples are self-contained and ready to run. Each of the example directories contains an Crossbar.io configuration. In order to run the example, just got to its directory and do crossbar start.

Overview of Examples

This overview may not be complete - so check the repository listing if you're looking for something not listed here.

To give you a better idea of a small working WAMP application there is

For a slightly more complex (and realistic) application:

The following examples cover specific features of WAMP/Crossbar.io

  • Authentication
  • Flash Fallback - How to use Flash fallback for older browsers without WebSocket support (mainly there for IE<10)
  • Longpoll - How to use the Longpoll fallback for older browsers without WebSocket support
  • Metaapi - How to subscribe to meta-events and use meta-procedures (get information about sessions, subscriptions and registrations)
  • HTTP Push Service: How to create WAMP publishes via a HTTP/POST
  • Secure WebSockets (WSS)

And finally, there are examples using specific devices or technologies:

Adapting for other languages

Most of the examples are for Python and JavaScript, even though often what is shown would work with other languages and WAMP client libraries. This is purely due to lack of resources. We want you to use Crossbar.io with whatever language or languages you want.

Anybody is very welcome to adapt example code for other languages.

Similarly, you're welcome to add examples that you think provide value to other users.

To do either, just send us a pull request.

Keeping things up to date

As you'll probably notice sooner or later, Crossbar.io is a work in progress. Core functionality is stable, but there is a lot of development going on around it. We try to keep these examples working. If you find that something is broken, then please file an issue (or fix it and send us a pull request).

Additional Examples

For historic reasons, the Autobahn|Python repository also contains some examples for using WAMP. The most relevant to the general Crossbar.io user can be found in this directory. These are almost always for both Python and JavaScript (using Autobahn|JS).

Some of the instructions here still assume a basic router in Autobahn|Python which has since been removed, but in principle they should run with Crossbar.io. The chance of running across an outdated example here are higher, however. Should you find such an example, please file an issue (or fix it and send us a pull request).