Questions about JGN (@ Darkfrog)

I've just downloaded JGN and runned the different tests . They worked right off the bat.

I must say the code looks very good…clean and very simple to use yet it can do alot.

I just have a few questions about it.

Is there any more docs than the examples ? It's pretty straightforward still more docs would be good.

How does it serialize the messages…and how speedy is that ?

And is the messagesending (objects) the prefered way to do networking in very fast games (like FPS)

Can you make more more servers running in paralel on the same port ? I mean a chess server would have multiple instances of different games and not just one big server.

So if I understand it right, now it handles one big world can it handle X number of smalll worlds ?

Though I’m happy to answer questions in here it might be best to reduce the clutter of non-jME “stuff” to discuss in the JGN forum:,4.0.html

Apart from the many examples in the source code there isn’t much else yet, but that is on my short-list of items to do along with the web site that being missing I think has caused the growth of JGN to be stunted.

Message serialization is done with a serialization system that is written specifically for JGN to support converting objects to extremely small binary streams extremely fast.  To my knowledge, it is the fastest networking serialization system available (and I have tested against quite a few).  It is so fast that the actual serialization/deserialization process has not been an issue in performance testing on games even when sending thousands of messages per second.

As far as more servers running in parallel, that is possible, but not using the same port.  However, this really is not necessary as the architecture of JGN allows for potentially multiple games to be running at the same using the same single connection and simply differentiating based on the types of messages it is receiving.  In addition, JGN supports InputStream and OutputStream if you choose to use it (in a non-blocking way I might add) but actually offers you the ability to use a single connection and create multiple concurrent streams.  It sounds scary but it works amazingly well.  This is primarily useful if you’re streaming multiple files across and allows you to use a single connection in order to do so and this is all managed internally for you by JGN.


Man I love JGN…I haven’t gotten much time to work on it lately but I have yet to see anything do some of the cool things it can do. :slight_smile:


Thanks. You have every right to brag. It's a good library.