Genny Test v0.29 released, Mon, 7 May 2001 00:15:01

Greetings,
Changed and updated:
The push request packet has been added and implemented and known to work
(although probably not well). It took less work than I expected, I must be starting to know what I am doing.
I renamed the transferspid dict to transfers, because I like brevity and because they also hold an URL in them.
The code now looks for ~/.genny_nid which is a file containing four bytes that is the node identifier for the servant. Genny has no way to garbage collecte client and server identifiers as of yet (in future versions) so a constant node identifier for servant will ease memory requirements. (There was only about fifty CIDs tracked by the servant on nova.yi.org at its peak, that isn't a significant amount of memory.)
I moved some file service commands to genny_file.py out of genny.py.
I wrote a respond function in gennylib.py. The problem is that calling reply() assumes that the packet you are responding to is a broadcast or a rereply, and calling rereply() assumes the packet you are responding to is a reply. These aren't valid assumptions, in fact, the service layer does not need to care about them at all. So I wrote respond()
which figures out if the packet needs to be marked as a reply or a rereply by the header bytes that are passed to it, and constructs the packet and sends it off. After that, I remove the reply and rereply functions.
I had a bug in the alpha version where the webserver was unable to actually send a file. This was dumb. It was because I had not iported a particular library function, so the code raised an exception which was stifled because I hadn't written a proper way to have errors logged.
Eventually I changed the whole webserver around and moved it to webserve.py, where I can muck with it there in relative peace.
I learned something new about Unix forking. The new process also has the old sockets and files open. So I modifed some code to close the appropriate files/sockets after a fork(2) call.
I modified the webserver to dump its output (all its output) just plainly to webserver.log or something like that, isntead of trying to get it to talk through a socket. That means currently the logging socket isn't used.
I have several spots commented where I should take advantage of the GENNY_FILE_ERROR numeric. Genny can report errors! That is one of the single greatest improvements over Gnutella.
And that's about it.
Plans:
I'll work more on the genny file service, especially in making it more verbose.
This release is also considered Alpha.
Now is about the time for me to decide if I want this all to be Genny or if I want this to be part of a larger scheme. The easy way is to go out and make a genny website/cvs place etc, etc and not worry about compatibility with other distributed networking protocols (even if that were feasible).
TomG

Home: Genny: Posts