SmartMonsters' Bulletin Boards
Post early, post often.  XML
Forum Index » Code Warriors
Author Message
TriadCity Character
This code implements a major revision of the networking infrastructure, in an attempt to stop the network "freeze" bug we've seen from time to time.

The "freeze" we've seen happens this way, I believe. A player becomes disconnected in a way which the server is unable to detect automatically. Next time someone tries to Tell that player something, the Telling player seems to "freeze", since it's not possible for that Tell command to complete properly. The "freeze" lasts until the server detects the dropped player, which can sometimes be a few minutes. In the worst case, we get a kind of gridlock, where everybody's stuck waiting to talk to people who are stuck.

The new code implements a set of very slick non-blocking input/output classes by Matt Welsh of UC Berkeley. See for more info. These *should* allow the server to keep on chugging, even if a player becomes disconnected in some obscure way which the server is not aware of. The server will send that Tell command, but will not stand around waiting for a reply that never comes.

Propeller-heads may want to note that this is not the same as the new NIO features available in Java 1.4.0. For a bunch of reasons we're not ready to go there yet.

You may also note this means we're no longer 100% Pure Java, as the marketing folks say. Que sara sara.

I don't have the ability to really stress networking code in my dev environment. So we'll want to watch things very carefully for the next few days.


Bartle quotiet: E80, A67, S47, K7. TriadCity characters: Mark, Poobah, Occam, Abelard.
[Email] [WWW]
Forum Index » Code Warriors
Go to: