I guess what you’re referring to is that in the demos the logic is contained inside the onOpen handler. This is purely to make things more concise.
With a globally accessible session object, you can make WAMP calls, subscriptions, publishes and registers at any time in your code. All you need to make sure is that this is executed after session establishment or has error handling.
As for more complex examples: There are some for Crossbar.io (http://crossbar.io), a WAMP router. So far, AFAIK, none of them rely on more than basic WAMP functionality of the router, so you could adapt these for use with e.g. the basic router included in Autobahn|Python. (You could, of course, also just use Crossbar.io for your routing - it’s open source and new features are added all the time.)
Something simple there is the chat demo (https://github.com/crossbario/crossbardemo/blob/master/web/demo/chat/js/chat.js) (no guarantee for code quality - I wrote this when I was starting out in Web development myself).
Hope this helps!
2014-07-21 19:59 GMT+02:00 Joris Stork joris...@gmail.com:
If I understand Autobahn correctly, it provides an nice library across many languages to leverage things like WAMP and WebSockets to perform duplex near real time communication (messages and/or rpcs) between applications (including browsers) across networks.
This sounds great and I’d like to use it! I have an existing, rather complex Python application that occasionally (a few times per second) needs to send and receive data (small amounts of json) to/from another python application on another host.
As a scientific programmer with very minimal web programming experience (1 day’s experience with twisted and tornado), I would really like an example of how I can leverage autobahn to send and receive data from my existing application.
But all the examples on autobahn.ws have all their logic inside the functions/callbacks defined in the protocol, and I cannot find any examples of using Autobahn to do my kind of task: send my data every so often over a publish/subscribe pattern.
Am I completely missing the point or are these kinds of examples still in the making?
You received this message because you are subscribed to the Google Groups “Autobahn” group.
To unsubscribe from this group and stop receiving emails from it, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/650770e3-1380-438b-a59c-438cea8c9039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.