Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 21:00
    dependabot-preview[bot] synchronize #3986
  • 21:00

    dependabot-preview[bot] on nuget

    Bump NUnit from 3.6.1 to 3.12.0… (compare)

  • 21:00
    dependabot-preview[bot] synchronize #3985
  • 21:00

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • 21:00
    dependabot-preview[bot] synchronize #3983
  • 21:00

    dependabot-preview[bot] on nuget

    Bump ApprovalUtilities from 3.0… (compare)

  • 21:00
    dependabot-preview[bot] edited #3985
  • 21:00
    dependabot-preview[bot] edited #3986
  • 21:00
    dependabot-preview[bot] synchronize #3982
  • 21:00
    dependabot-preview[bot] synchronize #3987
  • 21:00

    dependabot-preview[bot] on nuget

    Bump FsPickler from 5.2.0 to 5.… (compare)

  • 21:00

    dependabot-preview[bot] on nuget

    Bump LightningDB from 0.9.8 to … (compare)

  • 21:00
    dependabot-preview[bot] edited #3982
  • 21:00
    dependabot-preview[bot] edited #3983
  • 21:00
    dependabot-preview[bot] edited #3987
  • 20:59
    dependabot-preview[bot] edited #3982
  • 20:59
    dependabot-preview[bot] edited #3985
  • 20:59
    dependabot-preview[bot] edited #3987
  • 20:59
    dependabot-preview[bot] edited #3986
  • 20:59
    dependabot-preview[bot] edited #3983
to11mtm
@to11mtm
@Horusiath : Wasn't the expectation that things would be moving to 'Wire'? Or has that changed?
Bartosz Sypytkowski
@Horusiath
@to11mtm yes, that's the plan
Christian Duhard
@cduhard
@Horusiath The AggregateCoordinator maintains many worker routers that are used by th persistent actors. They can't be stopped until all are passivated
to11mtm
@to11mtm
Would that be a fairly safe way to go as far as if our team was planning on setting up persistence now?
Christian Duhard
@cduhard
@Horusiath i need to order the shutdown -> PersistentActors -> All Other Children (can be in parallel)
i suppose I could start a timer when the Coordinator receives the Shutdown which is what the silly thread.sleep us trying to accomplish
Become(ShuttingDown) -> fire up timer, handle the timer message -> check for PersistentActors status, then shutdown remaining worker children
Bartosz Sypytkowski
@Horusiath
@to11mtm in general you should never allow third party library tell you what format it will use to store your data. What if something changes or you'll need to migrate your data to another solution? You should either specify message format by yourself or have some migration path for it - if I'm right after 1.5 we'll switch to Wire, but still you'll be able to use json.net serializer as an alternative, you'll just need to specify it explicitly. Also we'll probably provide some tips about how to write format migration scenarios.
Christian Duhard
@cduhard
i think that will work. see any flaws?
Bartosz Sypytkowski
@Horusiath
@cduhard what do you need timer for?
Christian Duhard
@cduhard
to check for non-terminated persistent actors
i can't complete the shutdown until they are all passivated
Bartosz Sypytkowski
@Horusiath
this is something, you should be able to use poisonpill + terminated watch guard for
Christian Duhard
@cduhard
i don't see how
an external shutdown gets triggered, Coordinator receives and waits for passivation of all PA children. once they are all terminated shutdown of supporting worker children can commence
its the waiting part that requires the timer
i can't use a poisonpill because I can't shutdown a PA that way
there are non-persistent sagas in progress
so i can just wait for all to passivate
if I had your cool persistent sagas in your new cluster sharding sample app, I could just poisonpill the lot and move on
Christian Duhard
@cduhard
the current passivation timer waits for those sagas to play out, e.g skips passivation if there are any in progress
Bartosz Sypytkowski
@Horusiath
then you can create your custom PoisonPill equivalent, that can be rejected or delayed due to saga being in progress
Christian Duhard
@cduhard
but then I still have to wait
I don't need to build that because I can just wait for them to passivate. there are no new messages coming in. the shutdown has cut that off further up the hierarchy
Bartosz Sypytkowski
@Horusiath
you can wait for termination
Christian Duhard
@cduhard
yes, I need to know when all are terminated
so i can move forward
a timer is just as easy as trying to keep track of what's alive etc
not as precise, but far less complex
if i were to cluster & shard this I would do this in a more robust way
am I making sense?
Bartosz Sypytkowski
@Horusiath
why you thing that handling Terminated is more complex?
Christian Duhard
@cduhard
there is a disconnect here
i need to know when all of them are terminated
i can't do anything until that happems
*happens
they terminate without the app being in shutdown
Bartosz Sypytkowski
@Horusiath
...
  // normal receive
  message.Match()
  .With<Shutdown>(shutdown =>{
    var accounts = Context.GetChildren().Select(aref => aref.Path.Name.Contains("account")).ToArray();
    foreach(var account in accounts) account.Tell(shutdown);
    Become(WaitingForTermination(accounts.Length))
  });
}

public Receive WaitingForTermination(int counter) {
  var remaining = counter;
  return message => message.Match()
    .With<Terminated>(terminated => {
        if(terminated.ActorRef.Path.Name.Contains("account"))
          remaining--;
        if(remaining == 0)
          AllAccountsTerminated();
    })
    .WasHandled;
}
Christian Duhard
@cduhard
yeah, we were almost identical except I would just poll which is shite, but i was ok with it. My solution requires no changes to the Persistent actor with the down side of a timer
@Horusiath thanks a lot though. I am the only one doing message based work here, I have no one to bounce this stuff off of
Bartosz Sypytkowski
@Horusiath
no problem :)
Christian Duhard
@cduhard
do you have tests for that code?
j/k ;)
@Horusiath regarding your sharding persistence app, the intention is for you sagas to continue on restart correct?
Bartosz Sypytkowski
@Horusiath
at some point, once it will be finished
Christian Duhard
@cduhard
that's cool, i wanted to do that, but didn't have the time to reason through it. your sample makes it straightforward
Bartosz Sypytkowski
@Horusiath
sagas are hard once you apply "what if something will crash at any point in time" approach
Christian Duhard
@cduhard
yes they are, that's where I said, maybe later
can I use become from ActorBase?
Bartosz Sypytkowski
@Horusiath
yes