by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:36
    Zetanova commented #4434
  • 11:42
    mralexes commented #4434
  • May 30 18:44
    CumpsD commented #4433
  • May 28 19:06
    snekbaev opened #4446
  • May 28 10:43
    Zetanova commented #4434
  • May 28 06:49

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.12.… (compare)

  • May 28 06:49
    dependabot-preview[bot] labeled #4445
  • May 28 06:49
    dependabot-preview[bot] opened #4445
  • May 28 00:03
    Aaronontheweb commented #4434
  • May 27 23:41
    Zetanova commented #4434
  • May 27 22:57
    Zetanova commented #4434
  • May 27 22:34
    Aaronontheweb commented #4419
  • May 27 15:54
    Ralf1108 commented #4432
  • May 27 14:42
    Ralf1108 commented #4419
  • May 27 09:41
    Zetanova commented #4434
  • May 27 06:38
    dependabot-preview[bot] labeled #141
  • May 27 06:38
    dependabot-preview[bot] opened #141
  • May 27 06:38

    dependabot-preview[bot] on nuget

    Bump AkkaVersion from 1.4.6 to … (compare)

  • May 27 06:33

    dependabot-preview[bot] on nuget

    (compare)

  • May 27 06:33
    dependabot-preview[bot] closed #156
svoruganti
@svoruganti
Thanks Valdis Zobela. The report will be used by sales teams on demand across the country. In theory, the report could be run by sales team 10 to 20 times a day during business hours.
svoruganti
@svoruganti
Are there any guidelines (or rule of thumb) regarding number of child actors that a parent actor can have
anthonyhawes
@anthonyhawes
@svoruganti if the product state is persisted to some kind of store (e.g. a database) could the report be run against that instead?
Valdis Zobēla
@valdisz
agree with @anthonyhawes, database fits better for report building and 100K rows in DB with proper indecies will fly
Bartosz Sypytkowski
@Horusiath
@svoruganti depends on the complexity of your actors - basic Akka.NET actor takes less than 1kB of memory. You can have literally millions of them running on a single piece of moderate hardware.
the problem is when you want them to have a durable state, because I/O required to load/store state for so many actors require more care eg. if you'll read states of 100 000 actors from HDD/SSD at once, you'll probably run into DB request timeouts
svoruganti
@svoruganti
@anthonyhawes, Interesting suggestion, which I think could work. Will definitely explore the option. Thank you very much for the suggestion.
Adrian Cockburn
@netclectic

@svoruganti If I wanted to solve this with actors, I would do something like this...

  • product supervisor creates a report supervisor
  • report supervisor in turn creates a set of report aggregators
  • each report aggregator is responsible for aggregating report data from a subset of actors
  • the actor ref for these report aggregators are passed on to the product actors
  • the product actors periodically report their state to their report aggregator
  • the report aggregators aggregate the state from mutiple actors and pass it up to the report supervisor
  • the report supervisor aggregates the aggregates and that is your report data
  • when a request for a report arrives the report actor responds with the current report data which is effectively 'live'

you could persist the report data over time, which would enable you to show a time series of report data changing or report on a specific time in the past

Anathema
@BitterAmethyst_twitter
@Horusiath thanks, however we don't use clustering as our remoting situation is explicitly a client-server setup and clustering is extra complexity we don't need, we already have a mechanism to forward log messages so I just piggybacked off of that :)
Mike Clark
@mclark1129
Does anyone know whether or not TestKit.EventFilter is thread-safe? Seeing flaky behavior testing EventFilter.Debug in an xUnit test when using Theories to run multiple test cases.
Bart de Boer
@boekabart

@Horusiath Regarding the issue we still have with the actor not 'recovering' from postgres: we see this line

2019-08-09 13:00:11,522Z DEBUG [5  ] LocalActorRef                            Unhandled message from akka://TitleCatalogizerPPTEST/deadLetters : SnapshotOffer<meta: SnapshotMetadata<pid: RuntimeActor, seqNr: 66274, timestamp: 2019/08/09>, snapshot: Divv.XX.TitleCatalogizer.Actors.Runtime.RuntimeActor+EnqueuedWork>

and the interesting thing is: the actor doesn't make snapshots. and the table, just checked, is totally empty.
It's as if it treats a journal entry as a snapshot (the type is one of the events we journal)...!?

Bas Bossink
@basbossink
@Horusiath To expand on @boekabart information in the given database the metadata is also empty.
Ebere Abanonu
@eaba
@svoruganti maybe you should try event sourcing. With it u can create a read model for sales report ready made...
Mike Clark
@mclark1129
What would be the implications of bypassing Akka's DI extensions? Is it just potential memory leaks for dependencies that have transient lifetimes?
Huw Simpson
@huwmanatee
I have a problem with a persistent actor where it will receive and persist the first round of messages I send to it, thereafter when I restart the process it doesn't recover and messages sent go straight to the dead letter mailbox.
Huw Simpson
@huwmanatee
Anyone have any ideas?
Bartosz Sypytkowski
@Horusiath
@boekabart this sounds highly unlikely - It's possible to have a SnapshotOffer with a null snapshot inside (but then the log should probably be different). Are you sure that your actor is actually using Postgres, and not some other provider?
@huwmanatee sound a bit like your actor might be failing in even persist callback or on recovery callback, but without details it's hard to tell anything more
Huw Simpson
@huwmanatee
@Horusiath Looking at the log I see the actor is in a stopped state before the messages are delivered.
Oh and this is using akkling
image.png
Huw Simpson
@huwmanatee
@Horusiath
Akka version 1.3.14, using Akkling and F#.
Using your persistence example.
On dot net core
Bartosz Sypytkowski
@Horusiath
@huwmanatee is this a direct output of the persistence example, or did you change something?
Huw Simpson
@huwmanatee
@Horusiath I have upgraded to the latest akka version and I am using Sql Persistence. I will use your example directly without updating any libs and see what happens.
Aaron Stannard
@Aaronontheweb
FYI: https://github.com/akkadotnet/akka.net/pull/3881#discussion_r313010282 - if you're interested in using the Akka.Persistence.TestKit in NUnit or VsTest, you should weigh in here
Bart de Boer
@boekabart
@Horusiath I was as baffled as you were. Here comes what I consider proof...
image.png
That's a Linqpad summary of the Journal.
Here's a Linqpad summary of the Snapshot:
image.png
The most relevant part of the log:
2019-08-13 12:27:54,032Z DEBUG [5  ] PostgreSqlSnapshotStore                  Started (Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore)
2019-08-13 12:27:54,047Z DEBUG [8  ] PostgreSqlJournal                        Started (Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal)
2019-08-13 12:27:54,625Z DEBUG [8  ] RuntimeActor                             Recovering an Snapshot 
snapshotOffer.ToString: SnapshotOffer<meta: SnapshotMetadata<pid: RuntimeActor, seqNr: 66298, timestamp: 2019/08/09>, snapshot: de7a22d1-bd93-4fef-81c3-00878a9f3517 en-queued at 2019-08-09T15:55:33.9508626+02:00>
snapshotOffer.SnapShot.GetType: Divv.IxIx.TitleCatalogizer.Actors.Runtime.RuntimeActor+EnqueuedWork
snapshotOffer.SnapShot.ToString de7a22d1-bd93-4fef-81c3-00878a9f3517 en-queued at 2019-08-09T15:55:33.9508626+02:00
2019-08-13 12:27:54,750Z DEBUG [5  ] ReplayFilter                             Started (Akka.Persistence.Journal.ReplayFilter)
2019-08-13 12:27:54,766Z DEBUG [5  ] PostgreSqlJournal                        now supervising akka://TitleCatalogizerPPTEST/system/akka.persistence.journal.postgresql/$a
As you can see, it seems to offer the last Journal entry as a snapshot.
This does not happen every time, about 50% of the times I start the completely stripped down application, it does start normal recovery of all the journal entries
Bart de Boer
@boekabart
full logging:
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/log1-Log4NetLogger#1996803328] to channel Akka.Event.Debug
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/log1-Log4NetLogger#1996803328] to channel Akka.Event.Info
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/log1-Log4NetLogger#1996803328] to channel Akka.Event.Warning
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/log1-Log4NetLogger#1996803328] to channel Akka.Event.Error
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              Logger log1-Log4NetLogger [Log4NetLogger] started
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/UnhandledMessageForwarder#1371994935] to channel Akka.Event.UnhandledMessage
2019-08-13 12:27:53,766Z DEBUG [5  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/UnhandledMessageForwarder
2019-08-13 12:27:53,766Z DEBUG [5  ] LoggingBus+UnhandledMessageForwarder     Started (Akka.Event.LoggingBus+UnhandledMessageForwarder)
2019-08-13 12:27:53,766Z DEBUG [6  ] EventStream                              Default Loggers started
2019-08-13 12:27:53,782Z DEBUG [5  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/deadLetterListener
2019-08-13 12:27:53,782Z DEBUG [5  ] EventStream                              subscribing [akka://TitleCatalogizerPPTEST/system/deadLetterListener#1930670394] to channel Akka.Event.DeadLetter
2019-08-13 12:27:53,782Z DEBUG [5  ] DeadLetterListener                       Started (Akka.Event.DeadLetterListener)
2019-08-13 12:27:53,797Z DEBUG [5  ] EventStreamUnsubscriber                  registering unsubscriber with Akka.Event.EventStream
2019-08-13 12:27:53,797Z DEBUG [5  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/EventStreamUnsubscriber-1
2019-08-13 12:27:53,797Z DEBUG [5  ] EventStreamUnsubscriber                  Started (Akka.Event.EventStreamUnsubscriber)
2019-08-13 12:27:53,829Z INFO  [1  ] TitleCatalogizerApp                      Started
2019-08-13 12:27:53,829Z INFO  [1  ] TitleCatalogizerApp                      The Divv.Comhem.Titlecatalogizer$PP-TEST service is now running, press Control+C to exit.
2019-08-13 12:27:53,829Z DEBUG [6  ] TitleCatalogizerAppActor                 Started (Divv.ComHem.TitleCatalogizer.Actors.TitleCatalogizerAppActor)
2019-08-13 12:27:53,829Z DEBUG [6  ] TitleCatalogizerAppActor                 now supervising akka://TitleCatalogizerPPTEST/user/TitleCatalogizer/Output
2019-08-13 12:27:53,829Z DEBUG [6  ] GuardianActor                            now supervising akka://TitleCatalogizerPPTEST/user/TitleCatalogizer
2019-08-13 12:27:53,829Z DEBUG [6  ] TitleCatalogizerAppActor                 now supervising akka://TitleCatalogizerPPTEST/user/TitleCatalogizer/Queue
2019-08-13 12:27:53,829Z DEBUG [6  ] BackoffSupervisor                        Started (Akka.Pattern.BackoffSupervisor)
2019-08-13 12:27:53,829Z DEBUG [6  ] BackoffSupervisor                        now supervising akka://TitleCatalogizerPPTEST/user/TitleCatalogizer/Queue/RuntimeActor
2019-08-13 12:27:53,829Z DEBUG [6  ] BaseCompositeActor+CompositeOutputActor  Started (Divv.Vlow.Akka.BaseActors.BaseCompositeActor+CompositeOutputActor)
2019-08-13 12:27:53,922Z DEBUG [5  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/akka.persistence.journal.postgresql
2019-08-13 12:27:53,922Z DEBUG [5  ] RuntimeActor                             Started (Divv.ComHem.TitleCatalogizer.Actors.Runtime.RuntimeActor)
2019-08-13 12:27:53,922Z DEBUG [5  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/akka.persistence.snapshot-store.postgresql
2019-08-13 12:27:53,922Z DEBUG [5  ] RuntimeActor                             now watched by [akka://TitleCatalogizerPPTEST/user/TitleCatalogizer/Queue#2002106618]
2019-08-13 12:27:53,938Z DEBUG [6  ] SystemGuardianActor                      now supervising akka://TitleCatalogizerPPTEST/system/recoveryPermitter
2019-08-13 12:27:53,938Z DEBUG [6  ] GuardianActor                            now supervising akka://TitleCatalogizerPPTEST/user/$a
2019-08-13 12:27:53,938Z DEBUG [6  ] RecoveryPermitter                        Started (Akka.Persistence.RecoveryPermitter)
2019-08-13 12:27:53,969Z DEBUG [6  ] AsyncWriteJournal+Resequencer            Started (Akka.Persistence.Journal.AsyncWriteJournal+Resequencer)
2019-08-13 12:27:53,969Z DEBUG [6  ] RuntimeActor                             now watched by [akka://TitleCatalogizerPPTEST/system/recoveryPermitter#906377815]
2019-08-13 12:27:54,032Z DEBUG [5  ] PostgreSqlSnapshotStore                  Started (Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore)
2019-08-13 12:27:54,047Z DEBUG [8  ] PostgreSqlJournal                        Started (Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal)
2019-08-13 12:27:54,625Z DEBUG [8  ] RuntimeActor                             Recovering an Snapshot SnapshotOffer<meta: SnapshotMetadata<pid: RuntimeActor, seqNr: 66298, timestamp: 2019/08/09>, snapshot: de7a22d1-bd93-4fef-81c3-00878a9f3517 en-queued at 2019-08-09T15:55:33.9508626+02:00> Divv.ComHem.TitleCatalogizer.Actors.Runtime.RuntimeActor+EnqueuedWork: de7a22d1-bd93-4fef-81c3-00878a9f3517 en-queued at 2019-08-09T15:55:33.9508626+02:00
2019-08-13 12:27:54,750Z DEBUG [5  ] ReplayFilter                             Started (Akka.Persistence.Journal.ReplayFilter)
2019-08-13 12:27:54,766Z DEBUG [5  ] PostgreSqlJournal                        now supervising akka://TitleCatalogizerPPTEST/system/akka.persistence.journal.postgresql/$a
2019-08-13 12:27:54,828Z INFO  [8  ] RuntimeActor                             Replay Success
2019-08-13 12:27:54,828Z DEBUG [8  ] ReplayFilter                             Stopped
2019-08-13 12:27:54,828Z INFO  [5  ] RuntimeActor                             Recovery completed
2019-08-13 12:27:54,844Z DEBUG [6  ] RuntimeActor                             no longer watched by [akka://TitleCatalogizerPPTEST/system/recoveryPermitter#906377815]
Bart de Boer
@boekabart
hocon:
akka : {
  log-config-on-start : on
  log-dead-letters : on
  stdout-loglevel : DEBUG
  loglevel : DEBUG
  loggers : ["Akka.Logger.log4net.Log4NetLogger, Akka.Logger.log4net","Akka.Event.StandardOutLogger, Akka"]
  suppress-json-serializer-warning : on
  actor : {
    debug : {
      receive : on
      autoreceive : on
      lifecycle : on
      event-stream : on
      unhandled : on
    }
  }
  persistence : {
    journal : {
      plugin : akka.persistence.journal.postgresql
      postgresql : {
        class : "Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"
        plugin-dispatcher : akka.actor.default-dispatcher
        connection-string : "Server=divv-1-pgsql-l.xixi.com;Port=5432;User Id=RtiTitleCatalogizer;Password=****;Database=RtiTitleCatalogizer;SslMode=Disable;"
        schema-name : public
        connection-timeout : 30s
        auto-initialize : on
        timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
        metadata-table-name : metadata
        stored-as : BYTEA
      }
    }
    snapshot-store : {
      plugin : akka.persistence.snapshot-store.postgresql
      postgresql : {
        class : "Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Persistence.PostgreSql"
        plugin-dispatcher : akka.actor.default-dispatcher
        connection-string : "Server=divv-1-pgsql-l.xixi.com;Port=5432;User Id=RtiTitleCatalogizer;Password=****;Database=RtiTitleCatalogizer;SslMode=Disable;"
        schema-name : public
        connection-timeout : 30s
        timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
        auto-initialize : on
        stored-as : BYTEA
      }
    }
  }
}
Bart de Boer
@boekabart
another discovery: Seems that new Config( config, fallback); is slightly different than config.WithFallback(fallback). The former just keeps a reference, the latter performs an immediate merge.
Functionally, they seem to have the same effect. With one caveat: the ToString(true) of them are wildly different. Mostly in the sense that the former works, and the latter only dumps the original config... weirdly enough, because it seems that the entire config was merged!
Aaron Stannard
@Aaronontheweb
@boekabart I must have missed this - what's the LINQpad data for?
Bart de Boer
@boekabart
To show the contents on the actual journal and snapshot table
Aaron Stannard
@Aaronontheweb
on Postgres
and what is it that you're looking for?
I haven't followed the earlier thread
Bart de Boer
@boekabart
TLDR: snapshot table is empty, however, I get a snapshotOffer about 50% of startups, with the most recent Journal entry as the data source (time, seq Nr, type, data)
Aaron Stannard
@Aaronontheweb
LOL
oh man
Bart de Boer
@boekabart
well this is production code at a customer, so, less LOL than you'd imagine.
(when we get the snapshot offer, there are no journal recovery msgs)
Aaron Stannard
@Aaronontheweb
in terms of the Postgres HOCON
what are the table names being used?
Bart de Boer
@boekabart
default
snapshot_store and event_journal