These are chat archives for akkadotnet/akka.net

26th
Jun 2015
Aaron Stannard
@Aaronontheweb
Jun 26 2015 05:43
lol, so @stefansedich was able to get the build server to start running all of the unit tests on Mono
including the multi-node specs
looks like none of the standard out redirection that the MultiNodeTestRunner relies on works on Mono thus far :p
@Horusiath any ideas on what could be the cause of this issue? Just started happening on all of the projects where I've upgraded to the latest version of FAKE akkadotnet/Akka.Persistence.PostgreSql#2
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 05:48
it looks like you're using a wrong permission set to execute the command
but I think, it's not an answer you're looking for :P
Aaron Stannard
@Aaronontheweb
Jun 26 2015 05:48
it's the same code that Akka.NET uses for FAKE
works fine for Akka.NET, but not for Akka.Persistence.PostgreSql :\
I ran into this issue when I was setting up Mono builds for Helios earlier this week too
new version of FAKE started err-ing out on that line
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 05:50
maybe it's time to call Na Na Na Na Na Na Na ... forkman!
Aaron Stannard
@Aaronontheweb
Jun 26 2015 05:50
haha
I've bothered him a lot this week :p
guess one more time couldn't hurt
he's my personal stack overflow when it comes to build system issues
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 05:54
he's a very helpful person, when you need to make his things work in your scenario
yes he is
been super helpful
@Horusiath I should be able to get CI working for MongoDB / SQL Server / Cassandra tomorrow
have a good template for it now
CC @Silv3rcircl3 https://github.com/akkadotnet/Akka.Persistence.PostgreSql - do you think you could get all of these build scripts / folder layout replicated into the structure of the MongoDB repository? That would make it super easy for me to turn on CI for it tomorrow.
and could you also let me know if there's anything I need to configure inside Mongo? user accounts and such
the instructions that @davidflerlage included inside the Postgres readme made it super easy for me to set up Postgres correctly
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:03
added Github integrations for all of the Akka.Persistence integrations in the Gitter chat room, so any PRs / comments made on those should show up now inside this Gitter chat
also added one for http://getakka.net while I was at it
Marc Piechura
@marcpiechura
Jun 26 2015 06:14
@Aaronontheweb
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:16
if you can get that to work that would be awesome
I had to bail on SQL Server LocalDB due to insane permissions issues with Azure VMs
Marc Piechura
@marcpiechura
Jun 26 2015 06:16
I will try ;)
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:16
if Mongo2Go doesn't have that issue we could try that out
that way our build servers work
is we dynamically spin up and down new build agents on-demand
whenever a PR comes in
so the server gets created in a clean state
Marc Piechura
@marcpiechura
Jun 26 2015 06:18
It starts a mongodb instance in a console and uses c:/data as database directors that could maybe an issue
Directory
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:18
fuck, I wanted to write specs for Akka.Cluster.Tools and Akka.Cluster.Sharding, so I've pull the latest version of akka ⇒ TypeSafe guys changed half of the code :/
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:18
:(
I'm still working on documenting our multi-node tests too
but been tied up with VM management and Mono toolchain stuff this week
found a definite bug in the MultiNode TestKit
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:19
also there is a nice (and big) task about implementing FSM persistent actors
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:19
TestConductor deadlocks about once every 6 runs or so on the hardware we're using
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:19
who was porting FSM?
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:20
I ported the original FSM implementation
over a year ago
hasn't been touched since
anything in particular about it that needs to change? been a while since I've looked at it TBH
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:20
I don't know yet, how much of it could be reused, since in akka-persistence it looks like they written everything from scratch
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:21
ugh
@Silv3rcircl3 can you make it so I can edit app.config and change the directory it writes to?
I'd like to use temporary storage on the azure VM, which is drive D:\
for all of that stuff
no worries if you can't
I couldn't make that work for SQL Server either
well, SQL Express anyway
but then again, writing to C:\ is harmless
it'll be some extra I/O ops for Petabridge but the Akka.Persistence tests are pretty light anyway
Marc Piechura
@marcpiechura
Jun 26 2015 06:23
Let me see, haven't changed the configuration from mongo2go before but it should be possible
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:23
even if you can't change it I think we'll be fine
Marc Piechura
@marcpiechura
Jun 26 2015 06:23
Ok
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:23
I was over-optimizing stuff in my head :p
Marc Piechura
@marcpiechura
Jun 26 2015 06:23
Hehe
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:23
when I spoke the first time
@Horusiath I'm getting back into the swing of things this week, so I can help you out with some of the Akka.Persistence stuff
should have most of this CI stuff settled by Monday
want to have #998 closed out by then
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:25
what is the scope for the next release? I think that Akka.IO + Akka.Persistence.MongoDb should be included
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:26
depends on if we do another small release
1.0.5
if Akka.IO is ready to go and MongoDB support is too
then we could forseeable do another bug fix release
@rogeralsing fixed some pretty serious bugs in Akka.Remote
so I'd like to get those out the door too
and that NUnit fix I just pulled in today is an issue that affected my own projects
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:27
yes, I think I must start to work more with remote and cluster code base - I haven't touch anything there any my knowledge is little in these domains
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:27
so yeah, there's enough here to merit a maintenance release I think
I'm going to try to do another Akka.Remote internals video on how the heartbeat system works
I get a lot of questions about that during the trainings
I also want to do one on the ActorCell
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:28
I've got a lot of questions about secure layer for remote connections ;)
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:28
me too :p
my primary goal, even ahead of the Akka.Cluster stuff
is now Helios 2.0
I wanted to take care of this DevOps stuff for Akka.Net first though so the technical debt doesn't pile up
kind of amazing how quickly our Mono build support broke - had all of that stuff working for 1.0
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:30
I was curious - do we have implemented packets squashing for tcp frames?
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:30
10 weeks later and the build process literally kills the Mono garbage collector
@Horusiath packet squashing?
not sure I follow
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:32
you know, when we have a lot of small messages, sending each one in separate tcp frame it's not the best option (frames often have fixed sizes), an optimization trick is to wait a little and put several messages into single frame before sending
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:32
ah
no, Helios currently does not do that
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:32
looks like an interesting problem to solve :P
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:32
that's something that would be easy to implement though inside Helios 2
the big thing I'm bringing over is the true pipelining system that Netty has
which adds a ton of extensibility points that are currently a pain in the ass to do
in order to do that type of message framing you basically need a two-step decoding process
because the way messages get framed right now is length-frame encoding
so if you'd either need to implement an encoder who would be responsible for batching messages together without adding a new frame-length header
which means that those batched messages would all still appear as individual messages on the receiver side
or you'd zip all of those messages into a contiguous envelope
decode that from the byte buffer and then recursively do it again for each individual message in the frame
but that's a cool idea though
I like it
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:35
I could help you a little with Helios, but in that case work need to be spliced into tasks and some architectural overview would be nice :P
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:36
I would really appreciate that
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:36
(TBH I want to create some finagle-inspired C# library using Helios)
Aaron Stannard
@Aaronontheweb
Jun 26 2015 06:36
I'm moving onto that full time once I escape from DevOps island
and I need to document the multi-node tests and get someone to help start working on that on Akka.Cluster in parallel
areas where I need help with Helios:
  1. Pipeline API
  2. Dealing with async inside individual pipeline steps
  3. TLS support
  4. Specs and perf benchmarks
I'll lay out an architecture for this stuff and start working on the pipeline API, since that kind of sets the stage for everything else
items 2-4 I don't have a clear vision yet on how they'll be implemented, although I imagine they'll roughly follow Netty's design since that's considered to be state of the art
but I'd be even happier if someone else wanted to design that stuff :p
alright, it's super late here and I'm still at the office - going to pack it up and head home.
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 06:40
ok, see you later
Victor Gladkikh
@alfeg
Jun 26 2015 07:27
Hi. First of all, gratz for that great lib!
I have one question. is it supported to run several nodes/clusters on same port? We have multitenant application and I don't want to specify separate port for each tenant. So each tenant will have separate cluster possibly running in same VM(in dev env)
Arjen Smits
@Danthar
Jun 26 2015 07:28
if you have an multitenant application. Why not have one cluster that can handle your multitentant data ?
your cluster can easily seperate work for each tenant to their own actors
or maybe im misunderstanding the question :P
Marc Piechura
@marcpiechura
Jun 26 2015 07:37
@Aaronontheweb the good news is I could switch the tests to mongo2go so you do not need to install a mongodb instance on the vm, the bad news is that the data directory is a const so I can't change it but I have created a PR to change this. As far as the PR is merged and a new version is released, I would add a parameter to the app.config where you can change the directory
Arjen Smits
@Danthar
Jun 26 2015 07:39
Ok i got something i need an extra pair of eyes on
I recreated a scenario from my application in gist. Or at least, the message flow.
And i got some wierd stuff with the roundrobinpool supervisor strategy
its seemingly not being used.
Timur Babyuk
@timba
Jun 26 2015 07:50
Just curious. Guys, did you ever consider ZeroMQ networking before started with Helios?
Victor Gladkikh
@alfeg
Jun 26 2015 08:15
@Danthar , it's a policy for our app data. In production we have even ElasticSearch clusters separated. I've just done simple test, and it's seems that Akka can properly handle port binding just like I'm expect.
Chris Ray
@chris-ray
Jun 26 2015 11:52
Does anyone have any examples of using Akka.Net in a WPF application preferably using the MVVM pattern. I've started a blank project and just can't quite grok how to incorporate an actor system with the MVVM pattern. Are actors also view models? Can't databind to an IActorRef, etc... I couldn't find a WPF example in the docs and any direction would be appreciated (even if it's: why the hell would you want to do that). Thanks!
Marc Piechura
@marcpiechura
Jun 26 2015 12:04
@chris-ray the bootcamp has a charts example but with winforms and without mvvm;-) I'm also interested in this topic, so if you found one, please let me know :-)
Chris Ray
@chris-ray
Jun 26 2015 12:07
yeah I'm looking at the winforms example right now, it's not helpful in the wpf/mvvm realm. I'm still bouncing around ideas in my head trying to come up with a good approach. I don't actually have an endgoal, I'm just experimenting. I've been burned by bad cross-thread WPF, synchronization errors etc... in the past, just wondering if Akka.NET+WPF could be a match made in heaven. Not sure though... they almost seem to be mutually exclusive because of the nature of actor handles vs hard references.
Timur Babyuk
@timba
Jun 26 2015 12:24
@chris-ray I didn't work with Akka+WPF but one of the main things you need to keep in mind is synchronisation with UI thread when updating UI. Read about dispatchers which responsible for for message processing scheduling, especially SynchronizedDispatcher: http://getakka.net/docs/working-with-actors/Dispatchers#synchronizeddispatcher
Chris Ray
@chris-ray
Jun 26 2015 12:30
Thanks timba. I'm sure the synchronizeddispatcher comes into play somewhere, but where? With WPF+MVVM the view models don't directly update the UI, the UI is bound to the viewmodels via XAML Data Binding. So the View Models must be on the UI thread. But is the ViewModel an Actor? (for example, a ListView with 1000 items, each item is a viewmodel/actor). If each viewmodel is an actor, but all I have are IActorRefs, views cannot bind to an IActorRef. Maybe I'm just missing a key point and the Akka guys will make me feel sheepish :smile:
By the way, I know a lot of bleeding-edge people like most of us in this room think WPF is "dead" but it's simply not true. There is a huge amount of greenfield WPF development going on in the enterprise, at least in my industry (energy). Therefore, I'm always looking for ways to increase my efficiency (read: increase $$$) which is why I'm experimenting with Akka.Net + XAML/WPF/MVVM
Chris Ray
@chris-ray
Jun 26 2015 12:39
I also second @timba 's question about ZeroMQ
Natan Vivo
@nvivo
Jun 26 2015 12:48
@chris-ray IIRC the idea there is to make the actor replace the code that updates the form. you start an actor using a synchronizeddispatcher tied to the form ui thread, and pass the form or the required controls to the actor, so it can update the datasources based on messages it receives. in that context, your data sources may be inside the actor or may be passed as reference to the actor. the point is that the actor updates those objects in the right thread using that dispatcher
Chris Ray
@chris-ray
Jun 26 2015 12:51
@nvivo Thanks for the comment! If I understand you correctly though, this is the winforms style and goes against MVVM where you never explicitly update view logic from business logic.
Natan Vivo
@nvivo
Jun 26 2015 12:51
not exactly
you can use whatever you want, the purpose of the actor is to receive messages from anyplace and deliver in the right thread to the ui
what you use to update the up doesn't matter really
for example, you may use the actor to receive message from N remote sources and just update an object WPF uses as datasource
Chris Ray
@chris-ray
Jun 26 2015 12:52
ok so is the "UI" a ViewModel in this case, or a direct handle to a View?
Marc Piechura
@marcpiechura
Jun 26 2015 12:52
You can pass in the view model to the actors constructor
Natan Vivo
@nvivo
Jun 26 2015 12:53
right
Chris Ray
@chris-ray
Jun 26 2015 12:54
ok so it sounds like @Silv3rcircl3 and @nvivo are on the same track, the ViewModel is handed to an Actor, the Actor updates the viewmodel since it is a direct reference in itself...
Natan Vivo
@nvivo
Jun 26 2015 12:54
exactly
the actor is the gateway you have to send messages to the ui
Chris Ray
@chris-ray
Jun 26 2015 12:55
interesting so Actor != ViewModel. Let me play around for a few minutes
Natan Vivo
@nvivo
Jun 26 2015 12:55
please note that akka + wpf is not a "default solution" to any ui. it's just something that makes sense in some cases
it's good when you need to update the UI quickly from external sources or threads
Marc Piechura
@marcpiechura
Jun 26 2015 12:56
And have you looked at reactive UI? It uses reactive extensions under the hood and makes sure that the binding happens on the UI thread automatically. That was my plan ReactiveUI + Wpf + Akka + event sourcing with the persistence actor ;-)
Timur Babyuk
@timba
Jun 26 2015 12:56
If I created WPF app with actors I'd thought first about single responsibility segregation. Those actors which deal with UI should be separated in your actors hierarchy. These actors can keep your view models references and update them on message receive event. To ensure that UI actors process incoming messages in UI thread you need to configure HOCON deployment section so that they were dispatched by SynchronizedDispatcher
Chris Ray
@chris-ray
Jun 26 2015 12:58
@nvivo so you mean unless I have a need for highly reactive UI where data is coming in rapidly (stock trading app for example) then it's probably not the right tool for the job?
@Silv3rcircl3 I have not... but the the ReactiveUI + Wpf + Akka + event sourcing comment makes me want to disappear into a cave with nothing but my laptop for the next three weeks... Sounds very cool. I've been using GetEventStore in my projects for the last 2 years
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 12:59
guys, how can I ask Actor outside of akka context?
Natan Vivo
@nvivo
Jun 26 2015 12:59
almost that. akka is good at receiving messages from anywhere and processing them in order. if your UI requires constant messages coming from somewhere, it's a good call.
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 12:59
I want to get data from it
Natan Vivo
@nvivo
Jun 26 2015 13:00
@OlegGavrilov yes. You need to use actorSystem.ActorSelection("/user/actorName")
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:00
@nvivo and then what? actorRef.Ask<T> requires sender
Natan Vivo
@nvivo
Jun 26 2015 13:01
right. ActorSelection has a Tell method
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:01
but I need to get data from actor
Natan Vivo
@nvivo
Jun 26 2015 13:01
@OlegGavrilov the way you get data from an actor is to send it a message, so it can reply
do something like actorSystem.ActorSelection("/user/my-actor").Ask(new GetDataRequest(123)); the actor handles that and replies to the sender
Chris Ray
@chris-ray
Jun 26 2015 13:02
@timba Ok cool. How do the ViewModels then communicate back to the Actor system? Say I have an ICommand (button press) in my VM and it needs to fire a message to SomethingActor. What would be best practice? Static reference to actor system is always a bad idea... would the ActorSystem be given to the VM as a constructor arg? Or something else entirely?
Timur Babyuk
@timba
Jun 26 2015 13:03
you can keep IActorRef objects to tell back to actors
Marc Piechura
@marcpiechura
Jun 26 2015 13:04
@chris-ray I think the only missing part is the read model, there is a persistence view but it's bound to a single persistenceID so you can't use it for query stuff :(
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:04
ok, @nvivo thank you! missed some casts on my actor, so it didnt show "ask" methods after I resolved actor from system.
Natan Vivo
@nvivo
Jun 26 2015 13:05
actorselection shouldn't need casts for ask
Ask is implemented as an extension method, i think you need an "using Akka.Actors" or something like that
Chris Ray
@chris-ray
Jun 26 2015 13:05
@Silv3rcircl3 without thinking about it deeply, it seems like actors can be used for a readmodel, since they maintain state
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:06
@nvivo I've did .ResolveOne() on it, so when I had "var actor = selection.ResolveOne();" actor did not had "Ask<T>" method
works now, anyway
@nvivo yep, added that namespase did the trick
Natan Vivo
@nvivo
Jun 26 2015 13:07
@OlegGavrilov that works, but you don't need to.
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:07
nothing with casts
resolving is not needed?
I can ask actorselection?
Natan Vivo
@nvivo
Jun 26 2015 13:07
@OlegGavrilov ActorSelection sends messages to any actor in that path. Resolve one simply exchanges some messages to find the first actor that replies in that path
if you have a single actor in that path, it should be the same
Marc Piechura
@marcpiechura
Jun 26 2015 13:08
@chris-ray Yeah maybe I'm missing something, have only read about eventsourcing and cqrs and can't figure out how I would query like Firstname = "something" and creationdate > last week
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:08
@nvivo thanks!
Natan Vivo
@nvivo
Jun 26 2015 13:09
@OlegGavrilov sure
Chris Ray
@chris-ray
Jun 26 2015 13:10
@Silv3rcircl3 perhaps we could chat outside of this channel about it. Basically the events come in and your readmodel(actor) uses them to change state into the exact model of the data you need. You don't need random querying because your readmodels are in the state you want. They're "pre-queried" if you will
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:11
by the way, about selecting actors and remoting - if i have two hosts on different machines with equal AkkaSystem names, can I use "system.ActorSelection("/user/actor-on-second-machine");" ?
Chris Ray
@chris-ray
Jun 26 2015 13:12
@Silv3rcircl3 or also, the readmodel has the data in memory, and therefore you can just use Linq against it to query things like x.Firstname == "chris" && creationdate > DateTime.UtcNow.AddDays(-1)
Timur Babyuk
@timba
Jun 26 2015 13:13
@chris-ray how to get initial IActorRef reference, it depends.. one of best practices is dependency injection. as I know there exist WPF integration with some popular DI containers like Unity. and what you need is to configure container to find specific (UI) actors
Natan Vivo
@nvivo
Jun 26 2015 13:13
@OlegGavrilov yes you can, but the path to remote actors is a little different - unless you use akka cluster - but the idea is the same
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:14
so, I must specify ip to remote system?
about that Akka.Cluster thing - is it ready?
Marc Piechura
@marcpiechura
Jun 26 2015 13:15
@chris-ray would be great if I could ask you some question about this topic, will talk to you soon ;)
Natan Vivo
@nvivo
Jun 26 2015 13:15
@OlegGavrilov I recommend you taking a look the remoting docs in the getakka.net website. there are also some videos from petabridge: https://petabridge.com/blog/akkadotnet-remote-deploy-actors/
Chris Ray
@chris-ray
Jun 26 2015 13:16
@Silv3rcircl3 sure, just sent you a PM
Natan Vivo
@nvivo
Jun 26 2015 13:19
@OlegGavrilov akka cluster is in pre-release, but there are people using it in production already
Oleg Gavrilov
@OlegGavrilov
Jun 26 2015 13:19
@nvivo thanks! will look into that
Natan Vivo
@nvivo
Jun 26 2015 13:19
@OlegGavrilov petabridge has a video on that as well: https://petabridge.com/blog/intro-to-akka-cluster/
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 13:29

@chris-ray Yeah maybe I'm missing something, have only read about eventsourcing and cqrs and can't figure out how I would query like Firstname = "something" and creationdate > last week

It's not so easy with Event Sourcing. But some of the akka journals and snapshot implementations should have an ability to publish incoming events on the akka event bus of local actor system, they are deployed on. Then you can use actor listening on it in order to save the data in eg. grid format more appropriate for querying.

but in the first place make sure, that Event Sourcing is what you need ;)
Chris Ray
@chris-ray
Jun 26 2015 16:00
Ok I've successfully married WPF+MVVM+Akka.NET by having a main UI actor that is configured for sync-thread and each ui-related view model underneath seems to inherit that. I created a Gist of a basic fake stock-polling wpf app: gist if anyone wants to take a look. Most of it is boilerplate, and it's more complicated than it needs to be because I went down the road of "modularity"... This modularity seems super powerful though
Arjen Smits
@Danthar
Jun 26 2015 17:08
Im still looking for a solution for my roundrobinpool supervisor strategy thingy. If someone could provide some feedback on that. that would be great. @rogeralsing or @Aaronontheweb perhaps ? If im doing something wrong please tell me :P cause im not seeing it.
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 17:54
@Danthar what is your case?
Arjen Smits
@Danthar
Jun 26 2015 17:59
posted a gist half a scroll bar up ^^
but basically, im passing an supervisionstrategy to an roundrobinpool. but when i throw exceptions in my routee's the supervisionstrat is never called
Arjen Smits
@Danthar
Jun 26 2015 18:05
im not sure if the forwarder is a significant aspect of the scenario. but i wanted to keep the message flow the same as in my application, so i have put it in.
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 18:12
what is the behavior you expect?
Arjen Smits
@Danthar
Jun 26 2015 18:13
I expect the Worker to throw an exception which is handled by the supervisionstrategy i passed in here..
              childRef = Context.ActorOf(Props.Create<worker>()
            .WithRouter(
                new RoundRobinPool(5)
                .WithSupervisorStrategy(routerStrategy())
            )
            , "worker");
