[mnet-devel] Replacing EGTP with PB over SSL

Jim McCoy mccoy at mad-scientist.com
Wed Sep 17 22:12:49 BST 2003


On Wednesday, September 17, 2003, at 01:15 PM, icepick at icepick.info 
wrote:

> I propose to replace EGTP/mencode with Twisted's PB over SSL.  I would 
> like
> to know what others think of this idea.

I would recommend against it, for the reasons I already gave.  None of 
the reasons you give to making this change are compelling, and none of 
them address an actual problem.

> [...]
> Basicly PB fits into the space of EGTP handler/callback management and
> mencode's object serialization.  SSL would fit into EGTP's link 
> encryption.
> Twisted's reactor would replace Asynccore/DoQ.

Unfortunately, there is a reason that we created our own protocol 
instead of using SSL, which was available at the time (and it would 
have saved us the bother of needing Crypto++ as well...)  SSL is fine 
for web traffic or other heavyweight connections, but EGTP was designed 
to deal with quick ephemeral connections between peers and to support 
relaying of messages when a peer was unavailable or behind a 
firewall/NAT.

SSL has recently introduced session cacheing, which makes it possible 
to lower some of the costs of SSL handshake overhead, but it was 
designed to relieve the burden on web site operators doing SSL 
transactions and has a server-side bias that might make it less useful 
for a p2p communication channel.  The hit is not just in the frequent 
pubkey ops but also in communication latency of the setup handshake, we 
designed EGTP to favor fire and forget messages where you did not need 
to do an elaborate setup dance.  SSL will also not solve the relay 
problem.

If it isn't broken, don't fix it.  A simple mantra that the mnet 
hackers need to have pounded into their heads with a brick (the raw 
talent here is very impressive, the way it is being wasted is just 
sad.)  "Not as elegant as I would like", "doesn't protect against this 
unrealistic threat model I created to justify my research", and 
"doesn't scale up to a network size that this system will never see at 
its current rate of growth" are _not_ the same thing as being "broken." 
  Another lesson to learn (are you listening Zooko?) is that perfect is 
the enemy of good enough.  Most of the low-level services in mnet are 
good enough, but trying to make them perfect wastes time -- while we 
waste time on invented problems potential users are going elsewhere.  
When the "its all perfect" version of mnet comes out no one will care 
because they will be using good enough solutions and the switching cost 
will lead them to ignore all of the effort that went in to making mnet 
perfect.

I like twisted too, Rob and I are using PB for our agent<->GUI link and 
think it is nice.  We had been seriously considering using PB over SSL 
to take over the role that SOAP played in the old backup system, but it 
is not really a good idea for an EGTP replacement.

> I really like Twisted.  [...] Even if we don't go
> pb over ssl, perhaps pb over EGTPv1 protocol would be a good match.

When you have a hammer, everything looks like a nail...  I support your 
desire to move from the DoQ to the twisted reactor if appropriate (and 
I would love to hear zooko chime in on this specific subject) and 
turning EGTP into a twisted protocol would be a good first step on this 
route, one that might make pb over EGTP possible -- i have not looked 
deep enough and the network requirement of pb to know if this will 
work.  Making EGTP into a twisted protocol would also be a step we 
(HiveCache) would be willing to pay someone (or a couple of people) to 
do.

Jim



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list