Zay-ES-Net Network Traffic

I am looking into minimizing network traffic if I can … so here are some questions about Zay-Es-Net.

Using the Zay-ES-Net example sending a Name component (having only a String) and a Position component (having a Vector3f and a Quaternion).

  1. Does Zay-Es-Net only send updated data? That is to say: Does it send only components that haven’t changed?

    i.e. I can see the Name Component’s string each time the client receives an update in the console outputs. Is the string data being sent each time, even though the String in the Name component doesn’t change? I checked the packets being sent between two PCs on my LAN using WireShark, but I could not detect any recognizable Strings in the packets. So …

  2. Is the data sent being compressed?

  3. SpiderMonkey can use TCP and UDP. Does Zay-ES-Net transport data on both? Or does it have a preference?
    Note that when I set the UPD port to -1 on either the client, or the server, or both, I got no transport at all. I was attempting to use only TCP transport.
    If both are used, is the data duplicated?

I guess that’s it for the moment. Thanks in advance.

Depending on how you are using it, it will only send the components that have changed.


Zay-ES-Net uses TCP. UDP requires additional protocol to provide any delivery guarantees and that is not included here.

If you want real time position updates then you can look at my SimEthereal stuff… that’s designed to send real time state for lots of objects over UDP. It uses a semi-reliable protocol (throws away stale data) and only sends state deltas, etc…

Edit: and here’s a working example that uses Zay-ES and SimEthereal:

1 Like

Regarding String type, you can register an integer id with your strings and send id every time instead of sending String itself.

For example see ObjectType component.

1 Like

Thank you for your answers pspeed and Ali_RS. Very nice tips. I will definitely look into your suggestions.

I continue to be impressed by jME3 and the jME3 community.

1 Like