These are chat archives for akkadotnet/akka.net

22nd
Sep 2017
Anders Storhaug
@andersstorhaug
Sep 22 2017 00:35 UTC
ah, ok decreasing query.journal.sql.refresh-interval / increasing query.journal.sql.max-buffer-size helps quite a bit
Ricardo Abreu
@codenakama
Sep 22 2017 05:54 UTC

Hi.

I'm learning Akka.Net and loving it so far. So much I want to use it on my next project. However, coming from a classic ASP.NET background I am a bit confused about how to persist and read data in AKKA.
What are the right patterns? Are there any examples of CRUD operations?
Can/Should I use entity framework?

For example, should I have a "ProductsActor" that has a DbContext?

Any insight would be useful and I hope my question also makes sense.

Sean Farrow
@SeanFarrow
Sep 22 2017 07:37 UTC
@codenakama You can use standard design patterns, i.e inject either a repository, or DBContext, or you could look at akka.persistence, which is more an an event sourced model., it really depends what your doing! I've used both patterns, the former when I just had reference data (that is to say data that I don't need to change) and the latter where I know I've got data that will change as event sourcing makes sense in my senario.
Alex Michel
@amichel
Sep 22 2017 08:10 UTC
@Aaronontheweb - thanks for clearing that out. Thing is that I wouldn't bother querying /system in previous release where all my actors resided under /user, but after the upgrade since all my system actually moved under /system I have nothing interesting left to look in user address space
Thomas Denoréaz
@ThmX
Sep 22 2017 09:52 UTC
@Aaronontheweb I've created an Issue ( akkadotnet/akka.net#3119 ) concerning Akka.Remote not sending back a pong. After some more research, the problem is actually even more interesting. Using three variants to send the ping, two variants are working. However using async-await the pong is not sent back (while the ping is)
vicosoft4real
@vicosoft4real
Sep 22 2017 10:13 UTC
Hi guys! What could cause this ? I was trying to send a message from my shard region to my actor/entity. The warning message is:-> Trying to register to coordinator at [/system/sharding/SystemCoordinator/singleton/coordinator], but no acknowledgement. Total [1] buffered messages.
Ricardo Abreu
@codenakama
Sep 22 2017 11:38 UTC
@SeanFarrow that's exactly what was thinking to do! and thanks for replying :) it makes sense what you said. so I could use akka.persistence for tracking analytics for example and inject a dbContext when I need to read/write other objects
Vladimir Kozhaev
@vladimirkozhaev
Sep 22 2017 13:11 UTC
Joshua Garnett
@joshgarnett
Sep 22 2017 13:13 UTC
@vladimirkozhaev did you mean to post that in the other akka group? That’s scala code and this group manages the .NET version of akka
Robert Stiff
@uatec
Sep 22 2017 14:15 UTC
How can i protect against netsplits in my cluster?
for some reason all my nodes dropped out of the cluster, then each spun up a cluster singleton :|
Aaron Stannard
@Aaronontheweb
Sep 22 2017 14:57 UTC
@amichel which actors live under /system now?
@philsandler_twitter usually you want to use a consistent hashing group router
and distribute work evenly to the other underlying nodes
Aaron Stannard
@Aaronontheweb
Sep 22 2017 15:04 UTC
I explain a bit about how the math behind that works here: https://petabridge.com/blog/akkacluster-state-distribution/
the consistent hashing formula is really simple; requires no coordination between nodes
all it requires is that the set of nodes be ordered identically, which we do with a basic IComparer algorithm on top of the data each router receives from the cluster's gossip
@ThmX yeah so it looks like this is the return of that continuation being scheduled on the wrong thread...
I'll comment on the issue further
@uatec the Zynga guys have built a split brain resolver for Akka.Cluster here: https://github.com/zynga/Zynga.Akka.Cluster
you can give that a try
the two devs who wrote that are both here in Gitter chat pretty regularly too
Robert Stiff
@uatec
Sep 22 2017 15:08 UTC
cool
Thomas Denoréaz
@ThmX
Sep 22 2017 15:34 UTC
@Aaronontheweb Thanks a lot!
Joshua Garnett
@joshgarnett
Sep 22 2017 15:36 UTC
@uatec I find it’s important to use dedicated seed nodes as well. I typically run three, all nodes always talk to those three seed nodes. They aren’t setup to run any roles, they are just there for coordination so typically don’t need a much in the way of resources to run.
Robert Stiff
@uatec
Sep 22 2017 15:37 UTC
i do have dedicated seed nodes
well, 1