←back to thread

394 points dahrkael | 3 comments | | HN request time: 0.639s | source

Hello everyone!

I'm currently in a journey to learn and improve my Elixir and Go skills (my daily job uses C++) and looking through my backlog for projects to take on I decided Elixir is the perfect language to write a highly-parallel BitTorrent tracker. So I have spent my free time these last 3 months writing one! Now I think it has enough features to present it to the world (and a docker image to give it a quick try).

I know some people see trackers as relics of the past now that DHT and PEX are common but I think they still serve a purpose in today's Internet (purely talking about public trackers). That said there is not a lot going on in terms of new developments since everyone just throws opentracker in a vps a calls it a day (honorable exceptions: aquatic and torrust).

I plan to continue development for the foreseeable future and add some (optional) esoteric features along the way so if anyone currently operates a tracker please give a try and enjoy the lack of crashes.

note: only swarm_printout.ex has been vibe coded, the rest has all been written by hand.

Show context
guywithahat ◴[] No.44324377[source]
There's something about C++ developers that makes them love Go and Elixir (and I include myself in this demographic). I think it's something about the people who are attracted to C++ for performance are attracted to Go/Elixir for its multithreaded performance. Really cool project
replies(2): >>44325213 #>>44327577 #
uncircle ◴[] No.44325213[source]
Not sure about C++ devs, but Erlang/Elixir are great to handle parsing of protocols, with its implementation of pattern matching. Also, makes the code much cleaner because pattern matching basically eliminates most branching and thus depth of the code base.

The let it crash philosophy allows you to ignore most corner cases with the knowledge that, if they are encountered or a cosmic ray flips a bit, the crash is localised to a single client. I have worked with Elixir almost a decade at this point, and I have never seen an unexpected downtime of the apps I deployed. Aside of maintenance and updates, they all have 100% uptime. How cool is that?

This is how I sell it to clients. “Will you be using Python, Go?” Me: “What about Elixir and the promise that your service won’t ever crash? And you get cool dashboards with it.” Them: “Sold.”

I wish there was a systems language that allows you to pattern match on structs and enums, and in function signatures like Elixir

replies(3): >>44325678 #>>44326953 #>>44331527 #
Thaxll ◴[] No.44326953[source]
"The let it crash philosophy allows you to ignore most corner cases"

This is such a dangerous take. Also Elixir is not strongly typed, so...

replies(1): >>44327350 #
1. ricketycricket ◴[] No.44327350[source]
It's not though. Processes can be supervised and crashes can just lead to "restart with good state" behavior. It's not that you don't try handling any errors at all, you just can be confident that anything you missed won't bring the system down.

And Elixir is strongly typed by most definitions. Perhaps you mean static?

replies(1): >>44329274 #
2. immibis ◴[] No.44329274[source]
You can be more confident. But remember that time an Ericsson switch crashed upon handling a message that it sends to adjacent switches every time it restarts? That crashed the whole network, and you could still do that in Erlang.
replies(1): >>44414148 #
3. uncircle ◴[] No.44414148[source]
“Remember that one time that software crashed?”

The fact that you recall a single instance of crashing software says a lot about the quality assurance of the BEAM.