Documentation > Examples
Working code is the best documentation
Working code is in itself proof that what you see is not outdated, doesn't have any typos, or suffers from any other problems that written documentation may have.
We provide code examples for various features of Crossbar.io in the examples repository. It's always a good idea to check this when you run into any problems
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 - see the actual repository 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 compley (and realistic) application:
- Votes - basic WAMP application using both PubSub and RPC, with a Web frontend. Comes with backends for
There are examples covering specific features of WAMP/Crossbar.io, e.g.
- 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)
- Secure WebSocket (WSS)
- REST bridging (integrate your WAMP application with REST mechanisms)
- WAMP meta-api
There are examples using specific technologies:
And, finally, there are more demos in the vein of the votes app. These range from really old code (written for a precursor version of Crossbar.io - so beware not to take this as examples!) to newer stuff, illustrating some of the things you can do with Crossbar.io.
Adapting for other languages¶
Anybody is highly welcome to adapt example code for other languages.
Similarly, you're welcome to add examples that you think provide value to other users.
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. Chances to happen across an outdated example are higher here, however. Should you find such an example, then please file an issue (or fix it and send us a pull request).