[Twisted-Python] Network newbie

Reza Lotun rlotun at gmail.com
Wed Apr 7 18:35:28 EDT 2010

Hi Brian,

> I suppose the application will be acting as both server and client. Any
> thoughts?

For the network part you're certainly describing a P2P model. These
applications are essentially text messaging each other various bits of
info. Keep in mind with P2P stuff - it's notoriously hard to be
*really* P2P without having some element of centrality/servers. The
reason is that what seems like simple communication between two
computers on the internet really goes through firewalls and Nats and
cable modems and what not. The internet - or rather the Internet as
its commonly referred to - is really a collection of public hubs
(websites, mail servers, etc.) which users traverse through their
layers of NATs and firewalls to get to. Usually only ports 80 and 443
(HTTP and HTTPS) are open on these NATs and firewalls, hence why you
don't see a proliferation of other random protocols and applications,
besides a handful. Skype or Kazaa are P2P systems that use a hybrid
approach of relaying via central, publicly accessible "supernodes"
which are promoted on the fly.

Anyway, most people take the easy way out and have one or more servers
sitting somewhere that their clients connect to. Not that the P2P
problem isn't fun ;-)

Here's one of many solutions: get one or more publicly available
servers, and stick some XMPP software (twisted.words, Punjab,
ejabberd, whatever). Turn on SSL. Now you have a secure, centralized
communications system.


Reza Lotun
mobile: +44 (0)7521 310 763
email:  rlotun at gmail.com
work:   reza at tweetdeck.com
twitter: @rlotun

More information about the Twisted-Python mailing list