Question about running multiple Python3 AsyncIO Components within a Single Guest

31 views
Skip to first unread message

Adam Jorgensen

unread,
Mar 31, 2017, 4:37:14 AM3/31/17
to Crossbar
I have a quick question for you all.

Is there a standard way of starting and running multiple AsyncIO Components within a Guest process started by the Crossbar process manager?

AutobahnPython provides the ApplicationRunner class as a quick and dirty way to run a single component but for my production Crossbar deployment I would
like to avoid having a zillion Guest items in the Worker configuration. What is the accepted way of doing this?

Adam Jorgensen

unread,
Apr 9, 2017, 3:58:14 AM4/9/17
to Crossbar
Does no one have an answer on this?

Tobias Oberstein

unread,
Apr 9, 2017, 5:56:15 AM4/9/17
to cross...@googlegroups.com
Hi,

unfortunately, there isn't a nice way of doing this with asyncio based
Python components currently.

Container workers can do that, but that only works with Twisted based
components.

It'll be possible with the "new API" within AutobahnPython meejah is
working on. The new API thing will supersede the ApplicationRunner.

If you are interested in how the progresses / have questions, best is to
ping meejah on IRC.

Cheers,
/Tobias

David Ford

unread,
Apr 9, 2017, 12:52:18 PM4/9/17
to cross...@googlegroups.com
sort of tangent, Tobias, but is the new API going to handle auto reconnecting? i'd love to do away with my ApplicationRunner replacement although i use it for another reason besides auto reconnection, i ensure all my scheduled pubs/rpcs are finished before i close down the session

--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/e2f8f24d-62da-77b8-2efd-d6ddc6af37dd%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Adam Jorgensen

unread,
Apr 9, 2017, 1:36:08 PM4/9/17
to Crossbar
On Sunday, 9 April 2017 11:56:15 UTC+2, Tobias Oberstein wrote:
Hi,

unfortunately, there isn't a nice way of doing this with asyncio based
Python components currently.

Container workers can do that, but that only works with Twisted based
components.

It'll be possible with the "new API" within AutobahnPython meejah is
working on. The new API thing will supersede the ApplicationRunner.

If you are interested in how the progresses / have questions, best is to
ping meejah on IRC.

Cheers,
/Tobias


That's a little disappointing. Running a single AsyncIO component in a full-blown Python process  
seems to rather go against the idea behind asyncio :-/

Is there no way to get around that without waiting for this new Autobahn Python API? Could one write a custom replacement for
ApplicationRunner that does what is desired?

David Ford

unread,
Apr 10, 2017, 3:19:09 PM4/10/17
to Crossbar
@Adam, i think the complexity involved in re-wrapping and isolating the twisted paths already established via crossbar for the guest, would be prohibitively expensive for the programmer. i tried it and it wasn't pretty. i simply ended up writing stand alone clients that were pure asyncio.

--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages