Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 28 23:19
    dnfadmin commented #6841
  • May 28 16:38
    msftbot[bot] labeled #7762
  • May 28 16:38
    jan-johansson-mr opened #7762
  • May 28 10:36
    ElanHasson synchronize #7603
  • May 28 08:18
  • May 28 05:04
    manojbaishya starred dotnet/orleans
  • May 28 01:35
    dnfadmin commented #6967
  • May 27 17:20
    ReubenBond closed #7760
  • May 27 17:20
    ReubenBond commented #7760
  • May 27 17:19

    ReubenBond on main

    Update hello word sample to .Ne… (compare)

  • May 27 17:19
    ReubenBond closed #7761
  • May 27 17:19
    ReubenBond commented #7761
  • May 27 17:06
    behroozbc starred dotnet/orleans
  • May 27 16:59
    msftbot[bot] edited #7761
  • May 27 16:59
    behroozbc opened #7761
  • May 27 16:57
    msftbot[bot] labeled #7760
  • May 27 16:57
    behroozbc opened #7760
  • May 27 16:35
  • May 27 15:56
    ReubenBond synchronize #7603
  • May 27 14:00
    jonathan-hicks-sf starred dotnet/orleans
GiaNguyenLe
@GiaNguyenLe
Hi @ReubenBond I will try with ConfigureEndpoints but quite confuse about siloPort and gatewayPort value.
In the config server section which following https://dotnet.github.io/orleans/docs/host/configuration_guide/server_configuration.html
The siloPort value is 11111 and gatewayPort is 30000. Can I apply both value in my situation or I need to use another value?
And What happen if the siloPort and gatewayPort value is use by another process?
Arash Aghlara
@aghlara_twitter
Hi @ReubenBond, my team wants to migrate an existing distributed job (batch and on-the-fly) execution project to Orlean, who can give us a consultation?
SebasWW
@SebasWW
hi! where can I read how Orleans understands which silo the grain is on?
Reuben Bond
@ReubenBond
@aghlara_twitter there are people in the community. The best place to ask is the discord server: https://aka.ms/orleans-discord
@GiaNguyenLe you want the ports to be available. If they're in use then the process wont be able to start
@SebasWW Orleans uses a grain directory to find grains. There is some explanation in this video: https://www.youtube.com/watch?v=R0ODfwU6MzQ&t=866s
Markus Mayer
@sunsided
Hi folks! I'm looking for some advice on long-running, yet fine-grained (no pun intended) operations within a Grain. Imagine a data migration task where a million documents / rows from one data source need to be loaded, converted, and stored to another database. Ignoring failover concerns, is it okay to just have a loop like that within a Grain method?
Reuben Bond
@ReubenBond
I'd probably use a reminder and do it in the background, @sunsided. This SO answer demonstrates a long-running background process which is resilient to machine failures: https://stackoverflow.com/questions/71065057/is-orleans-reminder-execution-interleaved/71068896#71068896
1 reply
In the case of millions of docs/rows, assuming that takes a significant amount of time, you may want to store progress somewhere so that you can resume from a recent checkpoint
Markus Mayer
@sunsided
@ReubenBond Thanks! I did look into Reminders but was a little hesitant because of the "associated with a grain, not any specific activation" notion mentioned in the docs. I assume this just means that any Grain that sets a reminder of a specific name will be woken up? (But it's still tied to the specific instance, i.e. there's not going to be a zero-keyed Grain instance after a wake-up event?)
Reuben Bond
@ReubenBond
Yes, so if you have a grain "my-worker/1234", and it sets a reminder, then when the reminder fires, Orleans will find that grain and wake it up. If it's currently active, it will just tell it the reminder fired, but otherwise it will find a place in the cluster to activate it, activate it, and then tell it its reminder has fired
Markus Mayer
@sunsided
Perfect!
Thanks a million!
Reuben Bond
@ReubenBond
Any time

Reminder: we are on Discord now: https://aka.ms/orleans-discord

Özgür Deniz Günseli
@ozgurgunseli_twitter
Hello folk, We are looking for a consultant to consider our production plans with Orleans works with Kubernetes, who has already run and manage mission-critical system on Kubernetes with using Orleans. Is there any other special community for this type of needs or can someone who has the required skills contact with me directly here?
Phí Văn Lời
@phivanloi
hi pro
Alexander-Bartosh
@Alexander-Bartosh

Hello Orleans community!

