Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Microsoft.Extensions.Depen… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3989
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump ApiApprover from 3.0.1 to … (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3992
  • Oct 19 13:34
    dependabot-preview[bot] edited #3993
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3985
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump System.Reflection.Emit fro… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3986
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3983
nathvi
@nathvi
So I have the following pattern. Please let me know if it makes sense. I have a TeacherActor and a TeachersAssistentActor. The TeacherActor creates the TeachersAssistentActor as a child. Whenever the TeacherActor receives a message of type "BoringWorkMessage", it forwards it onto the TeachersAssistent. When the TeachersAssistent gets the BoringWorkMessage, there is a certain probability that the work is too boring, and the TeachersAssistent commits suicide by throwing an exception. The teacher can restart the TeachersAssistent via a SupervisorStragegy
Jesse Connor
@jesseconnr
@nathvi sounds correct to me, I do the same setup, just with different naming, OrderRouter starts all OrderActors and when they die for whatever reason it starts them back up. You may want to read up on the PreStart, PreRestart and PostRestart events that affect that behavior as well.
Ex. by default if the TeacherActor decides the work is so boring that it decides to commit suicide even before forwarding the message to an assistant, the PreRestart event will restart all children.
nathvi
@nathvi
@jesseconnr , generally you want to push dangerous work to children, correct?
Jessie Wadman
@JessieWadman

I'm curious to know what indexing patterns people are using for persistent, remembered, sharded entities, when you need to lookup/address them by something other than the entity ID. Since shards can migrate between nodes, there's always a chance that a shard is currently "offline", so broadcasting/aggregating cant' always be consistent (i.e. while a shard is starting up on a node and loading all entities, those entities won't respond to the broadcast). Consider you have an entity called Contact, with it's ContactID, and you want to find all contacts with a specific phone number. You could of course map the index in a SQL table or something, and do the lookup there. But I'd like to avoid a database roundtrip if possible. Currently I'm using a secondary sharded entity whose entity ID is the "indexed" field, that does nothing other than rewrap the message with the now-known actual EntityID and forward it to its counterpart. It works well, but if you index 4-5 fields, for 100K entities, then you suddenly have 500K-600K entities that a cluster needs to fetch from the event journal on startup (instead of just the 100K), which slows down the startup significantly (lots of DB roundtrips). I've experimented with a cluster singleton that keeps track of indexes, and whenever entities are recovered/altered, they notify the singleton. It works great when the cluster is up and running, and it's fast, but when booting up, lookups return false negatives because the shard hasn't loaded yet and the entities haven't registered. So, I'm curious to know what solutions other people have found for this type of scenario. Are all the cool kids using doing this outside of Akka with SQL tables or similar?

I also considered using singleton with the broadcast/aggregate pattern against the entities, and hook into the cluster node and sharding lifecycle messages to keep track of when "partitions" are online or offline, and buffer broadcasting whenever one of the shards is offline, but that hits pretty hard against "availability" metric.

Onur Gumus
@OnurGumus
image.png
Hey guys, I am playing with intellitrace support of akka messages
How do you like it?
Aaron Stannard
@Aaronontheweb
@nathvi DotNetty powers the Azure IoT hub
and it's a port of Netty, which is itself very highly battle tested
DotNetty could afford to be more robust in the QA department though
Bartosz Sypytkowski
@Horusiath
@JessieWadman at this moment there's no build in support for sharded entities querying mechanics. It's possible to build one either using event journals with live queries, or distributed data.
ShalokShalom
@ShalokShalom
Akka uses pure cooperative objects on OS threads, thus it can be locked down. In addition a fault in any of the actors can bring down the entire CLR pretty easily. Correct?
Bartosz Sypytkowski
@Horusiath
@ShalokShalom not any kind of faults - as standard exceptions inside actors are catched and supervised - but the critical faults of .NET environment can (i.e. out of memory exception), simply because some failures in .NET cannot be revoked.
ShalokShalom
@ShalokShalom
Yes
Thanks a lot :D
ShalokShalom
@ShalokShalom
Can a rewrite of the CLR itself in Akka help?
Bartosz Sypytkowski
@Horusiath
no, akka is only a library on top of CLR not a platform on itself. Some platforms like Erlang or Pony have isolated memory model that provide a higher degree of safety in terms of VM-wide failures.
AltcoinsBattle
@AltcoinsBattle_twitter
Journal
    .EventsByPersistenceId(inventoryName, ++inventoryOffset, long.MaxValue)
    .RunForeach(HandleCharactersEvent, Materializer);

Journal
    .EventsByPersistenceId(descriptorItemsName, ++descriptorOffset, long.MaxValue)
    .RunForeach(HandleCharacterDescriptionEvent, Materializer);
Does Akka guarantee that this code will process one message at a time?
It is probably the VS debugger, but it shows the two Handle methods invoked in parallel
I see some bug in my code (from client side) and cannot catch it, looks like can be related to multithreading, that is why I'm asking :)
Marc Piechura
@marcpiechura
RunForeach isn’t blocking, it returns a Task I think which you can await before running the second loop
Since persistence query is based on Akka.Streams you’re ending up with two actors under the hood which run the two queries in parallel
AltcoinsBattle
@AltcoinsBattle_twitter
thank you! will try with await)
AltcoinsBattle
@AltcoinsBattle_twitter
rewritten, at least it behaves the same as before, hope I will never see the previously mentioned bug again ;-)
@marcpiechura :+1:
Marc Piechura
@marcpiechura

You could also handle it differently if that would help:

Return NotUsed.Instance from your handle methods

source1 = Journal.ByInventory.Select(Handle)

source2 = Journal.ByDescription.Select(Handle)

source1.Concat(source2).RunForeach(Sink.Ignore<NotUsed>())

nbparrell
@nbparrell

Hey guys, I am having trouble using the ActorSelection method. I have just modified the helloakka.cs in the examples to test out some of the funcitonality of the akka system and was looking that the ActorSelection method. I am running into an error when running the code:
[INFO][4/7/2018 3:21:14 PM][Thread 0003][akka://MySystem/deadLetters] Message Greet from akka://MySystem/deadLetters to akka://MySystem/deadLetters was not delivered. 1 dead letters encountered.

I think it is because of how I maybe writing the path for the actor.

code is here:
        var system = ActorSystem.Create("MySystem");
        var greeter = system.ActorOf<GreetingActor>("greeter");
        var greater = system.ActorOf<ActorGreeting>("greater");

        // send a message to the actor
        greeter.Tell(new Greet("World"));
        greeter.Tell(new Greet("Nick"));
        //greater.Tell(new Freak("Fish"));

        system.ActorSelection("akka://system/user/*er").Tell(new Greet("I am greeter"));
Marc Piechura
@marcpiechura
@nbparrel Try “akka://MySystem/user/*er”
nbparrell
@nbparrell
That worked. Thanks :). Is MySystem the root for every compilation of akka.net or is it set by user at some point?
Marc Piechura
@marcpiechura
Look at your first line a little bit closer 😜
Arsene T. Gandote
@Tochemey
Hello
nbparrell
@nbparrell
@marcpiechura Lol the perils of being new thanks for pointing that out. Makes more sense.
AltcoinsBattle
@AltcoinsBattle_twitter
@marcpiechura rewritten, with your second approach -> that works :) Await doesn't solve the issue .. The idea, if I have multiple sources : first of all I merge these sources (concat doesn't work), and then use ForEach with one method that processes all the different events that I interesting in! Thank you)
nathvi
@nathvi
Is it possible to send an Actor A from windows service S1 to windows service S2, and have that actor A be persisted when S2 is restarted.
?
I'm trying to come up with a good way to make a bunch of "dumb" service clients that pull their actors from some sort of actor registry.
Nick Polyderopoulos
@NickPolyder
Hello,
Is there somewhere a list with the currently available plugins for akka.net (For Example Persistence Plugins that were created by the community) ?
Aaron Stannard
@Aaronontheweb
@NickPolyder not in our docs
that'd be a good thing to add though
we do have AkkaNetContrib: https://github.com/akkanetcontrib
which has some
Nick Polyderopoulos
@NickPolyder
Yeap. It could at least have a list that are inside the core project. (For example i see that the core project has the Persistance for the SqlServer and Sqlite )
Havret
@Havret
How can I test PersistentFSM? Can I initialize it in specific state or feed it with specific evens as a part of my "arrange" test phase?
Lutando Ngqakaza
@Lutando

quick question

        // Parameters:
        //   handler:
        //     The message handler that is invoked for incoming messages of the specified type
        //     T. It should return trueif it handled/matched the message; false otherwise.

for

        protected void Receive<T>(Func<T, bool> handler);

if handler return false will the receive actor try to use another handler (down the list) if it matches the type?

Stijn Herreman
@stijnherreman
I'm about to attempt running Akka.NET in Azure Service Fabric, as a guest executable. Is it straightforward or will I run into some obstacles?
Arjen Smits
@Danthar
@stijnherreman if your not using remoting, should be straight forward.
Stijn Herreman
@stijnherreman
I am using remoting actually
still reading all the docs about service fabric, so haven't tried anything yet
nbparrell
@nbparrell
@marcpiechura Do you know what flavor of regex Akka.net is using?