On Sun, 2004-01-25 at 08:19, Ross Werner wrote:
> Is there a way to allow real-time communication without using polling or 
> multiple threads per client (i.e. have each client open a "read" 
> connection to the server, and a "write" connection to the server as well)?

AFAIK, those are the two ways. Either you open a new Thread for each
connection (which is both read and write, so you only need one each) or
use the new non-blocking I/O from 1.4 and poll each connection using
just one Thread. The package is named java.nio and here's a site[1] that
looks to contain some good info.

I suppose you could also use some sort of middleware layer like JMS to
do the messaging. That certainly wouldn't be a bad idea but might be
overkill. JBoss[2] has a great JMS server[3] which I'm using as part of
JBoss with great success. Also check out XML Blaster[4] which I've heard
good things about although I've never used it.

Corey

1. http://www.javanio.info/
2. http://www.jboss.org/
3. http://www.jboss.org/developers/projects/jboss/jms
4. http://www.xmlblaster.org/


____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to