<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 2, 2013, at 3:25 AM, Phil Mayers &lt;<a href="mailto:p.mayers@imperial.ac.uk">p.mayers@imperial.ac.uk</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">On 03/01/2013 10:27 PM, Glyph wrote:<br><br><blockquote type="cite">&nbsp;What is AMP too much of? &nbsp;Memory? &nbsp;CPU? &nbsp;Bandwidth? &nbsp;API complexity?<br>&nbsp;Code size? &nbsp;As compared to what?<br></blockquote><br>FWIW, every time (all three of them...) I've looked at AMP I got rapidly<span class="Apple-converted-space">&nbsp;</span><br>bored and ended up using PB. My use-cases have usually been<span class="Apple-converted-space">&nbsp;</span><br>Twisted-&gt;Twisted, and the AMP "Command" definition, and syncing said<span class="Apple-converted-space">&nbsp;</span><br>defs up at both ends, was hassle I didn't need.<br><br>When I need to talk to external systems I almost always use some REST,<span class="Apple-converted-space">&nbsp;</span><br>XMLRPC or JSON-RPC interface, because they're usually available<span class="Apple-converted-space">&nbsp;</span><br>out-of-the-box.<br><br>I also don't care for the idea of statically typing the command defs;<span class="Apple-converted-space">&nbsp;</span><br>I'm sure this helps when talking to languages with crappy typing<span class="Apple-converted-space">&nbsp;</span><br>systems, but honestly - who uses Java these days? ;o)<br></div></blockquote></div><br><div>I wrote a blog post some time ago explaining why you want static declarations, even if your programming language is all nice and dynamic:</div><div><br></div><div>&lt;<a href="http://glyph.twistedmatrix.com/2008/07/static-on-wire.html">http://glyph.twistedmatrix.com/2008/07/static-on-wire.html</a>&gt;</div><div><br></div><div>Even if all you care about is Twisted-&gt;Twisted, there are potential resource exhaustion and implementation-confusion attacks against PB that are very hard to mitigate in its current form. &nbsp;That said, for the sorts of places where PB is useful (communicating about and synchronizing arbitrarily deep and complex object graphs), you're probably going to have those exhaustion attacks anyway and using something like AMP would just be more typing. &nbsp;So as long as you're version-synchronized and at least partially trusted on both ends of the wire, PB is a fine choice as well.</div><div><br></div><div>"REST" (by which you mean "HTTP", I'm sure), XMLRPC, and JSON-RPC are not full replacements for AMP because they're asymmetrical and don't support pipelining. &nbsp;With AMP, a client can receive requests from a server, you don't need to have a TCP handshake for every request, you can receive responses out of order, and you can receive a request while waiting for a response, and so on.</div><div><br></div><div>-glyph</div></body></html>