Thespian_StatusReq

12 views
Skip to first unread message

Ferd Barfarkle

unread,
Feb 16, 2021, 8:38:06 PM2/16/21
to thespian.py
I have a problem with synchronizing a backend system using thespian with a Qt based UI operating asynchronously from the backend (once the UI has launched the backend). Right now every now and again the UI will crash with an exception on an unavailable actor.

In the UI there is only a handle to the ActorSystem and one Actor. The problem is knowing when this actor is available, and since there is no way to query its status (it's not up yet), another way would be to query the ActorSystem with a Thespian_StatusReq described in the 'using' doc. I am assuming it would return the status of all available Actors??

Except, I found no way of sending anything to the ActorSystem (just to Actors). What am I missing here? Is this feature even supported?

Kevin Quick

unread,
Feb 16, 2021, 9:22:30 PM2/16/21
to Ferd Barfarkle, thespian.py
I'm not sure I understand the failure mechanics.  In Thespian, the only way to get an actor address (from either an Actor or an external component talking to the ActorSystem) is via a `createActor` call, and any `send` or `ask` operations to that `createActor` before it has been created should be queued and sent once the Actor is running.  Can you elaborate a little on the specifics of what is happening and where the error is coming from?

There is no way to send anything to the ActorSystem itself because the details of the system is implementation-specific so the only way to interact with it is via the ActorSystem API.  A Thespian_StatusReq would be sent to the Actor you are wanting the status of anyhow and just return status information for that Actor (with references to its children so you could separately query them), so that doesn't provide the information you are looking for.

-Kevin


--
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/d78b658b-3c87-4be8-adec-8a5a1888f1a0n%40googlegroups.com.


--
-KQ

Ferd Barfarkle

unread,
Feb 17, 2021, 8:49:58 AM2/17/21
to thespian.py
The creation of the backend happens in a separate thread from the main GUI thread in order to provide a responsive system. The GUI may provide access to the backend service before the initialization thread has had a chance to entirely finish its work. Most of the time this is not a problem. Sometimes access is too early and the Actor has not even been created - so, as I said, nothing to send status query messages to. There's an easy fix to check for this - I was just curious what facilities thespian provided for programmatic admin access - and looks like it has to be a roll-your-own solution. Thanks for your answer...
Reply all
Reply to author
Forward
0 new messages