Netty 2

I just found that lib exists : Netty 2

[quote]Netty 2 provides an easy event-based API (like Swing) to develop high-performance, maintainable TCP/IP server/client application. Netty provides many essential features such as readiness selection, thread pooling, write buffer DoS prevention, and buffer reuse which are required to build high- performance and capacity network applications.
[/quote]
http://gleamynode.net/dev/projects/netty2/
http://gleamynode.net/dev/projects/netty2/architecture.html

anybody got some experience with it ?

Nope. But…

  • JMX compliance is a very unusual feature and nice to have
  • the rest is pretty easy to implement yourself
  • the “pluggable protocol” stuff won’t work for non-trivial protocols because it’s too simplistic. Nice for doing simple stuff, but it would die horribly on something not-too-complex like basic HTTP (and definitely wouldn’t go to full HTTP/1.1 + add-ons) because it relies upon a simplistic “write message / read message” control flow.

So…I would guess it’s worth trying as a first pass for your own networking, bearing in mind that it probably can’t/won’t keep up as your game starts to get more demanding.

If you want to do something simple, like a multiplayer tetris, then I doubt you’d find anything more appropriate (assuming it’s not buggy!)

I’m currently using it at work and it’s working like a charm for now. It’s really easy to implement a command based protocol (well it’s the goal). It handles timeout easly and the design is quite simple. I need to try to stress it a little now for see how robust & scalable it is. For now it doesn’t look buggy, but I don’t have tested it on Windows, just Linux.

so finaly it’s out :
Mina the network framework done for apache diretory server projet
http://www.apache.org/~trustin/mina-20050207/index.html

it’s looking like netty2 (it’s the same developper) but you can implements both low level and high level protocol.

It support UDP now and intra VM connections