[GNE]GNE Update
Brought to you by:
gillius
From: Gillius <gi...@ma...> - 2002-02-20 05:02:08
|
Work continues on the CVS version of GNE. The exciting 0.5 release containing the completed mid-level API I believe is just a couple of weeks away! At this time GNE will be "complete" from the basic aspect of data communications between peers. After this is completed, the game engine, high-level classes will be started. (Your testing, help, and ANY suggestions will all be VERY appreciated in this process!) Anyways, I've been doing quite a bit of work moving towards this goal. As you already know, the GNE protocol spec was released quite some time ago, and I am working on implementing that spec. So far, I have implemented the handshake part of the spec, and tonight I have just finished the ExitPacket functionality for a graceful disconnect and this is now in the CVS. It is ironic how it was easier for me to code GNE to work properly when the connection FAILED -- it was actually harder to get the proper behavior for an ideal disconnect ;). Well sorta. Turned out I found a way to solve it very easily but I had to think about it for awhile ;). Development would have gone faster but I have spent quite a bit of time doing some more serious testing of GNE in preparation of 0.5 and the rest of the protocol implementation. I have been running stress tests and such to make sure that GNE is operating top-notch, and in this process I have found plenty of bugs, and luckily I have discovered and corrected some VERY obscure bugs that I would only have (likely) found in the raw pre-protocol implementation code, so I've been making a point to test hard throughout this whole process. Just tonight I decided to go wild, and I started 6 exhello clients on my machine hammering as hard as they could on a server process on my machine. I had them in a loop to connect as fast as possible 100 times over. To my delight, thanks to the blocking nature of GNE (and the much improved Windows XP kernel), I didn't see any noticeable performance degredation at all. Although, because threading issues are very sensitive to processor speeds and operating systems, I encourage anyone willing to keep up to date with the latest CVS when possible and make sure that the examples are always running properly for them, and to report any errors on the gnelib-users list or to me personally. I espically want to hear bug reports about how you feel that API might be weak, hard to understand, or that the documentation is deficient, because it will be pointless for me to make a library that no one can use. For those of you curious, here is the complete, boring list of changes thus far since 0.45: GNE 0.45 to current Graceful disconnects are now detected and handled through the onExit event. ExitPackets are now sent when a connection closes, as per the GNE protocol specification. Created and implemented the ExitPacket class. Fixed an event syncronization bug in SyncConnection that caused an assert to fail in onDisconnect. Now if a listener for a Connection is NULL the event thread is halted until a listener is set. Before, it was an error to have a NULL listener but now you can set a NULL listener to temporarily hold events. Fixed an acquire/release bug in exsynchello's usage of gout. Fixed thread-related bug in ServerConnection dtor. Implemented PacketStream::waitToSendAll and added timeout option. Fixed a bug in ConnectionEventGenerator where it can try to start an event on a listener that was just unregistered, and this would cause an access violation as unregistration invalidates the iterator. Fixed a bug where a deadlock was likely to occur when a write failed. exrawtest updated to test endianness of the RawPacket. Due to a new feature in HawkNL, GNE now sends all data in little endian format which is consistant with the GNE protocol spec. Added Time::toString and the ability to output it to an ostream. New example exping to show and test PingPacket. Added ID attribute to every GNE Packet class. A new class PingPacket to handle pinging. Removed the timestamp value from the Packet class. That should have been removed long ago. Another packet will eventually be created that supports timestamps. A mutex was no longer needed in Connection and was causing deadlocks, so it was removed. The mutex was left over from the old event system before it was rewritten. Handshaking as specified in the GNE protocol specs is now implemented. When an unreliable connection does not exist, packets marked as being sent over the unreliable packet stream are sent over the reliable stream instead. Added adjustCount function in the Counter class. RawPacket class updated to use the GNE protocol data types. Nulls are now allowed in the middle of strings. Max string size is 255 bytes. RawPacket example updated to better test new GNE protocol requirements. More work on exnetperf to handle more clients and better format the data. Added the LockMutex class as a convenience. It locks a mutex on creation and unlocks it on deletion which is useful for use in functions with many exit points, or functions that throw exceptions. Fixed a bug with an assert being outside of a guarded section and actually causing errors it was supposed to fix. Gillius |