[MUD-Dev] Re: Java I/O and threads.

cynbe at muq.org cynbe at muq.org
Mon Jan 25 12:02:50 CET 1999


-----BEGIN PGP SIGNED MESSAGE-----


On 25-Jan-99 Jo Dillon wrote:
>   Not necessarily - it depends on your hardware and OS. Java's designed
> to use lots of threads so it's not too much of a worry.
> 
> -- 
>       Jo

But Java is a resource pig at the best of times :( :( :(.

I just came off a year with a company (www.activerse.com) trying to produce
a Java application (Ding!) to compete with C applications (ICQ), and it was
very discouraging.

Be aware that, for example, a seven-char string will eat over 100 bytes of
ram.  Many muds use small strings heavily, so this can be nearly lethal if
resource usage is any sort of concern at all.

The Java GUI libraries, at least, also tend to be rather un threadsafe, in
ways that vary wildly from platform to platform.  I can't speak for the other
Java libraries, but I'd be inclined to suspect the worst until demonstrated
otherwise.

I did look at the no-select()-in-Java problem, and as far as I can tell, there
is indeed no alternative to a thread per active socket.  I'm less optimistic
than Jo that all platforms will handle this nicely, however.  To put it mildly.

Do be sure to assign distinctive names to all your threads, to give yourself at
least a vague chance of debugging the thing.

 Cynbe


_______________________________________________________________

E-Mail: cynbe at muq.org   PGP Key: http://muq.org/~cynbe/pgp.html





-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQCVAwUBNqy/2j35srNZ3GptAQFh7AQAgz34LMyJLBdo7UJvcjlMbLksWs6NCIXz
riJ/wLlYv9FZwXO52+hXzk/jbKJUg0aTtA3BXf2tlFP4HTzMoQRBGyfpDCqMpyKT
2GwSWtHHNdsxy1TANGxj/7OVqCQyLSHT5n9ieUwKEG9tBnkFCx7/CTbORhFYWdjg
pmO/BxqQGeA=
=46xb
-----END PGP SIGNATURE-----




More information about the mud-dev-archive mailing list