Jenn - Java Easy Nio Network

Ok, I’m posting this topic in this category because it seems that we can’t post into the Project Proposal without sending an email to the admin…

So here it is.

I’ve started to make a little project named Jenn (Java Easy Nio Network). Its aim is to make network development easier for people who don’t want to bother with java networking classes. I know that some similar projects already exists but none of them are really easy to use. There will be two main classes. Here is a little sheme of those classes (no details, only main methods, I’ve hidden other methods) :


public abstract class SBServer
{
     /* Init the server (declinned in three methods). */
     public boolean init();

     /* Start the server. */
     public void start();

     /* What to do on new client connection accepted ? */
     public abstract void onAccept();

     /* What to do when a message is received from a client ? */
     public abstract void onReceive();

     /* Send a message to a client. */
     public void send();
}

So this was an overview of the server architecture. As you can see, users will only have to extend onAccept() and onReceive() methods and everything is done for the server ! Note : I’ve remove the parameters in all methods…

Now, the client :


public abstract class SBClient
{
     /* Connect to a server. */
     public boolean connect();

     /* What to do when a message is received from the server ? */
     public abstract void onReceive();

     /* Send a message to the server. */
     public void send();
}

Et voilà…
The thing will make extensive use of Nio to maximize performances and to make the server non-blocking. Data tranfert will be made in byte, I intend to add compression when the whole lib will be fonctionnal, MySQL support (once again, designed to be very easy to use for the user), and network security.

If you’ve got some time, tell me if this project interest you or if you think it’s a good idea or not (if not, please explain why :)).

Comments are welcome !

Chman

All I want is the Quake3 UDP networking code, ported to Java, using NIO :slight_smile:

Cas :slight_smile:

For the moment I’m only using TCP/IP, but I think I could make an UDP version… The init() method from the server would be separate into two methods called initTPC() and initUDP(), and the client connect() could be connectTCP() and connectUDP()…

Why do you want UDP ? From what I’ve seen, UDP can lose data during the transfert, so TCP is a better way to design network (well, it’s what I think)… Tell me if I’m wrong, but I don’t see any advantages in using UDP :-/…

Chman

/me boggles…

If you’re going to propose a project on this forum to do with networking, why don’t you visit the networking topic?

If you’re there, why don’t you read the massive great big thread on “UDP vs TCP”? (hint: it’s FIRST ON THE PAGE!)

One would think this was required reading, ESPECIALLY if you don’t see the point of it (yet)…

[quote]All I want is the Quake3 UDP networking code, ported to Java, using NIO :slight_smile:

Cas :slight_smile:
[/quote]
Tentatively (no promises) I’ll be doing something similar whilst writing my book, and releasing it as an open-source java gaming network library when the book is released.

Its almost certain that I’ll release a usable java-NIO RDP clone, but the rest (including making an actual SF.net project, and going as far as adding Q3 delta-compression) depends upon time.

And you’re not likely to see anything for 6 months :(.