Question about running multiple Python3 AsyncIO Components within a Single Guest

#1

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?

0 Likes

#2

Does no one have an answer on this?

···

On Friday, 31 March 2017 10:37:14 UTC+2, Adam Jorgensen wrote:

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?

0 Likes

#3

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

···

Am 09.04.2017 um 09:58 schrieb Adam Jorgensen:

Does no one have an answer on this?

On Friday, 31 March 2017 10:37:14 UTC+2, Adam Jorgensen wrote:

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?

0 Likes

#4

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

···

On Sun, Apr 9, 2017 at 5:56 AM Tobias Oberstein tobias.o...@gmail.com 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

Am 09.04.2017 um 09:58 schrieb Adam Jorgensen:

Does no one have an answer on this?

On Friday, 31 March 2017 10:37:14 UTC+2, Adam Jorgensen wrote:

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?

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.

0 Likes

#5

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?

···

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

0 Likes

#6

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

···

On Sun, Apr 9, 2017 at 1:36 PM Adam Jorgensen adam.jor...@gmail.com wrote:

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?

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/fe04ee07-d033-484f-a8b2-42eef61d1ac2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes