functions-remote is an experimental library that makes remote functions calls (almost) as easy as calls on the same jvm. I’ve added a socket + fibers implementation that works on jdk21. It is a lot faster than an http server and due to the fibers there is no blocking with a very simple programming model (no IO monads, “lets make scala simple again” ).
Because there is no http overhead, it is more than 10x faster to do a remote call than i.e. http4s. And due to fibers, it all as if the call is local with no blocking but a straight forward return type.
The rest of the lib with http4s, kafka etc integrations:
Have you tested JEP 380: Unix-Domain Socket Channels ? They do not have the overhead of TCP/IP protocol, so could be much faster. OTOH, they are tied to filesystem, so they aren’t as universal as TCP/IP based solutions. However, the interface (sockets API) is the same once you create the sockets, so probably a lot of code could be shared.
Thanks, no didn’t try it yet. I had a look, so this is IPC in the same box, will have a better look at some point, if it behaves in a similar way like sockets it would be easy to plug in. For now I am working on helidon http/fibers integration.