There are challenges with implementing a communications system (messaging or RPC) on top of NIO with Java but it can be done. If you want to learn about this you could study code bases that have done this. Aeron and Netty are two examples. For reference Aeron is garbage free once connections are established regardless of the number of messages exchanged. To achieve this you have to do some ugly things with NIO to work around its weaknesses.
On Sunday, 11 March 2018 20:25:32 UTC, John Hening wrote: > > Hello, > > recently I am interested in non-blokcing java api for networking. It seems > to be great. However, I would like to implement garbage-free solution. I am > trying to do it only for learning purpose (I know that I don't implement a > "better" solution). Especially, my solution is going to be garbage-free. > > How to start? I see that jdk implementation is not garbage-free. And what? > My only idea is to implement a small native library (only for Linux) and > implement something like "facade" and a lot of stuff around that in Java > (but, garbage-free). > I suppose that it can be very hard to integrate it with selectors for > example (if possible). But, I don't see another solution and this is why I > wrote here. What do you think? What is the best approach? > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.