I was trying to implement graceful shutdown for grains when shutting down silo
I was not able to find any description of what the procedure of graceful silo shutdown is and how one can implement graceful shutdown/cancelation for activated/running grains.
Most likely I have missed it. Could somebody point me to where I can find the information on:

  1. General description of graceful Silo shutdown procedure
  2. From 1 it should be clear what are the guaranties for running/activated grains and how they can participate in graceful silo shutdown

Thank you!

Alexander-Bartosh
@Alexander-Bartosh
e.g. is there a way to make sure that the finally code is always called in a grain:
try
{
await Task.Delay(1000);
}
finally
{
finally code
}
Alexander-Bartosh
@Alexander-Bartosh
@ReubenBond Maybe you can help me with the question ?
Reuben Bond
@ReubenBond
@Alexander-Bartosh the finally code will always be called, whether in a gain or not. Unless, of course, the process crashes or the code in the try section deadlocks indefinitely
Please note that we use Discord now: https://aka.ms/orleans-discord
Alexander-Bartosh
@Alexander-Bartosh
@ReubenBond Would be nice if you look at the first question. That sets the context for the second one.
Reuben Bond
@ReubenBond
Orleans tries to deactivate all of your grains while shutting down
If they take too long (determined by the cancellation token passed by the host, which is configured via HostOptions.ShutdownTimeout when using the .NET Generic Host), then it stops waiting and promptly terminates
Alexander-Bartosh
@Alexander-Bartosh
I do observe different behavior when performing a rolling update on 3 silos : the finally code is not called and OnDeactivateAsync is called
Reuben Bond
@ReubenBond
However, if it keeps running, the finally will always be called (i.e, your method will never terminate part-way through unless the process exits)
No system should require graceful shutdown to work correctly, since no system can guarantee that shutdown occurs gracefully
Alexander-Bartosh
@Alexander-Bartosh
But it is possible that OnDeactivateAsync will be called before ?
And if the finally code call a grain than that Message - will not be delivered, right?
In essence the question is the first one - how to gracefully shutdown (including communication to grains)
Alexander-Bartosh
@Alexander-Bartosh
Will increase ShutdownTimeout. Thx on that!
And is there a cancelation token that can be used to start possibly long operations (Like a service shutdown token )
I see that Stop creates CTS .. thus most likely not.
Alexander-Bartosh
@Alexander-Bartosh
Could you please point out to a direction of implementing a cluster level Semaphore
Thank you for your answers @ReubenBond
Reuben Bond
@ReubenBond
Could you clarify what you mean by a cluster-level semaphore?
Alexander-Bartosh
@Alexander-Bartosh
E.g To limit number of concurrently active requests to a remote service
For all the grains that are using the service
Reuben Bond
@ReubenBond
You could forward all requests through a grain or set of N grains
A strict distributed semaphore would be expensive to implement
Especially if it needs to also be fault tolerant. I would opt for a simpler approach unless you need some precise semantics
Alexander-Bartosh
@Alexander-Bartosh
Thus a [reentrant] grain with a regular semaphore
OK thx will try
This approach does need all the requests/response data to be sent around the cluster ... which is might be considerable downside to some use-cases.
Joep van Diessen
@joepvand
Does anyone have experience with hosting orleans in k8s? with a seperate client and Silo project.I just cant figure it out
Reuben Bond
@ReubenBond

Reminder: we are on Discord now: https://aka.ms/orleans-discord

@joepvand yes, it's doable. What kind of clustering provider are you using? Best to discuss on discord
johnenginelab
@johnenginelab
Hi, I am looking for 2-3 C# engineers with experience in Orleans to help me with my project. Good rates and 6-12 months of work. Can anybody point me in the right direction?
Vincent
@vincent:librem.one
[m]
Here is a good place, do you have more info?
johnenginelab
@johnenginelab
It's a crypto project Vincent. Is there a way to PM so i can give you more details?
erikljung
@erikljung
Saw that @sergeybykov said the following "Calls (including stream events) to non-reentrant grains should not interleave. Timer callback are the only exception, a bug that became a feature over tme." You could use this.GetStreamProvider(..).GetStream<T>(id, namespace)from within a grain, but you could as well use IClusterClient.GetStreamProvider(..).GetStream(id, namespace). What is it that defines that the stream is coupled to the grain, because it seems like the two options does more or less the same thing, but the second doesn't necessarily seemed tied to the grain (if it's not done through the streamId). Please advice me.
erikljung
@erikljung
Resolving both of these stream providers from within a grain gives me the same provider instance.
erikljung
@erikljung
Or is it based on whether the method passed to stream.SubscribeAsync(someMethod) is a grain method? If so, does the grain method needs to be part of the grain interface or could it just be any method (even private) on the grain?