[Patches] [Patch #102980] BaseServer class for SocketServer.py (inh. by TCPServer)

noreply@sourceforge.net noreply@sourceforge.net
Thu, 18 Jan 2001 16:45:36 -0800


Patch #102980 has been updated. 

Project: python
Category: library
Status: Closed
Submitted by: lkcl
Assigned to : gvanrossum
Summary: BaseServer class for SocketServer.py (inh. by TCPServer)

Follow-Ups:

Date: 2001-Jan-18 16:45
By: gvanrossum

Comment:
Thanks, checked in, and closing this patch now.

(There were a few weirdnesses with the patch, possibly caused by lost
whitespace -- I think I've got it all now though.)

-------------------------------------------------------

Date: 2001-Jan-03 06:14
By: gvanrossum

Comment:
I like this idea.

I noticed that you added a copyright statement to the file. Referring to

http://mail.python.org/pipermail/python-dev/2001-January/011250.html

I believe that it's better not to add explicit copyright statements,
because the licensing conditions are unclear in that case. I'd be happy if
you included an "Author:" statement instead.
-------------------------------------------------------

Date: 2000-Dec-29 17:22
By: lkcl

Comment:
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.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=102980&group_id=5470