Hello! I am very interested in thespian as the most suitable solution for the actor model which I want to use in framework which I'm developing now.
So the story is I like to make chat bots. And basically I design telegram bots. In an attempt to
accumulate my knowledge about bot development, I decided to develop high level actor model bot library. There are actually some good bot libs in python for telegram bots, but they're kinda low-level, the engine is just an event loop that scatter incoming updates on handlers
I want to develop a framework where you just set up action->state->trigger flow. Now I roughly imagine architecture like this:
There are Sessions, it’s basically linked to a chat/user, which is a way of storing current state and saying what to do next. Bunch of Sessions is combined into Worker, which is Actor with it's own eventloop. Also somewhere where is a HttpServer Actor that receives messages asynchronously and sends them (via ActorSystem) to the Workers with appropriate session. So Worker is just picking right session, session says which coroutine should be applied to this message, and this coroutine passed to eventloop.
So the question is, is there any potential problems with this design, is it good idea that each Worker-Actor will have it’s own eventloop for asyncio? I see no problems with it, but if someone has already done this, I would be very glad to take a look. Also besides the standard asyncio eventloop there is a faster uvloop, so I just specify that I will most likely use it instead.
And finally, the fact that you support this framework is very cool, I think that thespian attracted me so much because of the good support.
--
You received this message because you are subscribed to the Google Groups "thespian.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thespianpy+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thespianpy/6a6e5398-cc3e-40fa-8b08-71b70f16f62e%40googlegroups.com.