which in its turn tells it to escalate
so it should be handled here:
    private SupervisorStrategy routerStrategy() {
        return new AllForOneStrategy(5, TimeSpan.FromSeconds(10), (ex) =>
        {
            return Directive.Escalate; //<-- i expect this to be hit. But it never is.
        });
    }
which is in the IntermediateActor which is the parent of the Router
which also tells it to escalate
so it ends up at the Importer Actor, which returns a Stop command
however the routerStrategy is never even called.
it all works, if I dont use a RoundRobinPool. but use a normal actorref
if i dont use a router, the escalations and all work perfectly and the whole things stops after the first error.
Aaron Stannard
@Aaronontheweb
Jun 26 2015 18:18
so is the router not picking up the SupervisionStrategy then?
Arjen Smits
@Danthar
Jun 26 2015 18:18
it seems like it.
no breakpoints are hit, and the test app never stops.
Aaron Stannard
@Aaronontheweb
Jun 26 2015 18:18
can you add a logging statement to lambda that returns your directive?
just because :p
we had an issue with routers and supervisors recently IIRC, but I thought it was patched in 1.0.2
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 18:19
I'm running your example and routerStrategy gets invoked
Arjen Smits
@Danthar
Jun 26 2015 18:19
hmm. im using the latest nuget packages
i can try building from source and try again
Bartosz Sypytkowski
@Horusiath
Jun 26 2015 18:20
also app will never stop, because you never shut it down
I've get the one from the nuget
Arjen Smits
@Danthar
Jun 26 2015 18:20
sure i do. In the Importer i have a deathwatch on the forwarder. Which should stop.
upon receiving the Terminated message, i invoke the system.shutdown
your using the nuget packages?
thats just nuts
ill first clear my nuget cache then and restore
you never know
Aaron Stannard
@Aaronontheweb
Jun 26 2015 18:22
if that doesn't work, see if you can create a failing spec using the Akka source
"nuke the planet from orbit, it's the only way to be sure!"
Arjen Smits
@Danthar
Jun 26 2015 18:23
LOIC
Low Orbit Ion Cannon
:D
ok, thank god im not crazy.
it works now
:S
sheesh that was way simpler then i though. Frustrated it costed so much time, but glad its not a bug in akka or something.
Arjen Smits
@Danthar
Jun 26 2015 18:40
hmm
question
if an actor is blocking during processing of a message
does that means that messages send to its supervision strategy aren't handled? My gut says yes, but want to confirm
ah yup thats it, if I stop blocking it works as it should.
ill need to restructure that actor then. Im doing file processing and sending work to other actors as im reading from the stream. But i have some stuff in there that blocks the stream processing when there is to much outstanding work.
i wonder if akka.streams would help with that kind of scenarios
sounds like it should :P
Arjen Smits
@Danthar
Jun 26 2015 19:20
works like charm now. Going to grab some weekend ;) gn8
Roman Golenok
@shersh
Jun 26 2015 19:25
@chris-ray , I played with XAML + Akka.
So Actor IS NOT ViewModel. You will need seperate them
Roger Johansson
@rogeralsing
Jun 26 2015 21:26
@Danthar im testing your gist atm... both supervisor strategies are hit
are you nugetting an old release?
Aaron Stannard
@Aaronontheweb
Jun 26 2015 21:27
yeah, he figured it out
had to clear out his cache
Roger Johansson
@rogeralsing
Jun 26 2015 21:28
ok
Roger Johansson
@rogeralsing
Jun 26 2015 21:47
anyone here familiar with how CSP's in GoLang works?
Does the caller wait (non blocking) for the GoRoutine to complete? sort of like an Ask in Akka?
Aaron Stannard
@Aaronontheweb
Jun 26 2015 22:23
can't help you there @rogeralsing :\
BTW, making some good progress on #998 - working on an alternative for running the specs for Akka.Persistence.SqlServer
but once I've got that sorted I'll just need to tackle Cassandra
Roger Johansson
@rogeralsing
Jun 26 2015 22:43
great :)
Aaron Stannard
@Aaronontheweb
Jun 26 2015 22:59
cc @rogeralsing @Horusiath I'm planning on leaving Akka.Persistence.Sql.Common inside the main repository. Would it be easier to include it as part of Akka.Persistence.SqlServer or Akka.Persistence.PostgreSql?
keeping in the central repo makes it easier to manage the build / CI dependencies
but it really depends on how often that library will be updated in concert with one of those other implementations