ginkgo icon indicating copy to clipboard operation
ginkgo copied to clipboard

Make ginkgo support Twisted programs

Open objcode opened this issue 13 years ago • 3 comments

Looking at this, I see two paths:

  1. Make gservice.core.Service polymorphic on Setting('twisted'). This is in the realm of possible, but will lead to some very weird initialization code or even weirder code in the body.
  2. Make gservice.core.TwistedService exist, move all the gevent-specific logic out of gservice.core.Service and into gservice.core.GeventService. This is significantly less optimal because it will make a mess of the class hierarchy.

I'll take a look at going down option 1 later this week in a branch and see if clean code can be made.

Sean

objcode avatar Sep 29 '11 09:09 objcode

Maybe to start we don't modify core at all. Twisted has it's own version of Service that runner should be able to just take from the config file.

progrium avatar Sep 29 '11 15:09 progrium

With the coming of Context, Twisted services will need to run within these Context services to take advantage of configuration and named services. This also means Twisted will need to run with gevent. Perhaps we can do this without cluttering our class hierarchy by making an explicit TwistedContext that will start Twisted in a separate thread and start the Twisted Application there. This means regular Context won't automatically be able to load Twisted apps, but we can put special case code in the runner as opposed to anything in core or context.

progrium avatar Dec 01 '11 01:12 progrium

Since 0.5.0, this is potentially possible (at least in theory) through AsyncManagers. It has not been researched yet.

progrium avatar Apr 02 '12 23:04 progrium