mocket icon indicating copy to clipboard operation
mocket copied to clipboard

Message handling by priority

Open kennywk opened this issue 7 years ago • 3 comments

Would be nice if packets could be prioritized based on a priority level.

For instance a location packet taking priority over a request packet.

kennywk avatar Feb 09 '18 19:02 kennywk

Nice proposal. It was there in our minds while developing. I am not getting much time to work on this, but I can surely help if you wants to contribute to this.

Nishant-Pathak avatar Feb 10 '18 09:02 Nishant-Pathak

I’ll take a look. Can you provide guidance as to where to dig?

Also, how does the intermittent/flaky network functionality work?

kennywk avatar Feb 10 '18 12:02 kennywk

Package level description are as follows:

  1. allocator, Maintains pool for free buffers/packet, allocated and release packets.
  2. builder, Build different flavour of client and server.
  3. channel, server and client channel, contains 2 package.
    • manager, which manages channel, have logic to resend / retry packets.
    • udp, udp implementation of channel manager.
  4. example, client and server implementation of
    • file transfer client.
    • typeSafeReadWrite client.
    • echo server/client.
  5. handler, handler to encode decode byte stream.
  6. helper, few helper classes.
  7. packet, implementation of packets on top of byte stream.
  8. parser, parser by byte buffer to packets.
  9. plugin, plugin to wrap on top of existing socket channel. I believe it is completed.

Check manager package to start with for retry logics. Please also do the code review and share your inputs.

Nishant-Pathak avatar Feb 11 '18 05:02 Nishant-Pathak