Network packets processor advice

Krzysztof Retel Krzysztof.Retel at googlemail.com
Mon Feb 9 11:39:08 EST 2009


Hi,

I am wrting a network packet processor. The processor listens on a
specific port for incomming UDP or TCP packets. When the packet
arrives it has to parse it, store in DB and if this succeed it has to
acknowledge the packet to the client. Now the problem is that I want
to have a control over possible failures of the system. For instance,
if the DB is gone, the processor should stop working and restart when
DB is back to live.

So the questions are:
1. Which approach is the best for building such software? For instance
using threads?
2. I can use the 'monit' tool for monitorig processes. However, not
sure yet how to start a python script with a specific process id. Is
it possible at all?
3. Any other suggestions?

Cheers,
K



More information about the Python-list mailing list