Behavior-Oriented Concurrency for Python: Lock-less, Deadlock-free, Ownership-based
9 points by eatonphil
9 points by eatonphil
I'm a little confused by this:
Furthermore, the ordering of the behaviors as they are declared determines the scheduling of the behaviors. In a situation like this, it means that all the ingredient behaviors will execute before cook_omelette.
Doesn't that imply that you have to figure out the dependency graph yourself? I thought part of the point was that you don't have to know what needs to happen first, second, third, etc.
I love Python as much as the next guy but Erlang solved this in 1986, if we need distributed concurrency we should maybe just work in a language designed to support distributed concurrency. Do we need to use Python for everything? Can LLMs not write Erlang/Elixir?
Made me think of cells in reactive programming, you capture dependencies in the computation, and let the underlying runtime orchestrate/coordinate -- in this case access as opposed to update propagation. Nice and clean!
Anyone have a short summary of what "behavior-oriented concurrency" is?
The BoC programming model relies on a decomposition of state that is akin to actors—a program’s state is a set of isolated resources (that we call cowns). Behaviours are asynchronous units of work that explicitly state their required set of resources. Unlike messages in actor programming, behaviours are not coupled to a specific resource; crucially, BoC offers flexible coordination, operations that require synchronous access to multiple resources can be easily expressed
It's a re-implementation of the BEAM VM (Erlang/Elixir languages). There are other languages that do the actor model, like Pony Lang, etc. But the BEAM is the famous one, it's been around since the 1980's.