On Sat, 23 Mar 2002, Shay wrote: > I've taken the code for Circle, and converted alot of it into Java. I'm not sure whether I'm shocked or horrified[1]... If it were a week later, I wouldn't take this seriously. > Each player has there own interactive thread so theres no lag time > because of more players, just because the server is too small/slow.. Multithreading in this way is *less* scalable than Circle's multiplexer, not *more* as your comment indicates. Threads are expensive, even if your JVM is smart enough to use green threads (as opposed to native ["actual"] threads). Their primary use in networking servers is for computationally expensive processing, which Muds don't need to do on a per-connection basis. You might consider looking into the NIO[2] class library, which was introduced in Java 2 SDK 1.4 and supports multiplexing. -dak [1] I think Java's an ugly language. [2] New I/O. http://java.sun.com/j2se/1.4/docs/guide/nio/index.html -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT