These are chat archives for akkadotnet/akka.net

7th
Apr 2016
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:09
@corneliutusnea ok, got that out
made some minor changes to the file (SPACES FOREVER)
build server is cranking it out now
Corneliu
@corneliutusnea
Apr 07 2016 00:29
awesome
Corneliu
@corneliutusnea
Apr 07 2016 00:54
@Aaronontheweb I have lots of messages that have to go to specific actors (by path) but those actors might not be created
as the init part of the actor is quite expensive so I want to create them on demand only
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:55
create some parent actors who just listen for incoming messages
Corneliu
@corneliutusnea
Apr 07 2016 00:55
is is a good pattern to send the message to a "parent" that checks if the child is created, if not create it then forward the message? This is going down 4-7 layers.
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:55
oh yeah
was about to suggest that
first pattern we teach in our design patterns course does that
"child per entity" pattern
Corneliu
@corneliutusnea
Apr 07 2016 00:56
the issue I see is that instead of one message going from A => G I end up with 10 intermediate messages
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:56
yeah, but that's extremely fast in-memory
Corneliu
@corneliutusnea
Apr 07 2016 00:57
well, once you add the overhead in each layer to check if children are there .. it starts to add up
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:57
the overhead of checking on the first layer of node is going to be the same as routing all the way down to the bottom node
that's how actor selections work
Corneliu
@corneliutusnea
Apr 07 2016 00:57
yeah, I have 4-7 layers, each with their own checks
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:57
those checks on whether a child exists or not are very fast
it's a constant time read operation
since it uses a hash
(dictionary)
Corneliu
@corneliutusnea
Apr 07 2016 00:58
would it be more efficient to listen to the dead-message queue (somehow?) and notice the target children was not there, init all the actors from A .. G and repost the message?
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:58
you'd have to test it
the dead letters system might end up becoming a bottleneck if you're dealing with message volumes at the level where this is a concern
Corneliu
@corneliutusnea
Apr 07 2016 00:59
it would be a bit more reactive, I generally have bursts of messages so if one inits the A..G then the rest of messges will be happy
bugger
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:59
the overhead of checking to see if a child exists is very loiw
Corneliu
@corneliutusnea
Apr 07 2016 00:59
your overhead yes, but I have my own checks
Aaron Stannard
@Aaronontheweb
Apr 07 2016 00:59
doing that N times won't be too bad - what you should eventually do though is have that leaf node child reply to the sender
and then have the sender and leaf communicate directly after that if there needs to be a "conversation"
that way you only pay for the checks once
since each will hold an actor ref to each other
Corneliu
@corneliutusnea
Apr 07 2016 01:00
hm, but then if it dyes ?
Aaron Stannard
@Aaronontheweb
Apr 07 2016 01:00
Context.Watch
get a deathwatch notification
and then go back through the hierarchy again
Corneliu
@corneliutusnea
Apr 07 2016 01:04
ok .. so there is no way for a parent to monitor the dead-messages for their potential children
Aaron Stannard
@Aaronontheweb
Apr 07 2016 01:04
there is, but all dead messages go globally to the same place
Corneliu
@corneliutusnea
Apr 07 2016 01:04
yeah, so that was my question, I want to pick/intercept that in the parent not globally
Aaron Stannard
@Aaronontheweb
Apr 07 2016 01:05
yeah, not possible to do that
parent can check if the child exists first
before routing the message to it
and that's the preferred way of dealing with it
Corneliu
@corneliutusnea
Apr 07 2016 06:25
guys, is there a way to "consolidate" somehow multiple logs based on some correlation id?
"old school" code we used to be able to track multiple logs by the thread-id most of the times, now I get logs from all over the place
Alex Valuyskiy
@alexvaluyskiy
Apr 07 2016 06:26

@Aaronontheweb Have you plan to update Persistence providers for 1.0.7? I've already made pull requests for PostgreSql and SqlServer (Akka 2.4.2 compatible) providers
akkadotnet/Akka.Persistence.PostgreSql#20
akkadotnet/Akka.Persistence.SqlServer#24

and created MySql provider
https://github.com/alexvaluyskiy/Akka.Persistence.MySql
Is it possible to move this mysql implementation to akkadotnet github account?

Corneliu
@corneliutusnea
Apr 07 2016 06:26
no idea what correlates with wht
Alex Valuyskiy
@alexvaluyskiy
Apr 07 2016 06:29
@Aaronontheweb also it would be good to release a new version of Wire serializer, because 0.0.6 version has a lot of bugs
Vagif Abilov
@object
Apr 07 2016 08:20
Hello, I just posted a question on SO where I express my unhapinnes about message boxing in F# actors. Here it is:
http://stackoverflow.com/questions/36470453/how-should-f-actor-functions-be-defined-to-avoid-message-boxing
I must say while I enjoy Akka.NET F# API and prefer it to C#, this particular aspect looks better in C#.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 08:22
@object why are you boxing them at all?
and are you using Akka.FSharp?
Vagif Abilov
@object
Apr 07 2016 08:24
Yes I am using Akka.FSharp. I am boxing to be able to match messages of different types.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 08:25
from my perspective this is usually a problem with handling system messages
unfortunately .NET type system is poor and don't have anything like Ceylon's type unions (don't confuse them with union types)
Vagif Abilov
@object
Apr 07 2016 08:27
Exactly. I don't know Ceylon but I believe I understand what you mean and this is what I lack.
So this is partly a design question: is boxing mailbox messages a design smell (except system message case)? And if so, what is the better way? Can't see any better. They all suck :-)
@Horusiath but since your first reaction was "why boxing them at all?" and you work much with F#, does this mean that you avoid this scenario? But how? Putting all cases in the same type?
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 08:30
I just don't box them explicitly - I rather use let! (message: obj) = mailbox.Receive ()
optionally in Akkling this shouldn't be necessary, as system messages have active patterns which tells exactly, that pattern match is expected to work on obj value
Vagif Abilov
@object
Apr 07 2016 08:31
I see, but it's kind of the same.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 08:32
unfortunately, I haven't found a way to fix that - .NET/F# type system is too limiting for me in this matter
Vagif Abilov
@object
Apr 07 2016 08:32
What I experience is that as the system grows and needs to encounter more compex cases, more and more maiboxes lost their strong types.
And your Akkling project doesn't address this?
I know it addresses the problem of untyped messages, but that's different.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 08:35
in akkling you can spawn actor with behavior working over obj message type, but then narrow type of the messages actor ref is able to tell using retype method
Vagif Abilov
@object
Apr 07 2016 08:36
I see, thanks.
Vagif Abilov
@object
Apr 07 2016 10:22
I have a persistent actor which I want to be able to reset. In F# I represent its state using option type. Storing "Some state" works fine, but when I assign None state and call "exec" function, it raises NullReferenceException from Akka.Persistence.Journal.WriteJournalBase.AdaptToJournal.
I know that None can be optimized to null and that it's not possible to use null/None as a message to actor. But it should be possible to use None as state, shouldn't it?
Roman Golenok
@shersh
Apr 07 2016 11:26
Guys, if you interested in load testing, you can look this - https://tech.yandex.com/tank/?ncrnd=3620
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 11:57
@object In loot of F#-oriented DDD talks there is often mentioned something like state 'zero' which is initial state for target aggregate. It has more sense than using options, because empty state is usually needed once during the aggregate lifetime (at the beginning), so bearing the burden of marking each state as option (and checking it everywhere in business logic) may not be a justified case
if you're using record as a state, it may look like that:
type State = 
    { A: int; B: string}
    static member Zero = { A = 0; B = "" }
Vagif Abilov
@object
Apr 07 2016 11:59
@Horusiath thanks, yes I am using records, and what you're suggesting makes perfect sense. In fact it will simplify the logic avoiding some matches.
Vagif Abilov
@object
Apr 07 2016 12:26
Upgraded Akka to 1.0.7, testing it now in F# interactive, and I am getting almost immediately NullReferenceException with message "Default journal plugin is not configured". AFAIK this is new error message.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 12:27
what journal plugin do you use/
Vagif Abilov
@object
Apr 07 2016 12:28
I didn't overwrite it, so it's all default for test purposes. In-memory and local file system.
I.e. the config file doesn't specify any.
And my test persistent actor only takes snapshots, no history.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 12:33
looks like new version of default config loaded by @cconstantin have cleared the default journal field :/ I'll set an issue for that
until then, you should specify akka.persistence.journal.plugin = "akka.persistence.journal.inmem"
also, don't use snapshot store alone, it's missing the point
Vagif Abilov
@object
Apr 07 2016 12:39
@Horusiath thanks, I'll set the default journal plugin explicitly. What is it missing the point to use only snapshot store if some an actor only needs to persist its more recent state?
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 12:41
snapshot store has been build to optimize journal replay performance, nothing more. It works based on the assumption, that you're using journal anyway.
one of the problems may occur when you'll try to save snapshot and restart your actor right after that - since snapshots are not ACKed, and most of the db roundtrips take a lot longer that actor's restart, after restarting your actor, you have no guarantee that it won't receive an outdated snapshot from persistent store
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 12:47
we've already encountered following scenario:
  1. Actor A has state S2, while snapshot store has persisted its previous state S1
  2. A sends save snapshot message with state S2, and restarts immediately after
  3. After restarting A asks snapshots store for the latest snapshot version
  4. Since reads/writes are done asynchronously, snapshot store may retrieve state S1 instead of S2 (because S2 has not been durably stored yet)
  5. Actor A recovers with state S1
Vagif Abilov
@object
Apr 07 2016 12:51
Oh I see, that's a great explanation. I knew that journal is a primary concern and snapshot is more for optimization, but I wasn' aware that use of snapshots assumes using journal, I thought that in certain trivial cases using snapshots alone might be justified. Thx for clearing it up.
Zetanova
@Zetanova
Apr 07 2016 12:55
@object If you need only some sort of persistent cache value, like "LastPullDate", you dont need to use Persistence for this actor.
But it is nice if you create a DataPulled event and persist it in the journal.
Vagif Abilov
@object
Apr 07 2016 13:06
@Zetanova I don't only need a value, I need to assign it to the actor as its current state, so choice of persistent actors was deliberate.
Kamil Wojciechowski
@aph5nt
Apr 07 2016 13:32
"PersistentView is deprecated. Use PersistenceQuery when it will be ported." what was wrong with the views ? :D
views are nice, I can create eg. stats based on my actor events
I can partition the read side to n views, where each view is responsible for some part of data
will the PersistenceQuery offer me the same ?
Vagif Abilov
@object
Apr 07 2016 13:38
"NewtonSoftJsonSerializer has been detected as a default serializer." (in 1.0.7) even though my config has:
serializers {
wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
}
serialization-bindings {
"System.Object" = wire
}
JSON.NET is referenced in projects but I can't find any references to it in Akka context.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 14:18
@aph5nt persistence queries are quite similar with the difference, that they may operate on multiple persistence ids, and that they work in stream-lined fashion
@object are you sure, that you're applying this config right when actor system is created?
Vagif Abilov
@object
Apr 07 2016 15:49
@Horusiath since actor system reacts on other config parts (like journal plugin) I am pretty sure that it's that config that is used. But I will try building Akka from the sources, debug and check what's going on.
Weston
@ronnyek
Apr 07 2016 15:51
akka persistence will effectively allow you to simulate what orleans does?
take some report of an iot device, get actor handles that, set state
disconnect
device calls home again with updated state
persiste those updates
in an efficient manner?
Arjen Smits
@Danthar
Apr 07 2016 16:36
@ronnyek yes
Aaron Stannard
@Aaronontheweb
Apr 07 2016 17:07
@alexvaluyskiy yes and yes
would you mind rebasing your PRs to use the latest Akka.NET v1.0.7 persistence implementation off of official nuget?
and yep, I'll create a MySQL repo
@alexvaluyskiy as for Wire, cc @rogeralsing do you have any changes ready to push for that?
looks useful
Aaron Stannard
@Aaronontheweb
Apr 07 2016 17:40
@annymsMthd I think I found the issue with #1700 and #1845
we do some inconsistent stuff with the EndpointRegistry - I implemented things there in a brittle way with respect to the dictionary
#1845 found a clear example
but I've found some others
for instance, a spot where the EndpointManager could throw a NullReferenceException under some conditions
should have a PR later today with some fixes there
good news is that these are stupid bugs
not something major like a design issue
(most of it comes down to the way Scala does optional references versus where we use nullable types to mimic that)
Christian Duhard
@cduhard
Apr 07 2016 18:06
Any clue what this means?
2016-04-07 14:03:02.171 -04:00 [Warning] "akka://myactorsystem/temp" trying to remove non-child "c"
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:07
yeah, it's an issue usually with Ask
temporary actors get created in a racy container
Christian Duhard
@cduhard
Apr 07 2016 18:07
not using ask
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:07
GracefulStop too
Christian Duhard
@cduhard
Apr 07 2016 18:07
GracefulStop uses ask though
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:07
basically it means two different kill orders arrived to cleanup the actor
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 18:08
@object concerning Wire, I think something is wrong with config (or maybe F# plugin?) - I have example, which wouldn't be able to work on standard json.net serializer, so it has wire configured as default, and no warning message is printed
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:08
I'm honestly not sure why that's the case
Christian Duhard
@cduhard
Apr 07 2016 18:08
hmm
i think i know what it is. I am doing a Context.Stop() during the GracefulStop(time, new Shutdown())
that would do it, correct?
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:09
ah, yeah
Christian Duhard
@cduhard
Apr 07 2016 18:09
:)
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:09
the actor could clean itself up before the Task finishes
in that case
Christian Duhard
@cduhard
Apr 07 2016 18:10
I can remove the GracefulStop
it's unnecessary as I go all the graceful stopping myself
*go/do
hmm, forgot about one thing. this is my top level actor
how else will i know it's stopped
besides waiting for the task
life is never easy ;)
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:12
eh, don't worry about the warning
Christian Duhard
@cduhard
Apr 07 2016 18:12
this seems weird though
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:12
not the end of the world
it is
annoys me to no end with the MNTR
I'd spend more time looking at it and figuring out why, but it's low on my list of stuff to work on
Christian Duhard
@cduhard
Apr 07 2016 18:13
how else could I stop the actor, i need to stop it when everything else is complete
at the point i get that warning the actor system is functionally stopped anyways
if @Aaronontheweb says don't worry about it, i won't worry about it
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:16
BECAUSE I BELIEEEEEEEEEEEEEEEEVE
Joshua Benjamin
@annymsMthd
Apr 07 2016 18:17
@Aaronontheweb awesome!
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:17
@annymsMthd oh god man
there are issues in this thing
going way back
I just found this gem
public bool HasWriteableEndpointFor(Address address)
        {
           return WritableEndpointWithPolicyFor(address) != null;
        }
technically, this means a quarantined node is considered "writeable"
total amount of time this code has been in Akka.Remote with this setting: 638 days
public bool HasWriteableEndpointFor(Address address)
        {
            var policy = WritableEndpointWithPolicyFor(address);
            return policy is EndpointManager.Pass;
        }
fixed
Joshua Benjamin
@annymsMthd
Apr 07 2016 18:19
Ouch
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:19
yeah, this has got to be at the root of it
there's a few more issues like this
like I said, dumb stuff
Joshua Benjamin
@annymsMthd
Apr 07 2016 18:19
It happens.
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:20
I'm going to harden some of the unit tests around this code today too
there's like, obviously bad shit that should not be in here
Joshua Benjamin
@annymsMthd
Apr 07 2016 18:21
Nice. We should talk about akka android soon. We are going to be installing our new app in buses soon
Aaron Stannard
@Aaronontheweb
Apr 07 2016 18:29
Guess I should talk to our lawyers about liability insurance while we're at it
just kidding :p
but yeah, I would like to see some official support for that
might not be a bad idea to move the ConfigurationManager stuff out of the main repo as part of 1.5
will help with Xamarin support as well as .NET Core
put that stuff into a separate library that's only referenced on full-blown .NET installations
can probably do that part without needing a second nuget package
just an extra binary that only gets added to full .NET profile installs
although, nuts - kind of do need that for the automatic config loading
meh, going to need to just do #IFDEF macros then I guess
we can pretend we're C++ programmers and be all smug about it
Arjen Smits
@Danthar
Apr 07 2016 18:32
resistence is futile :P
Vagif Abilov
@object
Apr 07 2016 18:49
@Horusiath this is my case too - JSON.NET wouldn't work with my example, this is why I am trying to configure Wire. But don't have that machine now with me, will investigate tomorrow.
Chris Martin
@trbngr
Apr 07 2016 19:00
Where did ReplayMessagesSuccess go?
Chris Martin
@trbngr
Apr 07 2016 19:06
I guess that was renamed to RecoverySuccess akkadotnet/akka.net@93af339
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:27
@Silv3rcircl3 weird, having this spec fail locally now for some reason: EventFilterTestBase
a couple different implementations of it - never seen that before
ever had any problems with that?
Marc Piechura
@marcpiechura
Apr 07 2016 19:29
@Aaronontheweb you mean the remote spec ?
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:29
no
these are testkit specs
SS coming
blob
Marc Piechura
@marcpiechura
Apr 07 2016 19:33
Tbh I don't know anything about it, I know there was the PR which added the overload for a custom ActorSystem but haven't run the tests locally for a long time
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:33
I had it fail locally on ./build.cmd all which is bad
since that's build server stuff
Marc Piechura
@marcpiechura
Apr 07 2016 19:34
Why do you think I know something about it ? :)
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:35
shows you were one the last people to touch it :p
Marc Piechura
@marcpiechura
Apr 07 2016 19:35
o_O
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:35
blob
I think I've found the issue
 protected EventFilterTestBase(string config)
            : base(@"akka.loggers = [""" + typeof(ForwardAllEventsTestEventListener).AssemblyQualifiedName + @"""], " + (string.IsNullOrEmpty(config) ? "" : config))
        {
            //We send a ForwardAllEventsTo containing message to the TestEventListenerToForwarder logger (configured as a logger above).
            //It should respond with an "OK" message when it has received the message.
            var initLoggerMessage = new ForwardAllEventsTestEventListener.ForwardAllEventsTo(TestActor);
            // ReSharper disable once DoNotCallOverridableMethodsInConstructor
            SendRawLogEventMessage(initLoggerMessage);
            ExpectMsg("OK");
            //From now on we know that all messsages will be forwarded to TestActor
        }
assertion in the constructor of the test
Marc Piechura
@marcpiechura
Apr 07 2016 19:38
Man I really can't remember that I ever touched this code, will check my PR's from this time
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:39
smells to me like a race condition where something isn't started before this command fires
but not otherwise
works fine when I debug it
Marc Piechura
@marcpiechura
Apr 07 2016 19:47
Sorry can't look into it at the moment, can you show me in which PR I changed that? I can't find it
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:47
honestly I'm kind of puzzled by this
it's not even the EventFilter stuff that broke this
it's like the testkit initialization is fucked up
ah nope
sure enough
there is a bug here I'm pretty sure
Kris Schepers
@schepersk
Apr 07 2016 19:52
@Horusiath I just tried my sharding example again, this time with the new nuget packages.. The issue of the shards not being rebalanced is still there I'm afraid.
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 19:55
I'll try to take a look at this during the weekend. I'm feeling that fixing multinode test runner spec for cluster sharding should help to answer/predict this issue.
I assume that's not the reason for this ;)
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:58
ah, yeah probably not
I'm going to revert the changes made to the EventFilter if I can't get this to pass
Marc Piechura
@marcpiechura
Apr 07 2016 19:59
we haven't used it anyway if I remember correctly
Aaron Stannard
@Aaronontheweb
Apr 07 2016 19:59
I have more important bugs to fix
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:21
can't reproduce on build-server
Kris Schepers
@schepersk
Apr 07 2016 20:21
@Horusiath Thanks! In the meanwhile I'll go for a simple coordinator for our first version then..
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:21
re-cloning locally
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:22
@Aaronontheweb some next bug-fix release planning?
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:23
fix the bugs first
then release the fixes :p
that's my plan
Aaronontheweb 2016
but yeah, sure seems like we need to
are you working on that issue with the default Akka.Persistence config?
because that needs to go out today
or soon
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:24
I'd like to include this issue @schepersk has submitted to it
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:24
get a PR in
and we'll make it happen
I'm working on making sure we didn't break the TestKit at the moment
good news is that I think the answer is "no"
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:24
I just run the whole suite
when finished, I'll take a look into akkadotnet/akka.net#1863
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:25
ty sir
I'm working on #1700 and #1845
I think I have #1845 fixe
Zetanova
@Zetanova
Apr 07 2016 20:30
Is there some kind of circular buffer in akka, to coorelate some Id's ?
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:33
@Zetanova I guess not
btw. nice talk about new enterprise stack @Aaronontheweb
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:34
@Zetanova Helios has one internally that you can grab from the soruce
source*
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:34
I'm always starting presentation from saying how most of the listeners won't probably need a thing, from what I'm gonna talk about ;)
Aaron Stannard
@Aaronontheweb
Apr 07 2016 20:34
thanks @Horusiath - glad you liked it
Zetanova
@Zetanova
Apr 07 2016 20:34
i am getting so drepssed, with the actor model, resolving one thing leads to 2 new
Or some slim timeout cache for Id's
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:36
@Zetanova are you sure, you're not over-engineering things? It's really easy to do so by accident
Zetanova
@Zetanova
Apr 07 2016 20:36
I have in my AggregateCoordinator a backpressure algo.
no i have two "Importer"
from two sources
the need to lookup if the AR exsists
i made a Flush command (Basicly a Loop to the Projector), it is working
but if the "Create" AR command is in the backpressure Queue
that will not help
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:39
I'm worried that I won't be able to help without some sort of a drawing here
Zetanova
@Zetanova
Apr 07 2016 20:39
Its basicly GetByForeignKeyOrCreate problem
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:40
what is backpressure queue in your case?
Zetanova
@Zetanova
Apr 07 2016 20:40
1000 active AR's rest goes in the queue
the AggregateCoordinator tries to shutdown the AR's and the AR's will maybe passivate
but if two Sources are looking for the ForeignKey in the readside (even with flush-command)
they second will not find it because the "Create" command is still in the backpressure queue
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:43
what is Create command here?
Zetanova
@Zetanova
Apr 07 2016 20:43
Create AggregateRoot
example: Account has Id and Name
First Processor: Flush, GetAccountByName or Create-Command
Second Processor: Flush, GetAccountByName or Create-Command
it is working
until the Create-Command is still in the air
or in the backpressure queue
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:45
if you're relying on GetByKeyOrCreate, why are you having Create here?
Zetanova
@Zetanova
Apr 07 2016 20:46
its not the Key its a query and i need to know if the AR exsists to get his Id or create it
now i thought i am extracting the critical values into a cirucalr buffer
to look it up
I am getting the data from two sources that are basicly two Actors that processing the incoming data
they lookup if it is allready there if not, the create the new AR
one of them should create a new AR, but send to the exsisting one some "patch" commands
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:51
why they are in order of creating it? shouldn't that be a concern of separate actor?
Zetanova
@Zetanova
Apr 07 2016 20:53
yes, thats my plan, but for that i would need some kind of buffer, to lookup the last
will try tomorrow, gn8
Bartosz Sypytkowski
@Horusiath
Apr 07 2016 20:56
np, see you tomorrow
Aaron Stannard
@Aaronontheweb
Apr 07 2016 21:45
@Horusiath I'll see about helping out with some of these Akka.Persistence test failures too