← Back to team overview

launchpad-dev team mailing list archive

Re: A draft microservice for gpg verification

 

Le 10/07/2011 22:35, Robert Collins a écrit :
> On Mon, Jul 11, 2011 at 4:24 AM, Jonathan Lange <jml@xxxxxxxxx> wrote:
>> On Wed, Jul 6, 2011 at 3:08 AM, Martin Pool <mbp@xxxxxxxxxxxxx> wrote:
>> ...
>>>  * configuration of the address of service endpoints
>>>  * mapping errors into something clean, so application code doesn't
>>> have to deal with socket.error (which is fairly cryptic in Python)
>>>
>>> A lot of this is somewhat deployment specific and I don't think any
>>> standard protocol client handles it.
>>
>> These two come for free with Twisted.
> 
> However running twisted in a zope application server stack is at best
> complex and not well understood.
> 
> .... which is why I want N clients for each microservice: a client
> thats zope friendly, a client thats twisted friendly, a client thats
> go friendly etc.
> 
> Possibly even a client that is plain old python friendly for doing up
> nagios checks and the like.

Not arguing with those last points, I just wanted to point out that
using Twisted with a Zope server is not that hard. There are 2 cases:
 * You're already using Twisted as WSGI container. In which case, you
are already running Twisted, so it's "just" a matter of being careful
when you're making from from threads. blockingCallFromThread is really
useful for that.
 * You're using another container. In this case, you can use a dedicated
thread for running Twisted. There are a couple of pitfalls (not install
the signal handlers, thus not starting processes with Twisted), but
otherwise it works fine. blockingCallFromThread still works as a bonus.

I'd be happy to help if it's not clear.

-- 
Thomas


Follow ups

References