Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:12
    cptjazz synchronize #4242
  • Feb 22 12:02
    cptjazz opened #4242
  • Feb 21 19:37
    Arkatufus synchronize #4228
  • Feb 21 19:37
    Arkatufus ready_for_review #4228
  • Feb 21 15:42
    Aaronontheweb assigned #4241
  • Feb 21 15:42
    Aaronontheweb milestoned #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb opened #4241
  • Feb 21 01:47
    Arkatufus opened #4240
  • Feb 21 00:10
    Aaronontheweb synchronize #4212
  • Feb 20 23:50
    Aaronontheweb synchronize #4238
  • Feb 20 23:48
    Aaronontheweb commented #4234
  • Feb 20 23:47
    Aaronontheweb synchronize #4212
  • Feb 20 23:46

    Aaronontheweb on dev

    close #4234 - added CachingConf… (compare)

  • Feb 20 23:46
    Aaronontheweb closed #4239
  • Feb 20 23:46
    Aaronontheweb closed #4234
  • Feb 20 23:25
    Aaronontheweb synchronize #4239
  • Feb 20 23:24
    Aaronontheweb opened #4239
Dan
@ctrlaltdan
@Horusiath We don't have any code which deletes journals or snapshots. We're currently using SQL server, although only to maintain the current actor system state in the three EventJournal SnapshotStore and Metadata tables.
I'm under the assumption that the data was corrupted during a release. Maybe the actor system was downed before enough gossip/state was able to be written.
Our current infrastructure (Kubernetes) will re-deploy our stateless-set of shard-nodes at new addresses to those known by the Event Journal. Is this a potential limitation of the Cluster.Sharding module? I accept that it's in BETA.
Annoyingly I don't have a guaranteed repro for this but it has happened maybe 3 times this month (whilst still in development/CI)
Bartosz Sypytkowski
@Horusiath
@dubs999 I see that in the example log you have there, your sequence number is 9. Could you provide rows that happened before this seq nr for this persistenceId? SeqNr/PersistenceId/Manifest/SerializerId columns are actually the most important
Dan
@ctrlaltdan
@Horusiath I feel a bit silly for not taking a copy of the data! We had to purge the data to allow the application to function again. I'll have to get back to you with that next time it occurs.
I think I've found an open ticket for this already here: akkadotnet/akka.net#3414
Dan
@ctrlaltdan
Bartosz Sypytkowski
@Horusiath
ok, I see it
Blue
@heyixiaoran
@Horusiath Does shard just can have multi sender and one receiver ? It doesn't seem to be what I need . I want to use akka.net in a trading system. I want to set each login user as an actor and multiple server actors handle business . After server actor handle the message . It can reply the result to request actor. Does router can do this?
Bartosz Sypytkowski
@Horusiath

@heyixiaoran looks like you're talking about two different things:

  • If you have i.e. 10 000 users (actors) sharded on 10 nodes, you can get around (usually not exactly) 1000 actors on each node. That is fair actors allocation.
  • But that doesn't guarantee fair message distribution: you can have one actor receiving 1000 messages/sec and others having 1 message/sec.

It's like difference between memory and CPU.

If you want to model users as actors, then cluster sharding is probably what you're looking for. They can always reply to requester (however replying to sharded actor works in a different way than replying to normal actor).
DSanchen
@DSanchen
I still have the issue, that ActorSelection.ResolveOne does not find an Actor that was created using ActorOfAsTestActorRef. What I now tried is Ask<>()-ing the Actor
something before trying to resolve it, and ideed I get an answer to the Ask<>(), but it still happens that ResolveOne does not find it. I tried looking in the source-code
of ActorSelection / ActorOfAsTestActorRef, but at some point I got stuck and could not understand what was going on... Only thing I think I understood, is that someone must answer with ActorIdentity(MsgId, null) upon receiving an Identify(MsgId)-Message... Any good Ideas ?
Dan
@ctrlaltdan

@Horusiath The issue happened again. Here is a dump of the data.

