okay
so I have a tentative packaging scheme
which seems to compile and run properly...
you can find a test version 
which is "up" *most* of the time at:

  http://mercury.it.rit.edu/~jeffs/vnet/

and now I think it is time to kill off the main problem
which seems to be preventing VNet from "scaling up"...
the "chat lag" problem we have encountered
during "break the server parties"

====================

symptom description:

- with more than maybe 15 users logged into a VNet scene

- I open a telnet session to the machine running the server
  and I run a "tail -f" on the logfile
  so I can watch the messages arrive *from* users

- I also log onto the VNet system on that machine
  so I can watch messages get retransmitted *to* users

- periodically 
  I can see messages continuing to arrive in a smooth flow
  but there will be a [sometimes huge] pause 
  during which time no messages get retransmitted
  but during which time messages continue to arrive just fine
  [and all others with VNet clients logged on
   report the same lag-symptom at the same time]
  *and then* suddenly
  all the pent-up messages get retransmitted to all users
  in a veritable flood o'messages
  [also reported by all other users]

this seems like some sort of queueing problem
hmmmmmm?  ;^}

-----

possible solutions I've been thinking of:

+========================================+
| A) unified message queue for all users |
+========================================+

1) incoming message processing thread:

an incoming message is deposited in the unified message queue
*along with* a Vector of all the users 
to whom the message should be retransmitted
[remember that "chat spatialization"
 means everyone doesn't get every message]

2) each user thread:

walks through message queue looking for first message 
which has that user ID attached to it...
if it finds one before the end of the queue
  then retransmit it to the user
  and remove the user ID from that message in the queue
  if no more user IDs attached to that message in the queue
    then remove that message from the queue

3) at user logoff or crashout each user thread:

walks through message queue looking for any messages
which have that user ID attached to them...
if it finds any
  remove the user ID from the message in the queue
  if no more user IDs attached to that message in the queue
    remove the message from the queue

+=========================================+
| B) separate message queue for each user |
+=========================================+

1) incoming message processing thread:
a message is deposited in each target-client's message queue
[one per logged on user]

2) each user thread:
checks it's own message queue 
and removes messages after retransmission

3) at user logoff or crashout each user thread:
kills off it's own message queue

---------------

any comments from anyone??
[pleasepleaseplease]  <g>

jeffs

--
Jeff Sonstein
Assistant Professor
Department of Information Technology
Rochester Institute of Technology
----------------------------------------
                  http://ariadne.iz.net/
             http://www.it.rit.edu/~jxs/
  http://ariadne.iz.net/~jeffs/jeffs.asc
----------------------------------------
There are no bugs,
there are just undocumented features

Reply via email to