Re: Ampoule vs PerspectiveBroker

Jacek Furmankiewicz <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAGDztiFW-ydRb+=-Rb3QyLLiKHJMOEAeZqWiqRbuF17BERLpNQ@mail.gmail.com>
OK, I will look at Ampoule and deferToAMPProcess while looking into the
CorePost multicore support.

Thanks Glyph,
Jacek

On Thu, Oct 13, 2011 at 1:01 PM, Glyph <[email protected]> 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
> [email protected]
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.