Ordering PersistenceId SequenceNr Timestamp IsDeleted Manifest Payload Tags SerializerId
136 /system/sharding/customerCoordinator/singleton/coordinator 105 636783291061582824 0 AF 0x0A0233361248616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3130383A383038312F73797374656D2F7368617264696E672F637573746F6D65722331363635343832363933 NULL 13
140 /system/sharding/customerCoordinator/singleton/coordinator 106 636784965012362487 0 AB 0x0A47616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3132323A383038312F73797374656D2F7368617264696E672F637573746F6D657223323432333036343237 NULL 13
141 /system/sharding/customerCoordinator/singleton/coordinator 107 636784965012552987 0 AC 0x0A4C616B6B612E7463703A2F2F696D62757273654031302E3234302E302E35333A383038312F73797374656D2F7368617264696E672F637573746F6D657250726F78792332313137333131313037 NULL 13
142 /system/sharding/customerCoordinator/singleton/coordinator 108 636784965012782458 0 AC 0x0A4D616B6B612E7463703A2F2F696D62757273654031302E3234302E302E3132363A383038312F73797374656D2F7368617264696E672F637573746F6D657250726F78792331323135343337333535 NULL 13
143 /system/sharding/customerCoordinator/singleton/coordinator 109 636784965126035293 0 AD 0x0A46616B6B612E7463703A2F2F696D62757273654031302E3234302E302E33303A383038312F73797374656D2F7368617264696E672F637573746F6D657223393630383739383036 NULL 13
144 /system/sharding/customerCoordinator/singleton/coordinator 110 636784965229904859 0 AB 0x0A46616B6B612E7463703A2F2F696D62757273654031302E3234302E302E31343A383038312F73797374656D2F7368617264696E672F637573746F6D657223373231343333303930 NULL 13

With the exception:

Exception in ReceiveRecover when replaying event type ["Akka.Cluster.Sharding.PersistentShardCoordinator+ShardHomeAllocated"] with sequence number [105] for persistenceId ["/system/sharding/customerCoordinator/singleton/coordinator"]

{
  "Depth": 0,
  "ClassName": "",
  "Message": "Region [akka.tcp://imburse@10.240.0.108:8081/system/sharding/customer#1665482693] not registered\nParameter name: e",
  "Source": "Akka.Cluster.Sharding",
  "StackTraceString": "   at Akka.Cluster.Sharding.PersistentShardCoordinator.State.Updated(IDomainEvent e)\n   at Akka.Cluster.Sharding.PersistentShardCoordinator.ReceiveRecover(Object message)\n   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)\n   at Akka.Persistence.Eventsourced.<>c__DisplayClass91_0.<Recovering>b__1(Receive receive, Object message)",
  "RemoteStackTraceString": "",
  "RemoteStackIndex": -1,
  "HResult": -2147024809,
  "HelpURL": null
}

Would you like me to create this as a bug in the issue tracker?

Lutando Ngqakaza
@Lutando
I have quite a specific question, is it possible to inject an EventAdapter for a given persistence plugin outside of the hocon methodology, something at runtime where I can use an Extension to do this? Long shot question basically I want to add an event tagger to the actor system
Aaron Stannard
@Aaronontheweb
@dubs999 yes please
Bartosz Sypytkowski
@Horusiath
@Lutando unfortunately no. Only via HOCON
DSanchen
@DSanchen

Hi Guys, I have a question regardig FlowOps.GroupedWithin()
A small timing Diagram:

==> Time-Axis

| e e e e e e e          .e e e e e e 
|--------t-----|--------t.-------|--------t--------|
              #          .       #  x              #
              #          .       #  x              #
              #          |-------#t-x|--------t----#---|
              #                  #  x              #
              1                  2  x              3
                                    x
                                    4

GroupedWihin emits when the amount of grouped elements reaches the defined limit, or the time since the last emitted group exceeds the defined timeout.
In my example GroupedWithin(6, t) this will emit a complete group at time 1, another partially filled group (4 elements) at time 2 and another parially filled group (2 elements) at time 3.
I need a behaviour, that emits when the amount of grouped element reaches the defined limit, or the time since the first received element of the current group exceeds the defined timeout... That would emit the first group at time 1, and the next completely filled group at time 4.
Is there such a Grouping behaviour ?

Maciek Misztal
@mmisztal1980

I've just tried using Akka.Quartz.Actor.QuartzActor using Akka.System.ActorOf(Props.Create(() => new QuartzActor()), "scheduler"); in a .net core 2.1 app and got a:

