You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q1: Can entity operations call await such as await HttpClient.GetAsync(...)?
I would imagine this is not a good idea as all entity operations are executed on the same VM, they do not scale out, and the awaited tasks will be executed on the same VM so scale will be limited to the single VM's capability.
I tried calling await HTTPClient.GetAsync in an entity operation. The call went okay, but after the call when Entity.Current.SignalEntity(Entity.Current.EntityId, utctime, "opname") was called, there was an Exception - InvalidOperation from the durable extension due to the SignalEntity being called from a different thread.
Q2: From the above, as the operation resumes in a different thread after await, does this mean the serial execution promise of the actor model gets broken if await is called in an entity operation? i.e. does the worker start working on the next operation for the entity without waiting for the previous operation to complete?
Q3: Is there a way to trigger activity functions directly from an entity operation?
I currently have to trigger an orchestrator using Entity.Current.StartNewOrchestration to further trigger an activity function.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Q1: Can entity operations call await such as await HttpClient.GetAsync(...)?
I would imagine this is not a good idea as all entity operations are executed on the same VM, they do not scale out, and the awaited tasks will be executed on the same VM so scale will be limited to the single VM's capability.
I tried calling await HTTPClient.GetAsync in an entity operation. The call went okay, but after the call when Entity.Current.SignalEntity(Entity.Current.EntityId, utctime, "opname") was called, there was an Exception - InvalidOperation from the durable extension due to the SignalEntity being called from a different thread.
Q2: From the above, as the operation resumes in a different thread after await, does this mean the serial execution promise of the actor model gets broken if await is called in an entity operation? i.e. does the worker start working on the next operation for the entity without waiting for the previous operation to complete?
Q3: Is there a way to trigger activity functions directly from an entity operation?
I currently have to trigger an orchestrator using Entity.Current.StartNewOrchestration to further trigger an activity function.
Beta Was this translation helpful? Give feedback.
All reactions