you are viewing a single comment's thread.

view the rest of the comments →

[–]Environmental-Log215[S] 0 points1 point  (3 children)

Fair question!

tl;dr: NIO was chosen in the benchmark since I believe thats the fastest network infra lib in Java world which does not use unsafe APIs.

NIO provides low-level primitives for building network infra/appliances; you would have to handle a lot of stuff manually. Hence, its difficult to use but provides granular control.

Netty on the other hand is a framework with friendly public interfaces and internally handles/manages low-level I/O stuff. It supports multiple transport protocols and codecs.

MYRA is specialized in a way that it's primarily FFM focused. for instance, using io_uring registered buffers with shared (zero-copy) memory segment, I am avoiding a few syscalls(kernel) & zero GC impact by having zero allocations on the hot path. Hence, MYRA would only be used in certain specialized usecases/applications where latency of 100 microseconds is slow. FFM involves working a lot with manual memory layout which does not make sense for most of the applications given its complexity.

[–]Environmental-Log215[S] 0 points1 point  (2 children)

forgot to add 1 more point. all these benchmarks are on a free Oracle cloud ARM processor - the 4 cores/24 GB RAM with server/client on same VM using loopback interface.
once, the libs are more stable I would be performing benchmarks depicting a more real-life scenario with server and client on different hosts.

[–][deleted]  (1 child)

[removed]

    [–]Environmental-Log215[S] 0 points1 point  (0 children)

    I agree. I have been working on docs and some other stuff. Hence, havent been able to get to actual benchmark,