3 ms·
The approach with Akka actors is similar - bytes are sent to and received from some kind of socket actor. I think Pony might do similar. Other than that: Go g
by Matthias247 8y ago
The approach with Akka actors is similar - bytes are sent to and received from some kind of socket actor. I think Pony might do similar.
Other than that:
Go gets rid of exposing select() and co from the user and just offers blocking IO. Which is ok, since spawning goroutines is cheap and makes things more consistent than somewhere trying to do event-driven things.
Other languages like C# also get rid of select, but offer asynchronous send/receive methods according to various conventions to the user. Still, that's also nothing fundamentally different.
node.js might be a bit more different in the sense that the stack pushes received fragments towards the user inside a callback - there is no way to specify the target buffer into which the kernel will copy data on reception.
And also in C, but still quite different from posix sockets: WinAPI in IO completion or registered IO mode. Calls to sockets no longer perform work synchronously, they just enqueue the work for the kernel, and results are obtained via an IO completion queue.