[Twisted-Python] Simultaneously client-server app
Minh Luu
minh.luu at toll.com.au
Fri Jul 11 00:55:23 MDT 2003
Twisted Masters,
Has anyone any suggestion on how I might start on the following task using Twisted?
What I would like to do is a type of server that will serve a number of clients and itself is a client of other servers. It requires a spool of worker threads to perform time-consuming tasks and database related tasks. All the network I/O will be handled by a single async thread using select. A simple diagram below demo the model I would like to implement.
Thank you.
| | | | ^ ^ ^ ^
| | | | | | | |
V V V V | | | |
+-------------------------------------------------+
| Network I/O Thread |
| (async-connection using select) |
+-------------------------------------------------+
| ^
| |
V |
+----------------------------------------+ |
| Queue Thread | |
| (to dispatch to the worker threads) | |
+----------------------------------------+ |
| |
| +---------------------------------+ |
+-->| Worker Thread |----+
| +---------------------------------+ |
| |
| +---------------------------------+ |
+-->| Worker Thread |----+
| +---------------------------------+ |
| |
. |
. |
| +---------------------------------+ |
+-->| Worker Thread |----+
+---------------------------------+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20030711/16db3b97/attachment.html>
More information about the Twisted-Python
mailing list