[2421] in java-interest

home help back first fref pref prev next nref lref last post

Re: polling connections

daemon@ATHENA.MIT.EDU (Mike Christiansen)
Sun Oct 1 14:58:02 1995

Date: Sun, 1 Oct 1995 17:54:19 +0000
From: Mike Christiansen <mikec@metronet.com>
To: andrewfg@aifh.ed.ac.uk
Cc: java-interest@java.sun.com



On 29 Sep 95 at 15:43, Larry Reu wrote:

> Date:          Fri, 29 Sep 1995 15:43:28 -0700 (PDT)
> From:          Larry Reu <larryr@CyberGate.COM>
> To:            java-interest@java.sun.com
> Subject:       polling connections

> Is there any way to "poll" a series of connections in Java. In UNIX
> I can have a set of open sockets and use poll() on the set of file
> descriptors to wait for a connection which has data to read.
> 
> I need to do something similar within Java.  I don't see a way to
> get the underlying fd (UNIX file-descriptor) from the
> java.net.Socket class.  Is there a way to do this with the existing
> classes or do I need to implement my own (using native methods) ?

I beleive that you are suppose to spawn a single thread per 
connection. From a design POV you can create a single instance of a 
server object and each instance serves its own connection. Much 
better than using the "select" apporach. 

> 
> FYI:
> This will be an internal tool on Solaris and I'm currently using the
> preBeta1 tools.  Experience has taught us that for the large number
> of connections we use the Solaris thread package was not up to using
> a thread per connection thus we switched to a polling method.  So
> without testing I'm working under the assumption that the Java
> threads will also not perform well thus the need for setting up a
> thread (or set of) which will poll a set of connections.
> 
Can't speak on this one. Anyone at Sun wish to step in?

mike
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post