Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 15 22:35
    Aaronontheweb commented #4032
  • Nov 15 20:26
    IgorFedchenko synchronize #4032
  • Nov 15 20:24
    IgorFedchenko commented #4032
  • Nov 15 20:06
    IgorFedchenko synchronize #4032
  • Nov 15 19:49
    IgorFedchenko synchronize #4032
  • Nov 15 19:32
    IgorFedchenko synchronize #4032
  • Nov 15 19:31
    IgorFedchenko commented #4032
  • Nov 15 18:49
    IgorFedchenko synchronize #4032
  • Nov 15 18:48
    IgorFedchenko synchronize #4032
  • Nov 15 18:47
    IgorFedchenko commented #4032
  • Nov 15 18:42
    IgorFedchenko commented #4032
  • Nov 15 18:41
    Aaronontheweb commented #4032
  • Nov 15 18:38
    IgorFedchenko commented #4032
  • Nov 15 18:37
    IgorFedchenko synchronize #4032
  • Nov 15 18:32
    IgorFedchenko commented #4032
  • Nov 15 18:30
    IgorFedchenko commented #4022
  • Nov 15 18:30
    IgorFedchenko synchronize #4022
  • Nov 15 18:26
    Aaronontheweb synchronize #4032
  • Nov 15 18:25
    dependabot-preview[bot] commented #4039
  • Nov 15 18:25

    dependabot-preview[bot] on nuget

    (compare)

Bartosz Sypytkowski
@Horusiath
@Zetanova the view side of persistence plugin is lacking some features. That's why it was obsoleted on the jvm side in favor of persistence queries (which we will probably done too, once streams and persistence query will be ported). Btw. this idea with using third mediator seems neat to overcome current limitations.
Zetanova
@Zetanova
@Horusiath readmodel generation is working good, the batching is easy and working well. The buffer of events will be flushed on MaxEventCount and Timeout in a single actor for each AR-type. The events are then grouped by Id and each group is processed by the normal Read-Modify-Update CRUD pattern.
triggered by a special event, I could send the readed read-model back to a requestor,
The other option would be the normal one that the client is generating the read-model internaly on client-side and sends only the create-command, without getting the model back.
but then there is a lag, where one client-component has the read-model and maybe an other need it to be created on the read-side (some query)
Zetanova
@Zetanova
It happens in the UI, after create of some entity the user is moved to the entity-list that need to be refreshed. Of course the possibilty is to inject the client-side created entity into the list, but the "server"-side sorting and paging will be broken
Chris Martin
@trbngr
hello, strangers!
Onam
@OnamChilwan
@Horusiath is it fair to say then it isn't possible to truly unit test an actor in isolation?
Bartosz Sypytkowski
@Horusiath
@OnamChilwan you could do so, ie. by passing children Props through actor's constructor (this is done in few cases) or as part of some message to be send at some point in time. But if those are making a solution too complex, then it's a warning, that maybe a hierarchy of actors should be changed or maybe they are so tightly coupled, that they should be tested as one.
Onam
@OnamChilwan
Yeah I was thinking that was one option however whilst I was doing this it felt wrong. Thanks for the info, it just seemed from the articles I've read seems a little misleading when they say unit testing
to11mtm
@to11mtm
I have a question regarding scheduling; If An actor is created, and hangs such that it never returns, will it 'lock' the thread on the thread-pool such that another thing cannot consume it?
Arjen Smits
@Danthar
@to11mtm you mean if it hangs while processing a message ?
If you block a receive handler. Then it will 'block' a thread on the threadpool. (if it will actually block/lock the thread that was running at that time, depends on your code ofcourse, if your doing async await things, it might not)
to11mtm
@to11mtm
@Danthar : public SampleDatabaseQueryActor()
{
Receive<IQueryParameters>(param => PerformQuery(param)); // If PerformQuery somehow has an internal deadlock.
}
Arjen Smits
@Danthar
ah yep that would do it
but if your doing a query, and it deadlocks, wont your dbdriver throw an exception of some kind ?
either way, there is no magic code in the Akka.Net dispatchers that prevents these kind of problems. It needs to adhere to the normal set of rules regarding the TPL like anything else.
Akka.net makes concurrency easier to implement, and prevents alot of the pitfalls that come with the territory. But its not perfect ;) (nothing is)
Christian Duhard
@cduhard
hmm is there a straight forward way to know when all watched children are stopped?
This feels kinda ugly while (Context.GetChildren().Any(x => x.GetType() == typeof (Account)))
to11mtm
@to11mtm
Truth!
Is there a good way to 'monitor' for a deadlock in cases like this? Perhaps configuring the dispatcher's deadlines
Bartosz Sypytkowski
@Horusiath
@cduhard Context.Watch?
Christian Duhard
@cduhard
they are watched
Bartosz Sypytkowski
@Horusiath
you can create counter to increment once child of specific type is created, and decrement it on Terminated
Christian Duhard
@cduhard
yeah, that's an option. what I would like to do is implement sagas like you did in your latest Cqrs app
then I wouldn't have this complex graceful shutdown problem
Bartosz Sypytkowski
@Horusiath
"someday" I will find time to finish it
Christian Duhard
@cduhard
thats what's making this harder than it should be. i have to wait for sagas to playout inside my aggregates
i have to cut off incoming messages and lets everything passivate, it shouldn't be hard but it is tricky to keep it simple and foolproof
Christian Duhard
@cduhard
@Horusiath "someday" soon I hope
Bartosz Sypytkowski
@Horusiath
there is a huge load of stuff to finish, but I hardly have any time to work on akka from over a month
Christian Duhard
@cduhard
job getting in the way?
Bartosz Sypytkowski
@Horusiath
yes. Well, at least it's interesting
Alex Valuyskiy
@alexvaluyskiy
This message was deleted

@Horusiath, I've been trying Akka.Streams, and I have couple of questions. For example I have this Scala code

  override def eventsByTag(tag: String, offset: Long = 0L): Source[EventEnvelope, NotUsed] = {
    Source.actorPublisher[EventEnvelope](EventsByTagPublisher.props(tag, offset, Long.MaxValue,
      refreshInterval, maxBufSize, writeJournalPluginId)).mapMaterializedValue(_ ⇒ NotUsed)
      .named("eventsByTag-" + URLEncoder.encode(tag, ByteString.UTF_8))
  }

1) What should I use, instead of NotUsed? Unit/Unit.Instanse or something else?
2) I should return Source<EventEnvelope, Unit>, but method "Named" returns IGraph<SourceShape<EventEnvelope>, NotUsed>. How to convert SourceShape<T> to T?

Marc Piechura
@marcpiechura
@alexvaluyskiy yep we are using Unit as NotUsed
2 Use Source.FromGraph to cast the graph back into a source
Kris Schepers
@schepersk
@Horusiath Playing with Sharding, I just encountered the following: 2 nodes up, both hosting a region, both processing shard messages. One node leaves cluster, after a few seconds I restart it, it joins the cluster again, but it doesn't receive any shards. The node that didn't shut down keeps on processing all the messages for the entities. So it seems the rebalancing of the shards to the rebooted region doesn't happen?
Bartosz Sypytkowski
@Horusiath
@schepersk rebalancing check is triggered after X seconds, and some specific threshold needs to be reached in order to start rebalancing
in case when the difference between number of shards on two machines is too small
Kris Schepers
@schepersk
10 shards, 2 nodes in my case?
Bartosz Sypytkowski
@Horusiath
also: are you sure, that your cluster node really rejoined?
Kris Schepers
@schepersk
from what I can see in the logging, yes.
Bartosz Sypytkowski
@Horusiath
can you extract some example to reproduce from that?
This is the sample I'm working on..
Bartosz Sypytkowski
@Horusiath
@schepersk I'll managed to run your example, but to verify it, I'll need to find some spare time. Sorry, but it may take a while to find a reason for this. I'll take a look into it after work
Kris Schepers
@schepersk
@Horusiath But you are seeing the same behavior? Thanks for looking into this..
Nicolas Bourbaki
@b0urb4k1
How lightweight are agents?