The thing I want to define with behaviours is observable effects on objects.
Such as interactions between tasks and objects between them. Not necessarily method calls but state interactions across multiple objects.
Some objects should be colocated on threads and send behaviours to arbitrary groups of objects. Think of it as a collection that responds to events.
I wrote a state machine serialization that looks like this. This defined a state progression between threads and async/await state machine.
I think organised state machines would mean actor programming is so much easier to program.
next_free_thread = 2 task(A) thread(1) assignment(A, 1) = running_on(A, 1) | paused(A, 1) running_on(A, 1) thread(1) assignment(A, 1) thread_free(next_free_thread) = fork(A, B) | send_task_to_thread(B, next_free_thread) | running_on(B, 2) paused(B, 1) running_on(A, 1) | { yield(B, returnvalue) | paused(B, 2) } { await(A, B, returnvalue) | paused(A, 1) } | send_returnvalue(B, A, returnvalue)
The thing I want to define with behaviours is observable effects on objects.
Such as interactions between tasks and objects between them. Not necessarily method calls but state interactions across multiple objects.
Some objects should be colocated on threads and send behaviours to arbitrary groups of objects. Think of it as a collection that responds to events.
I wrote a state machine serialization that looks like this. This defined a state progression between threads and async/await state machine.
I think organised state machines would mean actor programming is so much easier to program.
I think this serialization is truly powerful and easy to understand.