Local non-reentrant calls in a grain #8794
Unanswered
tomachristian
asked this question in
Q&A
Replies: 1 comment
-
According to https://learn.microsoft.com/en-us/dotnet/orleans/grains/external-tasks-and-grains#taskfactorystartnew-and-async-delegates (which is a new doc after this question was asked), to start async worker task while respecting turn-based concurrency guarantees, one should use:
However, in the case of this question, we want
... it should be fine to use:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all! Right off the bat, the title is not the best one to describe this, so here we go:
Is there any way for a grain activation to schedule/queue calls/requests/messages to itself in a one-way style that also respect the reentrancy rules of the grain?
Our grain is currently implementing an interface which is specific for this use case, it has a single method annotated as OneWay. The grain uses the
this.AsReference<IPrivate>().SomeMethod().Ignore()
to achieve this effect.The problem we have with this approach is that we need to create this additional interface. Also, another issue is that these calls could get sent to a different activation of the grain in case the original one got deactivated; we'd like to avoid this and not have to deal with this scenario.
We have also looked into the inner workings of the WorkItemGroup and ActivationTaskScheduler, but given there is not much documentation on these two and because they are internal, we couldn't figure out a way to schedule such a "work item" (?) from inside the grain.
The terminology I'm using here might be wrong in some cases, but lets start the discussion and I can fix the original description of the problem with your help.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions