Example of real world use?

#1

Hi!

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!

Alex

···

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?

Regards

Joris

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.

0 Likes

#2

As a modestly experienced python programmer and having spent a little more than a day on the docs and examples, I would like to give some early feedback:

  • the idea of autobahn is fantastic

  • there’s obviously quality thinking and lots of energy going into development and support, which is a big draw

  • the API, doc and coding conventions (in python at least) are very difficult to navigate – this seems to be at least partly inherited from Twisted. Python inspires me to write elegant code, but the little bit of autobahn/twisted I’ve tried blows my style to smithereens!

···

On Monday, July 21, 2014 10:09:38 PM UTC+2, Alexander Gödde wrote:

Hi!

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!

Alex

2014-07-21 19:59 GMT+02:00 Joris Stork jori...@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?

Regards

Joris

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 auto...@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.

0 Likes

#3

As a modestly experienced python programmer and having spent a little
more than a day on the docs and examples, I would like to give some
early feedback:

- the idea of autobahn is fantastic
- there's obviously quality thinking and lots of energy going into
development and support, which is a big draw
- the API, doc and coding conventions (in python at least) are very
difficult to navigate -- this seems to be at least partly inherited from

Absolutely. The docs definitely could be better.

Twisted. Python inspires me to write elegant code, but the little bit of
autobahn/twisted I've tried blows my style to smithereens!

Mmh. Could you elaborate? E.g. with this code

https://github.com/tavendo/AutobahnPython#show-me-some-code

What is hard to understand or "non-elegant"?

···

Am 22.07.2014 11:10, schrieb Joris:

On Monday, July 21, 2014 10:09:38 PM UTC+2, Alexander Gödde wrote:

    Hi!

    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
    <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!

    Alex

    2014-07-21 19:59 GMT+02:00 Joris Stork <jori...@gmail.com
    <javascript:>>:

        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 <http://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?

        Regards

        Joris

        --
        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 autobah...@googlegroups.com <javascript:>.
        To post to this group, send email to auto...@googlegroups.com
        <javascript:>.
        To view this discussion on the web visit
        https://groups.google.com/d/msgid/autobahnws/650770e3-1380-438b-a59c-438cea8c9039%40googlegroups.com
        <https://groups.google.com/d/msgid/autobahnws/650770e3-1380-438b-a59c-438cea8c9039%40googlegroups.com?utm_medium=email&utm_source=footer>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

--
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
<mailto:autobahnws+...@googlegroups.com>.
To post to this group, send email to autob...@googlegroups.com
<mailto:autob...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/autobahnws/815a5c42-340b-4bac-a521-157bca762ecd%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/815a5c42-340b-4bac-a521-157bca762ecd%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes