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
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
- Hello with backends for the following languages/WAMP client libraries
For a slightly more complex (and realistic) application:
- Votes - basic WAMP application using both PubSub and RPC, with a Web frontend. Comes with backends for
The following examples cover specific features of WAMP/Crossbar.io
- 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
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).
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).