> In BoC, the equivalent of a message is received by multiple actors and operates with exclusive access to the message and all of the receivers.
(emphasis mine)
IIUC with actors, messages are processed by exactly one actor so it can be difficult to express transactions (e.g. transferring funds from A to B cannot be done atomically). Erlang somewhat fixes this with "selective receive" which re-introduces the possibility of deadlocks. BoC fixes both issues.
traderj0e 3 days ago [-]
Was wondering how this is using a separate GIL per action when the actions are pure Python code. "PEP 684 introduces a per-interpreter GIL, so that sub-interpreters may now be created with a unique GIL per interpreter."
vivzkestrel 3 days ago [-]
- stupid question: what is different about this concurrency compared to say asyncio?
martinky24 3 days ago [-]
Did you read it the paper at all? For one, asyncio is primarily still single-thread, while this can scale with number of processes.
hanselot 3 days ago [-]
Is it just me or is the example they use for the locking extremely badly implemented?
Why would one ever result at that methodology?
rirze 3 days ago [-]
It's researchers trying to contrive an example for why their research effort deserves a budget every year.
Of course their example will be detached from reality. But it doesn't matter.
traderj0e 3 days ago [-]
The nested `with`s are weird, but otherwise what would you do differently? Seems like a standard pattern.
I still don't really see behaviors helping with this. Like yeah you avoid deadlocking, but now you're abstracting away mutexes :S
3 days ago [-]
krystalgamer 3 days ago [-]
the example is atrocious, seems like erlang actor model but for python.
pmontra 3 days ago [-]
It is Erlang inspired. They write
> One of the enabling technologies for BOC is Erlang-style send and selective receive.
And the example with match, receive, case is a few lines below. It's more or less what one would write in Erlang.
> In BoC, the equivalent of a message is received by multiple actors and operates with exclusive access to the message and all of the receivers.
(emphasis mine)
IIUC with actors, messages are processed by exactly one actor so it can be difficult to express transactions (e.g. transferring funds from A to B cannot be done atomically). Erlang somewhat fixes this with "selective receive" which re-introduces the possibility of deadlocks. BoC fixes both issues.
Why would one ever result at that methodology?
Of course their example will be detached from reality. But it doesn't matter.
I still don't really see behaviors helping with this. Like yeah you avoid deadlocking, but now you're abstracting away mutexes :S
> One of the enabling technologies for BOC is Erlang-style send and selective receive.
And the example with match, receive, case is a few lines below. It's more or less what one would write in Erlang.