These are chat archives for akkadotnet/akka.net

14th
Sep 2017
Andrew Young
@ayoung
Sep 14 2017 00:58
can someone tell me why Proto.Actor exists? http://proto.actor/
Robert Stiff
@uatec
Sep 14 2017 06:22
cos sweden
Arsene T. Gandote
@Tochemey
Sep 14 2017 07:42
Hello Geeks. How can I use Hocon configuration in Netcore appsettings.json?
Any sample will be welcomed
Stephen Newman
@goodisontoffee
Sep 14 2017 08:49
@Aaronontheweb feel free to ping me if I can lighten the load with the Akka.Monitoring stuff in anyway mate - here to help where I can :D
Robert Stiff
@uatec
Sep 14 2017 08:55
@Tochemey I just don't, but i'm thinking of building a tool to transform an IConfigurationRoot in to a hocon config
vicosoft4real
@vicosoft4real
Sep 14 2017 09:32
@Tochemey For now, you can create a resource file for your configuration. Then pass it like : ConfigurationFactory.FromResource<Startup>("App.txt"); That is what i did in my own case.
Arsene T. Gandote
@Tochemey
Sep 14 2017 10:56
ok
Ian Clegg
@ianclegg
Sep 14 2017 11:32
I've got a receive actor with stashing ReceiveActor, IWithUnboundedStash it starts in an 'initialising' state, is there a simple way to stash all unmatched messages rather than having to receive all message types individually and stash them?
Saepul Ramdani
@blackclavus
Sep 14 2017 12:08
you can just use ReceiveAny at the bottom, can't you?
Ian Clegg
@ianclegg
Sep 14 2017 13:27
Thanks @blackclavus
Aaron Stannard
@Aaronontheweb
Sep 14 2017 13:59
@goodisontoffee appreciate that, but the sucky part is I suspect that none of the dependencies Akka.Monitoring uses support .NET Standard yet
Performance Counters definitely doesn't
not sure about the StatsD driver or the AppInsights stuff either
I'd hope that the latter gets upgraded to .NET Standard sometime soon
so I might ship Akka.Monitoring as .NET 4.5-only
just so the current users can upgrade
Stephen Newman
@goodisontoffee
Sep 14 2017 14:00
@Aaronontheweb yeah, I forked the repo and had a look. It is very possible that it'll be more than I can bite off right now. Performance Counters feels like it might not have a cross platform analogue. The 4.5 release would work well for us (he said selfishly).
Aaron Stannard
@Aaronontheweb
Sep 14 2017 14:00
yeah, I think I'll just belt out the 4.5 upgrade and punt on the .NET Core stuff for now
TBH Akka.Monitoring was something I came up with in the span of a couple of days back in the very early days of Akka.NET
I've already started designing a totally new thing that will replace it
Stephen Newman
@goodisontoffee
Sep 14 2017 14:02
That would be great just for now but we will need a .net core version in the future.
Aaron Stannard
@Aaronontheweb
Sep 14 2017 14:02
but that won't be out for a while - it's going to be a more aspect-oriented way of gathering Akka metrics, and I ideally want to be able to tap into system-level stuff too
like msg / sec on each Akka.Remote connection
that sort of stuff
Stephen Newman
@goodisontoffee
Sep 14 2017 14:03
Understood :)
Aaron Stannard
@Aaronontheweb
Sep 14 2017 14:03
anyway, I have to come up with some clever stuff to do all of that so I don't accidentally fuck up the performance of Akka.NET in the course of trying to monitor it
Stephen Newman
@goodisontoffee
Sep 14 2017 14:04
yes, that would suck ;)
Ronny Carlansson
@lessismore1
Sep 14 2017 16:03
need advice of what to persist, to recreate actor hierarchy with full state after system crash - google no help :)
Joshua Garnett
@joshgarnett
Sep 14 2017 16:06
Are you using akka persistence?
Ronny Carlansson
@lessismore1
Sep 14 2017 16:08
Yes
Joshua Garnett
@joshgarnett
Sep 14 2017 16:08
Ultimately you could have each actor store some state that specifies children. When the actor comes up it can then stand up its children actors.
So you could have an event that is something like, create child, kill child
Ronny Carlansson
@lessismore1
Sep 14 2017 16:09
Context manage ActorRefs to children. Do I need to manage them in Internal State as well?
Joshua Garnett
@joshgarnett
Sep 14 2017 16:09
I wouldn’t use actor refs, I’d us some other identifer
Whatever the persistence_id is of your children
Ronny Carlansson
@lessismore1
Sep 14 2017 16:10
ok, thanks!
Joshua Garnett
@joshgarnett
Sep 14 2017 16:10
Akka cluster sharding does some of this I believe with the remember entities setting
I haven’t dug into that code to see how it is implemented
Ronny Carlansson
@lessismore1
Sep 14 2017 16:11
have a look in the code to see if I find something - thanks
Phil Sandler
@philsandler_twitter
Sep 14 2017 16:32
A colleague has found that overlapping App Pool resets in IIS seem to mess up a cluster. Would that be considered a bug, or is the expectation that akka.net would not be used with IIS?
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:29
@philsandler_twitter it's not a bug with Akka.NET
basically the sockets that Akka.NET has to use to stay connected to the cluster
can't have two of instances of the same socket open on the same address
which is what happens during an overlapped recycle
you'll have this issue with anything that hosts inbound socket connections
and an overlapped recycle in IIS
@goodisontoffee petabridge/akka-monitoring#37 - going to let CI run that and then I'll deploy it later today
Joshua Garnett
@joshgarnett
Sep 14 2017 17:40
Has anyone built any chaos monkey style systems on top of akka.net? Thinking about injecting some latency and message loss.
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:40
@joshgarnett we have a tool for that built into Akka.Remote
Joshua Garnett
@joshgarnett
Sep 14 2017 17:40
oh yeah?
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:40
which we mostly use inside our multi-node tests
yeah... let me see if I can dig it up
Joshua Garnett
@joshgarnett
Sep 14 2017 17:40
Sweet
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:40
baby sitting a nuget release on the build server here
haven't done a push of this package in 18 months
byte rot
Joshua Garnett
@joshgarnett
Sep 14 2017 17:41
nice :P
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:43
yeah, damn, forgot NuGet has a new explicit requirement
to specify source
gotta deal with this before I can answer your question
Joshua Garnett
@joshgarnett
Sep 14 2017 17:43
no rush
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:48
you enable a "transport adapter"
it's a unit that sits in front of your Akka.Remote transport
and is able to intercept messages as they're written or read
we have two built-in transport adapters we use for testing
the Gremlin, also known as the "failure injector"
which simulates packet loss
and the throttler, which simulates latency
you'd be able to setup a chaos-monkey-esque scenario using the former
it's probabilistic, FYI
you set a packet loss percentage
or you can use a
blackhole setting
which essentially forces a disconnect
Joshua Garnett
@joshgarnett
Sep 14 2017 17:50
Cool, any way to also do that for local akka messages?
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:51
probably by writing a custom mailbox implementation
that would behave the same way
Joshua Garnett
@joshgarnett
Sep 14 2017 17:51
Good idea
cool, we shall see how this goes
Trying to debug some non-deterministic behavior, it’s been fun
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:51
have you heard of FsCheck?
Joshua Garnett
@joshgarnett
Sep 14 2017 17:52
nope
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:52
it's how I find a lot of heisenbugs in my code and we use it in a few places here in the Akka.NET test suite too
I need to finish the part 3 of that series one day
it uses property and model-based testing
found tons of weird edge cases in production Akka.NET code with it
Joshua Garnett
@joshgarnett
Sep 14 2017 17:53
Nice
Aaron Stannard
@Aaronontheweb
Sep 14 2017 17:53
like a scenario where restarting one actor three times in a row broke a big piece of functionality, a scenario I would have never thought to test
Andrew Young
@ayoung
Sep 14 2017 18:15
@uatec was that directed to me?
still don't know why Proto.Actor exists. Can someone comment?
Bartosz Sypytkowski
@Horusiath
Sep 14 2017 18:21
@ayoung you could ask this question on proto.actor channel. IMO it result of some of the Roger's thoughts on akka's actors, that couldn't be implemented in akka itself because of legacy reasons. Personally me (and probably many people in the core team) sympathize with at least some of those ideas - we talked about them even before birth of proto.actor.
Phil Sandler
@philsandler_twitter
Sep 14 2017 18:41
Thanks @Aaronontheweb --makes sense.
chipdice
@chipdice
Sep 14 2017 18:43
Is there something special I need to do in order to serialize an enum as part of a message? I'm using Hyperion and as soon as I add my enum to a message I send, I get an error. ERROR 2017-09-14 14:35:54,547 [25] TcpServerHandler - Error caught channel [::ffff:172.16.165.175]:9710->[::ffff:172.16.165.175]:64469
System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at DotNetty.Transport.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at DotNetty.Transport.Channels.Sockets.AbstractSocketByteChannel.SocketByteChannelUnsafe.FinishRead(SocketChannelAsyncOperation operation)
DEBUG 2017-09-14 14:35:54,551 [25] EndpointWriter - Disassociated [akka.tcp://PMTActorSystem@chipd-pc2:9710] <- akka.tcp://PMTActorSystem@chipd-pc2:9560
WARN 2017-09-14 14:35:54,552 [25] ReliableDeliverySupervisor - Association with remote system akka.tcp://PMTActorSystem@chipd-pc2:9560 has failed; address is now gated for 5000 ms. Reason is: [Akka.Remote.EndpointDisassociatedException: Disassociated
at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level, Boolean needToThrow)
at Akka.Remote.EndpointWriter.Unhandled(Object message)
at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
at Akka.Actor.ReceiveActor.OnReceive(Object message)