MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??
> >
> > The problem here is that you can't do nonblocking i/o in Java. So
> > while you were waiting for input from 1 player the others would all be
> > blocked ;)
>
> Hmm, I'm not sure that this would be a significant problem, BUT that
> depends entirely on how much information players are sending via the
> thread. If its more than a few bytes, then yes, ack, you'll be creating
> your own lag-o-rama. It might be possible to get around this by spawning
> threads from the socket-reading thread which processed and acted on the
> information, and then removed themselves (I think this may be how I was
> originally thinking).
Well, the problem is that if you have one thread reading from all
the sockets, and it tries to get a line (or a character, just as bad
with most modern telnets that send line-by-line) from a given socket,
it will block until it actually has a line. So if the player sits
there for 5 minutes and doesn't type a command, the socket reading
thread sits there waiting for the line and not reading from /any/ socket
for 5 minutes. This is obviously sub-optimal ;) The normal way to do
multi-user servers in Java is with threads, and for any number of users
below 1000 (at the very least) using a thread per user should be safe.
Jo
- Thread context:
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??, (continued)
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??,
Matt Chatterley matt#mpc,dyn.ml.org, Sun 22 Mar 1998, 12:44 GMT
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??,
Joel Dillon emily#cornholio,new.ox.ac.uk, Sun 22 Mar 1998, 12:50 GMT
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??,
Matt Chatterley matt#mpc,dyn.ml.org, Sun 22 Mar 1998, 13:40 GMT
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??,
Joel Dillon emily#cornholio,new.ox.ac.uk, Sun 22 Mar 1998, 13:55 GMT
- Another recruit for the list?,
Joel Dillon emily#cornholio,new.ox.ac.uk, Sun 22 Mar 1998, 15:29 GMT
- Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??,
J C Lawrence claw#under,engr.sgi.com, Mon 23 Mar 1998, 20:38 GMT
[ Other Periods
| Other mailing lists
| Search
]