Example of real world use?

#1

Have a look at this:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/crochet/README.md

Crochet allows you to use Twisted libraries like Autobahn from plain Python (blocking, synchronous, threaded)

What libs / kind of Python programs do you use /do?

···

Sent from Mobile (Google Nexus 5)

Am 21.07.2014 19:59 schrieb “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

Thank you for your tips, Alexander and Tobias. I will first try to use the globally accessible session object (to avoid resorting to an extra library), and if that doesn’t work out I’ll try the Crotchet approach. If the latter happens I might ask whether there is an equivalent approach based on asyncio! But hopefully the global-session-object is workable.

To answer your question Tobias: I build computer vision software and still use python 2.7 (pending the release of OpenCV 3.0). Numpy is my bread and butter. I’m interested in web sockets and wamp because of the browser support which might come in handy later, and also because of the libraries on eg iOS. Otherwise I would have just gone the sockets route.

regards - joris

···

On Monday, July 21, 2014 10:18:29 PM UTC+2, Tobias Oberstein wrote:

Have a look at this:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/crochet/README.md

Crochet allows you to use Twisted libraries like Autobahn from plain Python (blocking, synchronous, threaded)

What libs / kind of Python programs do you use /do?

Sent from Mobile (Google Nexus 5)

Am 21.07.2014 19:59 schrieb “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

Ah I see also that you basically answered my question here:

http://stackoverflow.com/questions/22549370/how-to-send-autobahn-twisted-wamp-message-from-outside-of-protocol

···

On Tuesday, July 22, 2014 10:41:30 AM UTC+2, Joris wrote:

Thank you for your tips, Alexander and Tobias. I will first try to use the globally accessible session object (to avoid resorting to an extra library), and if that doesn’t work out I’ll try the Crotchet approach. If the latter happens I might ask whether there is an equivalent approach based on asyncio! But hopefully the global-session-object is workable.

To answer your question Tobias: I build computer vision software and still use python 2.7 (pending the release of OpenCV 3.0). Numpy is my bread and butter. I’m interested in web sockets and wamp because of the browser support which might come in handy later, and also because of the libraries on eg iOS. Otherwise I would have just gone the sockets route.

regards - joris

On Monday, July 21, 2014 10:18:29 PM UTC+2, Tobias Oberstein wrote:

Have a look at this:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/crochet/README.md

Crochet allows you to use Twisted libraries like Autobahn from plain Python (blocking, synchronous, threaded)

What libs / kind of Python programs do you use /do?

Sent from Mobile (Google Nexus 5)

Am 21.07.2014 19:59 schrieb “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

#4

Thank you for your tips, Alexander and Tobias. I will first try to use
the globally accessible session object (to avoid resorting to an extra

Yes, that is the most comfortable way. Note that this will only work if _all_ your code is non-blocking.

library), and if that doesn't work out I'll try the Crotchet approach.

This option is useful if your app is blocking code, and you don't want to rewrite that to non-blocking.

If the latter happens I might ask whether there is an equivalent
approach based on asyncio! But hopefully the global-session-object is
workable.

Session object somewhere on your app object: sure.

Crochet for asyncio: not that I know of ..

To answer your question Tobias: I build computer vision software and
still use python 2.7 (pending the release of OpenCV 3.0). Numpy is my
bread and butter. I'm interested in web sockets and wamp because of the

So you are actually implementing computer vision algos in Numpy? Cool.

browser support which might come in handy later, and also because of the
libraries on eg iOS. Otherwise I would have just gone the sockets route.

Ah, I see. Yep, using WebSocket and WAMP you could hook up HTML5, WebGL or native iOS clients using the same protocol and comms.

···

Am 22.07.2014 10:41, schrieb Joris:

regards - joris

On Monday, July 21, 2014 10:18:29 PM UTC+2, Tobias Oberstein wrote:

    Have a look at this:
    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/crochet/README.md
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/crochet/README.md>

    Crochet allows you to use Twisted libraries like Autobahn from plain
    Python (blocking, synchronous, threaded)

    What libs / kind of Python programs do you use /do?

    Sent from Mobile (Google Nexus 5)

    Am 21.07.2014 19:59 schrieb "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/b6e06301-5329-496c-9315-3cfcf9229deb%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/b6e06301-5329-496c-9315-3cfcf9229deb%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes