Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:49
    IgorFedchenko commented #4085
  • 10:31
    IgorFedchenko commented #4085
  • 08:36
    IgorFedchenko commented #4085
  • Dec 06 20:57
    IgorFedchenko commented #4085
  • Dec 06 20:32
    IgorFedchenko commented #4085
  • Dec 06 20:01
    IgorFedchenko commented #4085
  • Dec 06 19:55
    IgorFedchenko commented #4085
  • Dec 06 16:22
    Aaronontheweb labeled #3997
  • Dec 06 16:22
    Aaronontheweb closed #3997
  • Dec 06 16:20
    IgorFedchenko commented #3997
  • Dec 06 16:08
    IgorFedchenko commented #4085
  • Dec 06 15:50
    Aaronontheweb assigned #4085
  • Dec 06 15:50
    Aaronontheweb labeled #4085
  • Dec 06 15:50
    Aaronontheweb labeled #4085
  • Dec 06 15:49
    Aaronontheweb closed #4032
  • Dec 06 14:58
    IgorFedchenko commented #4032
  • Dec 06 14:57
    IgorFedchenko opened #4085
  • Dec 05 17:21
    Aaronontheweb synchronize #4079
  • Dec 05 17:20
    Aaronontheweb labeled #4084
  • Dec 05 17:20
    Aaronontheweb labeled #4084
Bartosz Sypytkowski
@Horusiath
@aachinfiev Afaik @annymsMthd has a production system working on akka/mono/docker - he even published some docker scripts some time ago
Alex Achinfiev
@aachinfiev
@Horusiath Cool. Good to now. Thanks.
Eric Glanz
@ericgla
I'm new to Akka.Net, and am testing out scenarios where a child actor stops using the OneForOneStrategy I defined. Everything is working as expected, but I never seem to get a Terminated message on the parent when the child actor stops.
Looking at the Actor lifecycle diagram in the docs, I should be seeing a Terminated message at the parent. What am I missing here?
Eric Glanz
@ericgla
and just after posting I answered my own question.... child actors are not watched by default (which was my assumption), and need to be explicitly watched with Context.Watch(childActor)
Yin Zhang
@melcloud
Hi guys, do we have documents on how split brain problem is handled in akka.net? There is a good amounts of articles for akka, not sure if akka.net uses the same mechanism
Arjen Smits
@Danthar
yes it does
generally the jvm akka docs apply to akka.net as well
Bartosz Sypytkowski
@Horusiath
@melcloud I don't remember if custom downing provider are already present in the akka.net version available on nuget, or it's still laying down in dev branch
anyway by default no downing strategy is provided. You can change that to auto-down (which means that every node will automatically mark as downed other nodes it couldn't reach within specified timeout) - but this may lead to split brain situation.
On the akka jvm you have at least 4 more downing providers, but they are part of reactive subscription and are part of Lightbend's proprietary stack
Yin Zhang
@melcloud
@Horusiath ah, got it. Yes, those 4 downing providers are what I am looking for. This means in akka.net, we need to keep monitoring status to manually downing actor?
Matthew Little
@zone117x
Hey guys curious of akka.net is good for my use case. I have an asp.net core server brokering messages between clients on net451 using websockets and msgpack serialization
the net451 client apps are 1) data collector, and 2) remote controller for the data collector and data viewer
Yin Zhang
@melcloud
@zone117x so what would you like to use akka.net for ?
Matthew Little
@zone117x
I'm having to write a lot of code to manage the websocket connection and especially message routing
Yin Zhang
@melcloud
I see. Does the .ne tcore server doing any thing special?
Matthew Little
@zone117x
its using asp.net core mvc for the web interface and some REST apis, and routing for the websocket connections
Yin Zhang
@melcloud
So you want to replace routing part of the websocket connections?
The akka.net is not available on net core yet. (correct me if I am wrong)
But for you situation, can you just use a load balacer / proxy to route traffic instead of relying on code?
Matthew Little
@zone117x
I'd like to use it for message routing over the websocket connections
Alex Achinfiev
@aachinfiev

I have a PersistentReceiveActor that sends itself a PoisonPill after 5 seconds of inactivity. I see a scenario where I see WriteMessagesSuccessful & WriteMessageSuccess are going to deadletter from akka.persistence.journal.inmem that were directed to the given actor. Does missing those messages mean that Persist callback won't wire or these are used for other confirmation?

        Command<CreateSecurity>(c =>
        {
            Persist(new SecurityCreated() { Id = c.Id, Name = c.Name }, e =>
            {
                Context.System.EventStream.Publish(e);
                Create(e);
                BecomeInitialized();
            });
        });
       Command<ReceiveTimeout>(t => Self.Tell(PoisonPill.Instance));
....
    protected override void PreStart()
    {
        base.PreStart();
        Context.SetReceiveTimeout(TimeSpan.FromSeconds(5));
    }

Or those are just confirmation and actor correctly persisted the data? Thanks.

Yin Zhang
@melcloud
@zone117x I assume u route message based on some message property, lets say postcode. You can definitely have actor which listen for incoming requests, look up postcode, spin up a child and begin a web socket connection there. But akka.net currently has no support for .net core, which means somehow you need to proxy it to a net451 app.
Yin Zhang
@melcloud
@aachinfiev yes, it is used by AsyncWriteJournal.cs to send reply to requestor upon sucessfully write
@aachinfiev is there any reason you want to self destruct a persist actor?
Justin Oehlmann
@GREETASolutions_twitter
quick poll ..akka.noob Reactive Messaging patterns or Functional and Reactive Domain Modeling
?
to clarify as a new player to akka.net which book would you choose first ?
Kevin Avignon
@Kavignon
I have a system of actors in mind. Once the first actor starts and arrive has a point where another must be started or get the actor that is already alive, how would one do this ? This would be like a master-slave relationship
One big actor with three children that be either created or are already reactive.
I'm doing this with F# *
@Horusiath
Alex Achinfiev
@aachinfiev
@melcloud I have a coordinator that manages a lot of child persistent entities. If I don't destroy them either by coordinator or self destruct when I will have thousands of entities in memory. I could be importing 100k - 500k securities for example. I want to keep # of children bound.
@melcloud Unless there is another design pattern to manage this better.
Yin Zhang
@melcloud
@aachinfiev I see. Are you treating them as routee? You want to handle each request with one actor, or just has a pool/group persistence actor to handle all the requests?
Alex Achinfiev
@aachinfiev
@melcloud I have AggregateCoordinator that spawns AggregateRoot per entity (DDD) and I am importing a lot of events. There is a separate coordinate per each type of entity. But there could be lots of entities for a given type. And events can come fast during import. E.g. 100k in a row for a security coordinator.
Yin Zhang
@melcloud
I see. I don’t see the problem of keeping them alive if they are boudned (e.g. 1000). Because relatively they are doing anything. However, I don’t think you should spin up 100k - 500k persist actor, as you may open that many connections at the same time. It is not great idea. Perhaps think about back pressure and akka stream?
Alex Achinfiev
@aachinfiev
Akka Streams is something I want to move at some point, but I am not able to get there just yet. Isn't persistence actor can only represent a single entity by design? I didn't think you can dynamically swap it's persistence Id to handle more than one unique entity.
Bartosz Sypytkowski
@Horusiath
@aachinfiev what persistent backend are you using?
Alex Achinfiev
@aachinfiev
Akka.Persistence.Cassandra (1.0.6) atm with Akka.Persistence 1.0.6 because it's not compatible with 1.2.0 yet
If I could spawn a fixed number (say M = 1000) of persistent actors to handle N (say 100k) entities and each new id dynamically replays state for new message that would work. But I don't know if it works that way.
Bartosz Sypytkowski
@Horusiath
@aachinfiev having 100k-500k actors may not be that bad (you probably relax amount of memory used by the process). If you're going to use them anyway within close time range, it's better to have them in memory than trying to kill some of them and respawn on demand -> latter is much more expensive.
Alex Achinfiev
@aachinfiev
Using sharding won't help me here, since I don't want to keep all 100k of them in memory regardless.
100k-500k is an arbitrary number. I can have other record types during import that may go into millions.
Most of the requests are for a new entity .. with sometimes updates to existing one during same import
Bartosz Sypytkowski
@Horusiath
I would measure how much memory does it take. Probably few GB
Alex Achinfiev
@aachinfiev
And after each import send a purge request to reclaim memory? I have a number of services running and box has only 8 - 16gb in total.
Bartosz Sypytkowski
@Horusiath
@Kavignon you must clearly define actors relationship. Because actors that can be either created or already active doesn't fit master-slave scenario (as slave may be already there, where master is being created or I get your case wrong)
@aachinfiev actor-based systems are stateful by default, and this also means they'll consume a lot of memory. Maybe actor-per-entity is not a good option for you, and you need something lighter indeed
Bartosz Sypytkowski
@Horusiath
(if you really need, you may fabricate a message that persistent actor sends to its journal when it's going to persist an event: see example)
Alex Achinfiev
@aachinfiev
So you directly communicate with Journal rather than making a persitentactor do one message at a time?