Does akka.io support unix sockets (AF_UNIX)?

271 views
Skip to first unread message

Daniel Roziecki

unread,
Feb 16, 2016, 1:55:42 AM2/16/16
to Akka User List
Hello,

like in topic. Does akka.io support unix sockets (AF_UNIX)?

I have a big server application wrote in Kylix, which I have started write more than 15 years ago, and still is in heavy development. By a few last years I created a few medium size apps in Scala / Akka, and I really like these tools. So I want (beside have to), move my server from this ancient technology (Kylix) to something new. This is too big, to do it by simple create new version in new technology at once. I have to move it piece by piece. So I need these two apps old one in Kylix and new one in Scala / Akka, to communicate (fast communicate) between each. Unix sockets are best for it. So I found junixsocket library. But I am wonder if akka can't do it on own way?

Regards

Daniel Roziecki

Rafał Krzewski

unread,
Feb 16, 2016, 8:40:50 AM2/16/16
to Akka User List
https://github.com/kohlschutter/junixsocket library supports only blocking IO, which is not the best match for Akka. https://github.com/jnr/jnr-unixsocket seems to be a better alternative because it provides NIO interface which means that it might operate in non blocking mode - but I don't have enough expertise to say if it actually does by just skimming the sources.
Using such a non-blocking socket, you could build a bridge class that would allow an Actor to exchange messages with a remote application via Unix socket.
You could also make it generic and reusable by providing akka-streams wrappers around Unix NIO sockets similar to http://doc.akka.io/api/akka/snapshot/#akka.stream.scaladsl.Tcp - but that would require a quite a bit of effort!

Cheers,
Rafał

Daniel Roziecki

unread,
Feb 20, 2016, 6:38:25 AM2/20/16
to akka...@googlegroups.com
Thx, I though it will be some simpler method around, but I will try jnr. I will not create any generic wrappers, have no time for this, and I will probably never use these code again ;)

Regards,

Daniel

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/mASDttkQzGg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages