Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / August 2007

Tip: Looking for answers? Try searching our database.

Good UDP Networking Library

Thread view: 
Azazel - 16 Aug 2007 15:47 GMT
Hi,

can anyone point me to a good, well-performing high-level-abstraction
UDP networking library for Java?
I've read through many posts and tutorials about NIO, but this is not
what I'm looking for. Using NIO would still require a significant
investment in time and effort from my side while I'm looking for a
nicely pluggable component.

I'm thinking about something that encapsulates the low-level stuff
(actually opening UDP sockets, encoding data etc.) and provides me
with functionality akin to TCP, only over UDP. Ideally, I'd be able to
specify via a strategy pattern or something how 'reliable' the
connection is.

The library should work asynchronously (at least to its outside
interface) and either call observers or fill/read queues. Ideally, it
should be thread-safe in those data-structures exposed to the outside,
using intelligent sync mechanisms (ie, not critical sections for
everything). So, eg, if there was an in/out-queue interface, the
concurrency issues with reading/writing to those queues should be
implemented with something like a read-write-lock.

The library must perform equally or nearly equally well on both
Windows (XP and Vista) and OSX. I mention this as the library might
wrap platform-dependent C/C++ code.

I'm interested in both OS and commercial libraries. Actually, unless
the OS library is mature and has a sizable community, I'd probably
prefer a commerical license with support.

Do any of you guys have good pointers for me? I've been googling, but
without much success.

Many thanks in advance,
AzazelDev
Roedy Green - 17 Aug 2007 02:41 GMT
>I'm thinking about something that encapsulates the low-level stuff
>(actually opening UDP sockets, encoding data etc.) and provides me
>with functionality akin to TCP, only over UDP. I

If you want the functionality of TCP/IP, why not use TCP/IP? UDP is
for when it as OK to lose messages, when you DON'T have ongoing stream
state.

UDP itself is pretty simple. See my code for getting system time via
UDP in http://mindprod.com/products1.html#SETCLOCK.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Azazel - 17 Aug 2007 08:32 GMT
On 17 Aug., 03:41, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:

> >I'm thinking about something that encapsulates the low-level stuff
> >(actually opening UDP sockets, encoding data etc.) and provides me
[quoted text clipped - 3 lines]
> for when it as OK to lose messages, when you DON'T have ongoing stream
> state.

Actually, in the application I'm looking to shop this library for, we
will use TCP *and* UDP. For example, for login we will use TCP. There
are many messages where we don't mind whether packets arrive in order,
though. Also, it does not make sense for all messages to worry about
lost packets and do stuff like resending. In other words, we need fine-
grained control about which messages need which level of guarantees.
As we are going to generate a lot of traffic anyway, the difference in
header size between TCP and UDP is a significant cost factor.

Cheers,
AzazelDev

> UDP itself is pretty simple. See my code for getting system time via
> UDP inhttp://mindprod.com/products1.html#SETCLOCK.
> --
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.