Discussion forum for David Beazley

Review of an actor based system


#1

I have been playing with a concept of Actor driven systems. Each actor gets a curio Queue for receiving messages, and runs CPU bound operations using the process or thread executors. This creates a rather handy detachment meaning that state even sent isn’t shared when using the process executor.

Firstly, would it be possible for curio to pre-spin some processes ahead of time to cut down on the cost of spawning one at call time.

Secondly, is a system such as this practical?

https://gist.github.com/jkbbwr/60fadde2fcf52305d404018ac4d54993
Is some example code I have been toying with.

Any and all input will be greatly noted.


#2

Hi Jakob/

Have you worked more with this example?

You are welcome to have a look at PyWORK (https://github.com/pylots/pyworks). It is pre async/await, curio and asyncio but I have been thinking of putting curio “beneath” it.

br
/Rene


#3

I ended up writing a more full actor based framework using curio.


#4

@jkbbwr I was wondering if you are thinking about opening up the framework, Ive been super curious into looking into something exactly like that using curio.