[Twisted-Python] Re: Perspective Broker and UDP, is it possible?

Tommi Virtanen tv at twistedmatrix.com
Thu Sep 2 03:16:35 EDT 2004


Ed Suominen wrote:
> It is certainly possible, just not with the current version of PB. In any 
> modified version (go for it!), I think you would need to provide client 
> identifying info with each burst of data, or limit "connections" to just one 
> client at a time per port, to keep track of things.

The UDP pseudoconnection can be identified by 
(srcIP,srcPort,dstIP,dstPort), so one server port can serve everything 
as long as all the clients use different source IP addresses or ports.

To modify a protocol from TCP to UDP, you need to consider the things 
TCP used to provide you with:

- reliability (resending, acknowledgement)
- segmentation (long messages that will not fit a packet)
- bandwidth estimation (no point in sending at 100% rate, as the 
internet connection will never be that fast)
- antispoof (to fake TCP, you really need to be able to receive packets 
sent to the IP address you are spoofing; UDP with no extra checks can be 
spoofed blind)

etc.

Quite often, it's just not worth it to drop TCP. Especially when the 
problem at hand is _not_ tightly interconnected clusters in a secure and 
managed LAN, but WAN connections with untrusted parties over an 
untrusted network without guaranteed performance.




More information about the Twisted-Python mailing list