[Twisted-web] Ampoule vs PerspectiveBroker

Jacek Furmankiewicz jacek99 at gmail.com
Thu Oct 13 13:12:30 EDT 2011

OK, I will look at Ampoule and deferToAMPProcess while looking into the
CorePost multicore support.

Thanks Glyph,

On Thu, Oct 13, 2011 at 1:01 PM, Glyph <glyph at twistedmatrix.com> wrote:

> On Oct 13, 2011, at 11:41 AM, Jacek Furmankiewicz wrote:
> > Which is the recommended way for interprocess communication these days?
> >
> > Is it the existing PerspectiveBroker or Ampoule (which uses AMP as the
> underlying RPC protocol)?
> > Are there drawbacks/benefits to either of them?
> Somebody should probably write an AMP vs. PB wiki page or something, this
> does come up every so often.
> Briefly: PB's strength is that it allows you to serialize and synchronize
> large, complex object graphs with relatively little effort, but more safely
> and explicitly than (for example) Pickle would allow you to do.  Doing this
> with AMP would require specifying a large protocol with lots of object IDs,
> and you'd have to manage their mappings yourself.
> AMP's strength is that it's simple and visualizing the wire format is easy.
>  Most importantly you can visualize the wire format by looking at static
> declarations of commands and their responses, without ever examining any
> code.  This allows you to easily provide AMP interfaces between multiple
> languages (for example, C#: <http://amp-protocol.net/AmpSharp>).  This
> also means that AMP is a bit more performant (on current trunk, on CPython,
> ~2300 AMP/sec as opposed to ~1300 PB/sec).
> A bit more effort has been going into AMP lately because many core Twisted
> developers now believe that AMP covers more and more common use-cases, and
> that should generally be the default choice for most new protocol work.
> Bottom line: you should try AMP first, and if you find it's too tedious,
> maybe give PB a shot and see if it simplifies your protocol code.
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20111013/b8270c90/attachment.htm 

More information about the Twisted-web mailing list