These are chat archives for akkadotnet/akka.net

20th
Feb 2016
Rambo Ong
@rambo406
Feb 20 2016 05:24
Hi everyone, anyone knows where can I find documentation on how to manually replay persistence events? What I am trying to achieve is refresh my read model. Thanks.
Zetanova
@Zetanova
Feb 20 2016 11:51
@rambo406 best way is to fork the repository and look at the code. You need only to send a request message to the journal, it will reply then the events to the requestor and sends a ReplaySuccess message.
Zetanova
@Zetanova
Feb 20 2016 11:59
its the reverse version from read-side to write-side, just use the Read-message to get the events from the journal.
Zetanova
@Zetanova
Feb 20 2016 12:07
@Horusiath How to deside when to put logic in the AR and when to extract it to a ProcessManager. Should an AR get slim or fat?
Roger Johansson
@rogeralsing
Feb 20 2016 13:36
Do we have any CouchDB persistence on the way?
Christian Sparre
@christiansparre
Feb 20 2016 13:48
I'm seeing pretty poor performance in one of my actors and have narrowed it down to probably being a Stash.UnstashAll() call that happens very often, in my test I get 10000 msg's through in about 12 sec which seems slow (the unstashall call takes .5-1 ms). Is that to be expected using the stash? The scenario is process a message Tell another actor and wait for response before processing other messages. Im using Become() to change behavior.
Christian Sparre
@christiansparre
Feb 20 2016 14:10
Any tips for "profiling" an actorsystem to discover bottlenecks?
Vedat Nommaz
@nommaz
Feb 20 2016 15:14
Hi, I have an akka.net project on upwork if anyone is interested in some freelance work.
Roger Johansson
@rogeralsing
Feb 20 2016 15:16
@christiansparre my guess is that you are paying the price for re-scheduling if you do a lot of stashing.. if you stash all messages, there is nothing more for the actor to do once the current message is done, then the next time a message arrives, it needs to be placed on the threadpool again and wait for its turn
that is very likely the case, lets say there is a 2ms penalty for scheduling. if you have 10000 messages, that would be 20 000ms, thus 20sec.. think of it like starting and stopping the engine of a car every time there is a new task to be done
Roger Johansson
@rogeralsing
Feb 20 2016 15:23
@nommaz cool! want us to retweet it for more exposure?
Kamil Wojciechowski
@aph5nt
Feb 20 2016 15:24
question, should event subscription to the remote actor work?
system.EventStream.Subscribe(system.ActorSelection(cmd.RateProxyAddress).Anchor, typeof<Rate>) |> ignore
?
This message was deleted
This message was deleted
This message was deleted
voltcode
@voltcode
Feb 20 2016 15:33
not sure if you've already found that but akka.net docs redirect to akka's and it says that remote should work if explicit http://doc.akka.io/docs/akka/snapshot/java/event-bus.html
ctrl+F "local"
Roger Johansson
@rogeralsing
Feb 20 2016 15:43
@aph5nt yes subscribing using a remote should work, the code you pasted might not give what you expect though, ,Anchor is not the same actor as the path, its the root actor for that actor selection start.. probably /remote or some other system actor
if you want the actor for an actorselection use selection.ResolveOne().Result
Kamil Wojciechowski
@aph5nt
Feb 20 2016 15:56
@rogeralsing thanks!
Vlad Kosarev
@vladkosarev
Feb 20 2016 16:01
I am testing some persistent actor stuff and don't have any snapshot implementation anywhere. Yet somehow one actor is getting SnapshotOffer and instead of recovering all the events it just loads the very first event and stops. Any clue what that could be?
This is using Event Store
Magnus Lindhe
@mgnslndh
Feb 20 2016 16:01
Hi! Are there any samples on using the FSM actor base class? I've read the documentation http://getakka.net/docs/FSM but I wonder if there is anything more written on the subject.
Roger Johansson
@rogeralsing
Feb 20 2016 16:06
@mgnslndh I dont think there is, personally I mostly use normal ReceiveActor and Become/Unbecome for statemachines, but the FSM actor adds some more features, such as changing behavior based on time
Rambo Ong
@rambo406
Feb 20 2016 16:08
@Zetanova Is it possible to just replay everything inside EventJournal table? From the file you attached, I can see it is only replay for a single entity.
Magnus Lindhe
@mgnslndh
Feb 20 2016 16:15
@rogeralsing Ok, maybe I'll try that instead. Seems to me that using FSM<TState,TData> you should only tell that actor a message of TData. But using Become/Unbecome you can setup exactly which messages are expected for each state.
Roger Johansson
@rogeralsing
Feb 20 2016 16:16
exactly. become/unbecome is a lot easier to read IMO as the code gets separated. (that might be a matter of taste though, but for me at least)
Zetanova
@Zetanova
Feb 20 2016 16:19
@rambo406 dont see any message beside ReplayMessages, but it requires a PersisitenceId , maybe @Horusiath knows something
Zetanova
@Zetanova
Feb 20 2016 17:14
This message was deleted
Bartosz Sypytkowski
@Horusiath
Feb 20 2016 17:58

How to deside when to put logic in the AR and when to extract it to a ProcessManager.

My rule of thumb for ProcessManager/Saga is that, if aggregate needs to run a process, which requires participation of another aggregate and cannot be fulfilled in a single step (so many message must be passed between those two), then this is a place where saga/manager will be necessary

@rambo406 @Zetanova Query side is heavily dependent on underlying journal representation. For SQL-based journals you can use query requests - but in real life scenario you probably want to put constraints on them.
Aaron Stannard
@Aaronontheweb
Feb 20 2016 21:05
@rogeralsing yeah, there's someone in here who's been working on it
CouchDB persistence
voltcode
@voltcode
Feb 20 2016 21:16
hi @Aaronontheweb, I noticed a difference in first "healthy" join and the second on remoting layer- in first case the sequence is Outbound Unassociated, sendAssociate, OutboutUnderlyingAssociated. On the second "failed" join, the sequence of remoting actions is outboundUnassociated, sendAssociation and InboundUnassociated on the node thats trying to join. Do you know what's causing that difference ? Could it be the quarantining by the other node?
another difference is that EndpointWriter in healthy join on the seed node has a handle set, so PreStart starts the ReadEndpoint, but on the failed join it tries to Associate with refuseUid=null
which causes AssociateUnderlyingRefuseUid to circulate and break out from the previous healthy flow
there's so much going on in remote that I don't know which place to start :/ I'v spent a couple of hours today on debugging and drawing the message flows and state changes to no avail
and on cluster layer, downing of the quarantined node so that reincarnation can join is repeated over and over where it should do it once and then let it join
Aaron Stannard
@Aaronontheweb
Feb 20 2016 21:23
make sure you add all of that to the issue if you haven't already
I haven't had a chance to block out time yet to go through it
but all of this detail will help me
voltcode
@voltcode
Feb 20 2016 21:27
ok I will
voltcode
@voltcode
Feb 20 2016 23:09
I tried running some MNTK tests for the first time and I noticed that MNTK has xunit 2.0 reference while cluster.tools.tests reference xunit 2.1 and therefore crashes when running in MNTK - I remember there was an issue with xunit version before, but can't find it now - should I create an issue for this ?
ah I see akkadotnet/akka.net#1616 - theres a comment from @Horusiath - not sure if I should create new issue or should we change the title for #1616
voltcode
@voltcode
Feb 20 2016 23:15
I can do the change for xunit package, not sure about testing with dnx though