drneau.com Forum Index drneau.com
A discussion board for drneau.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I'm a thread moron

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    drneau.com Forum Index -> The v2 Bucket
View previous topic :: View next topic  
Author Message
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Tue Apr 05, 2005 8:27 pm    Post subject: I'm a thread moron Reply with quote

Look for coming improvements in the client/server robustness...

The way I did it for v1 (and copied for v2) worked, but I've come to the conclusion that it needs reworking.

Boring inner-working Java details to follow.


The problem is that all the following happens within one thread:
- Segment timer decrements "remaining time property"
- Property changes and notifies all property change listeners
- The "ConsoleDataModel" catches the change and notifies its listeners
- The server process catches that change and updates each client, one at a time

The problem here being that if a connection to a client hangs, then the server hangs. That, and it's just simply inefficient...

Under the new model, the following will happen in one thread:
- Segment timer decrements "remaining time property"
- Property changes and notifies all property change listeners
- The "ConsoleDataModel" catches the change and notifies its listeners
- The "ServerChangeListener" will catch the change and pop it onto its message stack.

...while the following happens in another thread:
- The "ServerStackWatcher" checks the stack for new messages.
- If a message is found, it is routed to the main server process which in turn pops the message onto each client's message stack.
- Each client watches its own stack. When a message is found, it gets routed.

This way, clients only hang themselves.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
drneau
Site Admin


Joined: 13 Feb 2005
Posts: 2385
Location: Woodbury, MN

PostPosted: Thu Apr 07, 2005 8:41 pm    Post subject: Reply with quote

Implemented the new mechanism in the 4/7/2005 release.
_________________
--
Dr. Neau (not a real doctor)
http://drneau.com
http://home.comcast.net/~jneau
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    drneau.com Forum Index -> The v2 Bucket All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group