_croqueteer_
05/02/2024, 10:54 AM_ = Task.Run(async () =>{}); to offload the work to the threadpool?
And upon completion of the task, call another PlayerAction that uses the Client listener interface to inform the client about the result.
I also saw that there was MetaRequest/MetaResponse in the code to query the server. But as this targets the SessionActor, I guess it is not appropriate to use if it involves updating ServerOnly fields on the Player?
I was looking for more information regarding the MetaRequest/MetaResponse but couldn't find anything in the documentation.
Any help to shed to some light on what would be the best way to handle this would be very appreciated!
Many thanksHenri
05/03/2024, 7:46 AMContinueTaskOnActorContext(Task.Run(() => MyComputeHeavyTask(param)), result => {}, failure => {})
And yes, upon completion, you can issue a server action to update the results. Client can either react via Client Listener, or depending on the type of the action, the client can poll the result state. For example, there could be a "mailbox"-kind [MetaMemember(123)] MyResultType PendingOperationResult = null; in PlayerActor and then the serveraction would update this. Then the client observe the field being set, and use another action to clear the field. The benefit of this polling is that even if the session is lost during the action, the client will see the action results upon next session start. The downside is the complexity.
To avoid having to build a custom mailbox, you can also use the mail system to communicate mail-like content to the client. The downside here is that it may complicate your mail management.
As you've seen MetaRequest/MetaResponse does not yet support communicating with Players. The implementation is a work-in-progress and not used in public samples. The intent is to extend and then document the mechanism and provide samples for it, but the schedule for this is currently uncertain._croqueteer_
05/03/2024, 9:17 AMContinueTaskOnActorContext. Will change my implementation to use this 👍