I felt like I was seeing the future when I saw the visualization/rendering of PeerConnection stats on the server side. The video compositor is really neat also how they have it working with live modifications.
I wish I had more time/a chance to use it on a project myself.
Be aware that parts of their stack use a custom license for some components... but a large portion of it is OSS Apache 2.0, which is nice if you can stick to those parts!
If the latter, Elixir has one of the best development environments, in my opinion. Mix is fantastic, releases are easy, and Elixir's error messages in IEx are the clearest I've seen in my 30+ year career.
I use Emacs to write code, and beyond syntax coloring, I don't want anything else, so you may have a point if you're talking about IDE support.
victorbjorklund•7h ago
clacker-o-matic•7h ago
dlachausse•7h ago
https://elixir-lang.org/cases.html
throwawaymaths•6h ago
All not on the list.
There's also the legendary bleacherreport abandoning elixir and totally shooting themselves in the foot.
Several fintech companies moved off - brex, ramp. I think for brex they were told by VCs to hire XYZ CTO and the CTO couldn't elixir. Hilariously I ran into ramp people totally in the wild who complained that "they couldn't find elixir devs". I told them "you just randomly ran into one". I think their hiring processes were likely broken, but what's new in silly valley?
dlachausse•6h ago
throwawaymaths•5h ago
jerf•6h ago
In my very opinionated opinion, it's actually reasonably uncommon for me to read a story of someone leaving a stack and not classifying it as one of the things I listed above. Of the cases I would consider "legitimate", it's usually a performance issue; some languages and runtimes are just intrinsically slower than others, or at least, intrinsically slower without an unrealistic amount of effort. (Elixir would be middling here. BEAM is kind of between the dynamic scripting languages and the compiled languages. The interpreter is simple enough that it can run much faster than the dynamic scripting languages but it would be completely unacceptable performance for any compiled language. You can run out of performance in BEAM, but it does take a system that needs performance and some growth to get there.) The rest are probably complexity explosion of some framework, and this is almost always a UI framework problem.
luckywatcher•5h ago
lytedev•5h ago
throwawaymaths•5h ago
cultofmetatron•6h ago
no regrets. the ecosystem has been pretty solid for everything we've wanted to do. Stability/performance has been very good.
also: if you're looking for a high profile startup using elixir, supabase is almost entirely elixir and discord uses it for some critical parts.
rched•4h ago
cultofmetatron•3h ago
atonse•5h ago
During the pandemic, our elixir app sent/received 45 million text messages, helped schedule 1.5 million vaccination appointments, and a few million COVID testing appointments.
It all scaled and performed flawlessly. Any bugs were our fault :-)
fridder•4h ago
vishalontheline•4h ago
paradox460•2h ago
giancarlostoro•44m ago
ettomatic•1h ago
dlachausse•7h ago
https://www.erlang.org/doc/apps/mnesia/mnesia.html
throwawaymaths•6h ago
jerf•6h ago
toast0•5h ago
We mostly used mnesia as a replicated key-value store, but we got a lot of value from having the data and the business logic colocated. Other nodes would send logical operations to processes on the mnesia node and those processes could run each operation one at a time on the data. Any concurrent logical requests for a given piece of data were implicitly serialized by the process mailbox. But almost all of our data was easy to shard, no high volume operations needed to address multiple tables.
We heard a lot of things about mnesia scalability limits that just didn't match up with our experience; so I don't know what other people were doing, but you can get a glimpse of what we were doing in the Rick Reed talks at Erlang Factory. We certainly had some scalability challenges, but many (most?) are discussed in those talks; and my general recollection is that most of them were more like we were the only people running mnesia with tables of enormous size, so we had to make things work; but that's kind of how OTP is. The trickiest one to find, IMHO, was that IIRC mnesia_frag and ets (and our request sharding) all use(d?) the same hashing function, so adding more fragments would make distribution of keys per ets slot worse, ets wanted power of two slots, and would split based on average keys per slot, but we would have lots of keys on some slots and no keys on most slots. Changing the hash seed for ets was a 2 line code change that drastically improved performance on all of our sharded mnesia systems.
Another fun one is that if you use mnesia to store data for long periods, you have to be very careful with the binaries you store; it's easy to end up with refc binaries that have extra space for append operations; storing them in mnesia means that append space is allocated but unusable; you might also store a sub binary that's a small part of a refc binary, the underlying binary can't be disposed of until the sub binary is. For both of those cases, cleaning the binaries before storing them with binary:copy/1 can really reduce your memory use. There's probably some cases where you do want to store a sub binary though?
Mnesia doesn't (or didn't) include a good way to handle when two mnesia nodes sharing a schema disconnect and reconnect. We mostly solved that by ensuring our network was stable enough that that rarely happened. If your network is not stable, you will have a bad time with distributed Erlang in general, and Mnesia in specific.
If I were building Twitch but smaller, and on the BEAM, I would absolutely put account databases in Mnesia; but messages and media would probably live as files. I wouldn't tend to put those into a SQL database on a server either though.
schultzer•5h ago
Although it would be great if it spoke SQL, maybe one day it will: https://github.com/elixir-dbvisor/sql since we can already pass it and get the AST.
troupo•5h ago
schultzer•4h ago