anyone using AsynchronousDatagramChannel?
Michael Tague
tague at win.net
Sun Dec 29 23:00:20 PST 2013
Well yes. I am implementing a communications module. An object that is
part of a larger set of applications. The module communicates to other
modules of the same kind using UDP. The communications can be between
programs running on one system, between two systems, or between two systems
separated by a distance across the Internet. This is actually a new version
of an existing module with a number of new features one of which is the
ability to communicate with another end-point via two or more paths for
redundancy. In addition, one end acting as server can communicate with
dozens, even hundreds, of other systems - locally or at a distance.
Any given module may have as few as one UDP port open to a few dozen to a
few hundred. I was getting ready to implement this as a classic one thread
per UDP port sitting blocked waiting for receipt of data on a given port.
Each thread doesn't do very much: just receives the data and queues it for
some other thread in the module to handle.
I was looking around to see if NIO or NIO.2 had anything that might simplify
this task. Java asynchronous IO where I don't have to create a thread for
each port and in fact can use an automatically created pool of threads to
handle any scale up in volume seemed to be just the right tool for the job.
I saw the comments that it was pulled from JDK 7, but might make JDK 8 as
hopeful as JDK 8 seems to just around the corner.
Does my description sound like it would be the right tool?
I'm surprised that others would not also find it valuable. Of course,
there is a chicken and egg problem: if it doesn't exist, it is hard to tell
how popular it might be? This seems to be the right kind of thing for any
high volume UDP traffic.
Thanks,
Michael
From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
Sent: Sunday, December 29, 2013 3:21 PM
To: Michael Tague
Cc: nio-dev at openjdk.java.net
Subject: Re: anyone using AsynchronousDatagramChannel?
On 29/12/2013 19:26, Michael Tague wrote:
Hi,
In a previous posting by Alan Bateman in 2010 said:
We're thinking of removing AsynchronousDatagramChannel (it provides
an
asynchronous channel for datagram-oriented sockets). This channel
was
included in the API for consistency reasons. It's not needed for
scalability reasons. The implementation of this channel isn't up to
scratch (it's a prototype implementation), the spec needs a bit of
work,
and there is testing work to do it. There are many other more
important
things to get done and there's no reason why we can't bring it back,
say
in jdk8. So I'm interested to know if anyone is actually using it? I
think it's only been mentioned once on this list.
Thanks,
-Alan.
I would just like to say: I am! And I would like to. Unless I've missed
it, it doesn't appear to have made it into JDK 8.
There hasn't been any interest since then so we haven't re-visited it. Have
a specific usage in mind?
-Alan
_____
Click here to mark this message as spam.
<http://filter.win.net/canit/b.php?i=02L7wldUA&m=c579628937a1&t=20131229&c=s
>
Click here if you accidentally marked this message as spam when it is not
spam.
<http://filter.win.net/canit/b.php?i=02L7wldUA&m=c579628937a1&t=20131229&c=f
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20131230/fbf8530c/attachment.html
More information about the nio-dev
mailing list