Re:Tree-Structured Concurrency
by swader999 on Sunday July 02, 2023 @11:51AM
(#36562616)
How possible is this kind of thing in Golang, in Elixer? I'm trying to choose tech for parsing, processing, calculating, and applying complex business rules to a massive csv parsing pipeline. Early stages but golang seems like the right candidate.
[ Parent
| on HN ]
All this is easily possible. You can leverage fan-out/fan-in/pipeline concurrency patterns in Go.
It's really awful in Go to create concurrency patterns. In particular because the generics are clunky and verbose, and there are no type classes/traits. There's also no good cancellation convention: Context is verbose, dynamically typed, and not used in all the standard interfaces.
This is, actually, the erlang/elixir concurrency model, (with a lot of tooling behind for doing it well).
Isn’t erlang a very different, almost opposite concurrency model? I’m not an erlang expert but async message passing is a very different style. The limitation around background tasks in structured concurrency is trivial in erlang for example
Yes, but proceses are supervised (in a tree structure). So you have the same warranties described in structured concurrency