1.1 KiB
Broadcast
Just a very simple implementation of a broadcast program I made this program to learn about elixir, and its Actor model. To be honest I think it's quite nice, even though a program like this usually comes with quite a few unexpected difficulties Elixir was able to handle it incredibly gracefully with basically no resistance.
From my first impressions I think Elixir is actually a quite capable language for the purposes of server software - even if it doesn't have the sheer computational speed offered by lower level languages.
As far as first impressions go for a programming language, I think that's excellent.
running/building
Install elixir and its build tool mix
through your operating system's package
manager, then run mix run
.
After the program starts, it will start listening for clients on port 8080. You can connect with netcat or telnet, I haven't yet built a client for this. There is no special protocol, the server simply broadcasts whatever you type (it waits until you finish a full line).
Building a client is left as an exercise for the reader