Network Protocol Modules
This directory contains a collection of modules, each implementing a simple of not so simple network protocol. Some of this are designed as toy protocols and were used during the design of the system to flesh out key areas. As before, __init__.py is simply an empty file.
The only protocol here with a potential to be non-trivial is the HTTPServer.py protocol. The implementation inside that component at this point in time is deliberately very simplistic, and only implements a very simple very small subset of HTTP/1.0. When run standalone it runs a simple webserver on port 8082, sending random files to the client. The server code isn't actually complete. Also note that this is an extremely insecure web server as a result of these two facts.
EchoProtocolComponent.py is the simplest protocol implemented, and was unsurprisingly the first one to be implemented - since it forms a simple loopback protocol useful for integration testing. In practice this component is really a data pass through component since all data recieved on its inbox is passed on directly to its outbox. As a result this component's implementation may actually migrate out to Kamaelia.Util as a simple buffer component and allow this actual protocol component to simply inherit from Kamaelia.Util.
FortuneCookieProtocol.py is one step above EchoProtocolComponent.py. It runs the fortune program on the server and sends the result to its outbox. In a networked environment what this means is the server will simply blat the fortune cookie to a client that connects to the server.
AudioCookieProtocol.py is a logical extension to FortuneCookieProtocol.py. Similar to FortuneCookieProtocol.py it too runs an external program and sends the result to its outbox. In this case however rather than a short piece of text, it is a short snippet of audio.
SimpleVideoCookieServer.py does essentially the same as FortuneCookieProtocol.py and AudioCookieProtocol.py, but this time with a short piece of video.
Michael, December 2004