port doubling (or...)?

Cliff Wells logiplexsoftware at earthlink.net
Mon Jan 21 19:16:47 EST 2002


On Mon, 21 Jan 2002 23:57:59 -0000
maximilianscherr wrote:

> i think that uses too much performance,
> you must know, this "portal" server would need to listen to 30-50 

I think you overestimate the performance hit.  Obviously, it depends more
upon the bandwidth needs of each of those clients than the total number of
clients, but this is totally doable in Python.  I have a friend who wrote
just such a program (in fact, after reading your post, I emailed him to see
if he still has the code).  He was using it to do port redirection,
security checks, etc and was getting excellent performance (on a 500MHz
PIII).  This is basically a very simple proxy server and doesn't incur much
overhead.

> clients, and that very often, istn#t there another poss than this 
> portal server?

AFAIK, it is not possible to open the same port twice from two different
programs.  Even if you could, how would you control which packet went to
which program?  Once one program reads from the socket, that data is gone,
and the other program would never get a chance to see it.  

If you are running Linux, you might be able to use some OS features (i.e.
IPChains) to control the flow of packets (IPChains), but IMHO, this would
be more difficult to implement and would require customizing every machine
you want to use as a server.  

Give it a try before you dismiss it.  You might be pleasantly surprised.  


-- 
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308




More information about the Python-list mailing list