diff options
author | Guido van Rossum <guido@python.org> | 2001-01-19 00:44:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-19 00:44:41 (GMT) |
commit | 90cb9067b82509ed4917084ffa85abc150509ff5 (patch) | |
tree | 37b14b9abe4c3296913a75ca1b48fd5995b585ff /Include/node.h | |
parent | 3fa560b343f97ec90d1ba18facdcf2515754ae69 (diff) | |
download | cpython-90cb9067b82509ed4917084ffa85abc150509ff5.zip cpython-90cb9067b82509ed4917084ffa85abc150509ff5.tar.gz cpython-90cb9067b82509ed4917084ffa85abc150509ff5.tar.bz2 |
SF Patch #102980, by Luke Kenneth Casson Leighton: BaseServer class
for SocketServer.py (inherited by TCPServer)
Luke wrote:
The socketserver code, with a little bit of tweaking, can be made
sufficiently general to service "requests" of any kind, not just by sockets.
The BaseServer class was created, for example, to poll a table in a MYSQL
database every 2 seconds. each entry in the table can be allocated a
Handler which deals with the entry.
With this patch, using BaseServer and ThreadedServer classes, the creation
of the server that reads and handles MySQL table entries instead of a
socket was utterly trivial: about 50 lines of python code.
You may consider this code to be utterly useless [why would anyone else
want to do anything like this???] - you are entitled to your opinion. if you
think so, then think of this: have you considered how to cleanly add SSL to
the TCPSocketServer? What about using shared memory as the
communications mechanism for a server, instead of sockets? What about
communication using files?
The SocketServer code is extremely good every useful. it's just that as it
stands, it is tied to sockets, which is not as useful.
I heartily approve of this idea.
Diffstat (limited to 'Include/node.h')
0 files changed, 0 insertions, 0 deletions