Name: Michael Granger
Member since: 2001-04-13 07:40:00
Last Login: 2006-12-10 12:48:25
Homepage: http://www.devEiate.org/
I synch'ed CVS with the latest version of the code last night. There's still a few bugfixes that I've since written, but not yet committed, but they too will be in CVS a little later tonight. Changelogs are here.
Through judicious use of the Observer pattern, I replaced the polling loop in the IOEventStream class with a loop that locks a ConditionVariable. The condition variable is signalled whenever one of the Subject objects calls update(), so now IO is only done when there are actual pending events. It had the side-effect of cleaning up the code, too, which is always a good sign. Load average in the IOEventStream test harness with no keyboard activity: 0.02.
I'm now working through some issues with the way login events are handled, and I realized that the reconnect() method is too tightly coupled to the SocketOutputFilter, so I'll see if I can come up with a more elegant implementation tonight.
14 May 2001 (updated 14 May 2001 at 08:07 UTC) »
Icebox Hacking
I converted all of the mod_perl handlers in the Icebox project to method handlers yesterday, and derived them all from a base ApacheHandler.pm class that I wrote for a client. It's nice to see the code shrink so much, and to be able to refactor lots of the common tasks out of the individual classes into a common base class.
The stream daemon is nearly done, so I should be releasing a 1.0 version of Icebox soonish.
9 May 2001 (updated 9 May 2001 at 06:55 UTC) »
MUES Progress
I've decoupled the IO stream away from the server to the point now that I only have to supply some vague simulcrum of the Engine's interface and the event subsystem to be able to test all the IO subsystems in standalone test harnesses.
I am removing all the player/stream login code from the LoginSession class and the Engine's LoginSessionAuthEvent handler and moving it to the Engine's PlayerLoginEvent handler for consolidation. This means that the IOEventStream will have to be frozen for a second when it's handed via the PlayerLoginEvent back to the Engine to prevent IOEvents from being lost in a race to re-assign the socket from the stream in the event of a reconnect. I added pause() and unpause() to the stream class to facilitate this.
The IOEventStream is still a CPU hog. It's a hog because it has no way of knowing if its filters have pending events, and so must poll them in a timely manner. If the interval is adjusted too high, response to the shell becomes sluggish. This can be fixed by arranging for some kind of signalling mechanism for filters so that they can wake the stream when they have events pending, and the stream can run the events through the loop and then sleep until there's more to be done. Perhaps mutexen or condition variables or a semaphore could be used to do this. More experiments are needed.
13 Apr 2001 (updated 13 Apr 2001 at 10:16 UTC) »
I suspect the fact that I tried to store per-class metadata in class attributes is at least partially responsible for the segfaults. I didn't realize they were inherited by child classes.
But how to store the per-class metadata, since class attributes are inherited, and setting them in child classes changes the value of the parent's attributes instead of overriding them?
Maybe with a binding? But where to store the binding?
Maybe there should be a class attribute for TableAdapter that holds Hashes for all of its children's metadata? Some mechanism for avoiding class name collision and allowing storage for anonymous subclasses?
13 Apr 2001 (updated 13 Apr 2001 at 09:32 UTC) »
Hmmm... I guess I shouldn't let iThought do HTML conversion...
ged certified others as follows:
Others have certified ged as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!