Live data from Hacker News

Process-Based Concurrency: Why Beam and OTP Keep Being Right

variantsystems.io

31–40 of 58 posts

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#31
post #7

Earlier quoted context omitted.

You may be thinking of some recent round of publicity for BEAM, but BEAM is a bit older than JavaScript.

Haha. I guess the BEAM people can nod down at me with contempt and I nod down at the Elixir folks.

at least you're doubling down on your ignorance!

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#32

Earlier quoted context omitted.

I spreadsheeted out how many T424 die per Apple M2 (TSMC 3nm process) - that's 400,000 CPUs (about a 600x600 grid) at say 1GIPs each - so 400 PIPS per M2 die size. Thats for 32 bit integer math - Inmos also had a 16 bit datapath, but these days you would probably up the RAM per CPU (8k, 16k?) and stick with 32-bit datapath, but add 8-,16-bit FP support. Happy to help with any VC pitches!

David May and his various PhD students over the years have retried this pitch repeatedly. And Graphcore had a related architecture. Unfortunately, while it’s great in theory, in practice the performance overall is miles off existing systems running existing code. There is no commercially feasible way that we’ve yet found to build a software ecosystem where all-new code has to be written just for this special theoreti…

Yes David is the man and afaict has made a decent fist of Xmos (from afar). My current wild-assed hope for this to come to some kind of fruition would be on NVidia realising this opportunity (threat?), making a set of CUDA libraries and the CUDA boys going to town with Occam-like abstractions at the system level and just their regular AI workloads as the application. No doubt he has tried to pitch this to Jensen and Keller.

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#34

I think the practitioner angle is what makes interesting. Too many BEAM advocacy posts are theoretical. I would push back on the "shared state with locks vs isolated state with message passing" framing. Both approaches model concurrency as execution that needs coordination. Switching from locks to mailboxes changes the syntax of failure, not the structure. A mailbox is still a shared mutable queue between sender and…

With OTP you can trivially decide whether you want your sender to block or not, and how you do your decoupling if you decide it shouldn't.

In practice you'll likely push stuff through Oban, Phoenix PubSub or some other convenience library that gives you some opinions and best practices. It really lowers the bar for building concurrent systems.

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#35

I love the idea of Erlang (and by association Elixir), OTP, BEAM... In practice? Urgh. The live is all so cerebral and theoretical and I'm certain the right people know how to implement it for the right tasks in the right way and it screams along. But as yet no one has been able to give me an incling of how it would work well for me. I read learn you some Erlang for great good quite a while back and loved the idea. B…

You could do the introduction to Mix and OTP that the Elixir team provides, https://hexdocs.pm/elixir/introduction-to-mix.html .

Erlang is weird, it helps if you have some Lisp and Prolog background, but for a while it might get in the way of learning how OTP works.

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#36
A rewrite of a stateful application written in python with postgres would be more illustrative of how you're solving the same problems but better. Do BEAM applications not use an actual databse? How is crash tolerance guaranteed? In a typical application I'd write crash tolerance would be handled by the DB. So would transactionality. Without it, one would have to persist each message to disk and be forced to make every action idempotent. The former sounds like a lot of performance overhead, the latter like a lot of programming effort overhead. I assume these problems are solved, but the article doesn't demonstrate the solutions.

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#37

Very interesting. Reading this made me think of occam on the transputer: concurrent lightweight processes, message passing, dedicated memory! I spent some happy years in that world. Perhaps I should look at BEAM and see what work comes along?

Likewise. You should read about the Cerebras WSE configurable colour channel mesh.

Re: Process-Based Concurrency: Why Beam and OTP Keep Being Right

#40
inverse thinking is needed here - instead of having a solution trying to find a problem.

what would it look like if you didn't need concurrency at all - would simply having a step by step process enough e.g using DAGs

what would it look like if by not letting it crash - you can simply redo the process like a Traditional RDBMS does i.e ACID

they're domains where OTP / BEAM are useful - but for majority of business cases NO

Post reply on HN