[akka://System/user/scheduler#154807920]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Quartz.Actor.QuartzActor with 0 args: () ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
   at Quartz.Impl.StdSchedulerFactory.Initialize()
   at Quartz.Impl.StdSchedulerFactory.GetScheduler() in c:\projects\quartznet\src\Quartz\Impl\StdSchedulerFactory.cs:line 1102
   at Akka.Quartz.Actor.QuartzActor..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

any suggestions how to get rid of this? I take it, this extension is not under active development? From the initial looks of it, it seems to be targeting .NET 4.5.2 ?

Bartosz Sypytkowski
@Horusiath
@mmisztal1980 it looks so. Maybe it wasn't updated for a while? You could give a try to Akka.Persistence.Reminders - it's a bit simpler, and relies only on akka persistence. If you try it, your feedback will be welcome.
Maciek Misztal
@mmisztal1980
@horusiath I’l give it a shot
Filip Nowak
@fipil
Hi, I'm a newbie in the akka.net world. I readed a lot about it and I like it very much. But I still doesn't understand one thing: for example, if I'd like to create an eshop with using akka.net and I've a catalog with 100000 items. Where are these items stored? Will I have a 100000 actors, one per a catalog item? I'm sorry for the stupid question, I'm coming from relational database centric development world, so this I still dont understand. Many thanks.
Vagif Abilov
@object
Hello. We are using cluster sharding in a combination with DistributedData. DistributedData is still marked as "experimental" in Akka.NET docs, but are there any known issues with it? The documentation says "At this moment this mode doesn't support akka.cluster.sharding.remember-entities option", but this line has been there since the version 1.3.2, and I hope that remember-entities can be used now with ddata (we need it badly). Does anyone know the current state of this issue?
jameswilddev
@jameswilddev
Am I right in thinking that DistributedData is an in-memory, i.e. non-persistent store? What would remember-entities do when backing onto such a system?
Paweł Bańka
@pmbanka
@jameswilddev remember-entities is a setting that causes automatic starting of entities in case of shard rebalancing. Yes DistributedData is in-memory, but as long as there are some nodes of the cluster left (which is a case in of moving a shard from one node to another) the data should be still accessible. Note that JVM Akka supports this (https://doc.akka.io/docs/akka/2.5/cluster-sharding.html#remembering-entities).
Ismael Hamed
@ismaelhamed
@pmbanka @object @jameswilddev At least in the JVM, since 2.5 remember entities are stored with durable ddata. Given DistributedData in Akka.NET uses LMDB too, I'm guessing it should do the same.
Alexandr Baranovskyi
@baranovskyi1_gitlab
Hello!
Wanted to ask a quick question, is it possible to set two lighthouses as seed-nodes for each other?
I tried to do it, but both of them get stuck in infinite loops of reconnection.
However, once I remove the cycle (delete one of the references) everything goes back to normal.
Maciek Misztal
@mmisztal1980
Can anyone elaborate if it’s feasible to create actor hierarchies running in shards?
Boris Lange
@langebo
Hey, i have a question concerning stateful/persistent actors in general. we have actors and their state is represented via domain models. some of those domain models have other domain models as nested entities. we naively just assigned the state of actors as the nested properties of other actors state objects and recently found out that after restart and recovery, updating the original actor state will not update the (prior same) objects that are nested in others actors state. now my question: what is the best design choice for having stateful/persistent actors, with nested state properties of other actors and have them being updated by just updating the primary actors state?
should we only ever store ids/actorrefs of nested actors state and resolve their state when performing actions where we need their data or are c# refs a solution (ptr-ish)? or is there a solution that we are just missing?
Vagif Abilov
@object
@mmisztal1980 You mean creating a root actor in a shard and spawning a hierarchy of child actors? No problem with that.
@langebo It makes sense (and simplifies a few things) if you associate persistent state with the state of your aggregate root in DDD terms. You can still persist events associated with nested (smaller) scope, but they all should contribute in building up a state of the aggregate.
Boris Lange
@langebo
@object Ok to make my question more concrete. I have persistent actors: ResourceActor with a state class Resource and an AppointmentActor with a state class Appointment. Appointment has a list of Resource objects. Given that i instantiate multiple ResourceActors with their respective state objects and an AppointmentActor with their respective state containing some of my Resource state objects, what we are experiencing is, that when i change the state of a Resource state object and it gets persisted, the changes on that object are not reflected in the Resources list of my Appointment after restarting and replaying my actor system. Means the Resource IS changed. Its occurence in the Appointments list of resources IS NOT. (Because after replaying both aren't the same object instantiation anymore and the state change of the resource is not replayed in the context of the Appointment)
By the way: when i talk about domain models, i dont mean that we are following the DDD principles (which we probably should but thats another topic i guess)
Vagif Abilov
@object
@langebo When working with actors it's best no to think in OOP terms. It's all about messages. When you build a state of AppointementActor from its events you are replaying messages that were received and persisted for the given AppointmentActor persistence ID. Events come from the event journal (event store). If AppointementActor state should include more than that (e.g. a number of ResourceActor events), then you have to arrange it yourself. This is why I'd go for storing all contained events under the same persistence ID (corresponding to the aggregate root, in your case it will be AppointmentActor).
James Hulse
@jameshulse
hi all, I worked on an akka.net system 2 years ago but have nearly forgotten everything I learned. trying to get back up to speed but can't seem to find the really great article on the "work pulling pattern" that I had back then. Anybody know which one I might be referring to or where I can find something similar now? cheers
Aaron Stannard
@Aaronontheweb
push and pull?
but we don't cover it there
Alexandr Baranovskyi
@baranovskyi1_gitlab
@Aaronontheweb is there any documentation on how Lighthouse should be started and configured?
It seems like there's a lot of custom cases that aren't described anywhere (seed-node cycle, as I wrote in the previous message, and constant gateway association errors if lighthouse referenced by another lighthouse starts later than latter)
edwinparker
@edwinparker
I'm using NLog to log errors in my akka app. I would like to be able to add additional data to the exception before it logs...including the message value. I was using PreRestart override for this which works, but I noticed the error often gets logged before that event is triggered so sometimes the extra data is not included. Where would be the appropriate place to do this kind of logging? Do I need a custom logger or some other approach?
atresnjo
@atresnjo
Is there a way to send a "global" message in akka? as in notify every known actor in the system.
Arjen Smits
@Danthar
@atresnjo take a look at actorselections and how addresses work: https://getakka.net/articles/concepts/addressing.html#querying-the-logical-actor-hierarchy
atresnjo
@atresnjo
Yeah I can know that I can do it myself, question was more like if there's something already inbuilt.
thanks tho
Chris
@chriskolenko

Is there any gotcha's when using Cluster Discovery Consul + Routing?

Here is my deployment config:

            /other {
                router = broadcast-group
                routees.paths = ["/user/api"]
                virtual-nodes-factor = 8
                cluster {
                    enabled = on
                    max-nr-of-instances-per-node = 2
                    allow-local-routees = off
                    use-role = "other"
                }
            }

I have the other console application running with an actor ready for messages at /user/api

Here is the cluster config:

    cluster {
        roles = ["other"]
    }

Logs are showing that the nodes are up and running with the correct roles.

But the when telling /user/other a message it keeps deadlettering. Anyway to debug what's going on?

Oh... I'm having no issues with routing when I'm broadcasting to the same role + enabling allow-local-routees. But once scaling up I'm sure the external routees wouldn't work :(
Chris
@chriskolenko
^^^^^^^^^ Nevermind.. Found my issue..
Was creating the ActorSystems with different names. Once I figured it out, started working like a charm. :D
AndreSteenbergen
@AndreSteenbergen
Doe anyone knwo why this can occur in a cluster? I see a lot of these in my logs
[ERROR][12/2/18 4:18:21 PM][Thread 0007][remoting] SkipLastField called on an end-group tag, indicating that the corresponding start-group was missing
Cause: Google.Protobuf.InvalidProtocolBufferException: SkipLastField called on an end-group tag, indicating that the corresponding start-group was missing
Can my MsgPack serialization be the reason that message in protobuf is raised? All my own messages are serialized in MsgPack, but I can't find a lot googling this error.
Zied
@zimayel_gitlab
Hello, can maybe someone Confirm that the first example releated to this: https://getakka.net/articles/intro/use-case-and-deployment-scenarios.html using FluentConfig is absolete and have to be updated ?
joowon
@HIPERCUBE
image.png