deb-python-autobahn/examples/twisted/wamp
Tobias Oberstein ecfe1e8b9c new Api 2015-09-21 00:17:47 +02:00
..
app fix pep8 2015-09-05 12:30:52 +02:00
overview fix pep8 2015-09-05 12:05:02 +02:00
pubsub fix pep8 2015-09-05 12:30:52 +02:00
rpc fix more URI types in examples 2015-09-05 12:15:56 +02:00
Makefile working 2nd flav 2015-09-20 00:59:15 +02:00
README.md moved to crossbarexamples repo 2015-08-29 22:08:25 +02:00
test_newapi.py more new api example code 2015-09-17 20:31:37 +02:00
test_newapi2.py work on new API 2015-09-20 16:55:08 +02:00
test_newapi3.py new Api 2015-09-21 00:17:47 +02:00
test_newapi4.py working 2nd flav 2015-09-20 00:59:15 +02:00
test_newapi5.py new Api 2015-09-21 00:17:47 +02:00
test_newapi_multiple_connections.py more new api example code 2015-09-17 20:19:52 +02:00
test_newapi_short.py more new api example code 2015-09-17 20:50:27 +02:00

README.md

WAMP Programming Examples

There are several very-similar examples that each follow a similar form and demonstrate several different ways of using WAMP under Autobahn. Each of these examples usually includes:

  • backend.py: the logical "backend", in Python (registers procedures, publishes events)
  • frontend.py: the logical "frontend", in Python (calls endpoints, receives events)
  • frontend.js: similar version in JavaScript
  • backend.js: similar version in JavaScript
  • *.html: boilerplate to hold the .js

Note that any WAMP component can "do" all the roles (so a "backend" component can easily also call endpoints or listen for events) but we needed to separate things somehow. However, you can organize your components however you see fit.

For examples using RPC, you need to run the backend first, so that procedures are registered and available to call.

The Examples

Overview Examples

  • LoopingCall: shows an alternative way of publishing periodically

RPC Examples

  • Arguments: different types of argument-passing
  • Complex: complex return types
  • Decorators: register RPC methods using decorators
  • Errors: map custom error classes to WAMP URIs
  • Options: show some RegistrationOptions and CallOptions use
  • Progress: progressive results for long-running oprations
  • Slow Square: an RPC call that takes some time
  • Time Service: XXX delete?

PubSub Examples

  • Basic: publish to a topic once per second
  • Complex: demonstrates different payload arguments
  • Decorators: doing subscriptions with decorators
  • Options: use of PublishOptions and SubscribeOptions
  • Unsubscribe: listen to events for a limited time

App Examples

We still need to explain these. For starters, here's the list:

How to run

See Running the Examples