These are chat archives for akkadotnet/akka.net

6th
Jul 2016
Esun Kim
@veblush
Jul 06 2016 00:30
Is there any method for waiting for an actor to stop like GracefulStop which returns Task. Just without stop message.
GracefulStop always sends stopMessage (e.g. PoisonPill) and waits but in my case, sending part is not necessary.
Esun Kim
@veblush
Jul 06 2016 00:37
example case: some actor just stops when event (like timeout or just finish their work) occurs and main thread (outside actor system) waits for those actors to finish their work.
Steven Harrap
@stevenharrap
Jul 06 2016 00:55
Hi there. Feeling bit dumb here. Just started using the TestKit in VS2015 and no tests are being discovered where the class is extended with "TestKit". I can removed the TestKit extension and they are discovered. This is happening with NUnit and plain old VS Testing framework. Any help?
Steven Harrap
@stevenharrap
Jul 06 2016 01:32
Downgraded NUnit to 2.6.4 so I can see them in the nunit runner. The And the plain old VS Test with Testkit extension is discovered as well.
Marc Piechura
@marcpiechura
Jul 06 2016 08:35
@stevenharrap there is a separate package if you want to use NUnit3 https://www.nuget.org/packages/Akka.TestKit.NUnit3/
Max
@maxpaj
Jul 06 2016 08:53
Is there a way to gracefully shut down a cluster node and all its actors, notifying all other nodes that it's leaving? When I shut down one of my cluster nodes, my Lighthouse node does not see a leaving message or anything - it simply tries to reconnect which is refused by the target machine since the port is closed... This produces a ton of exceptions, which I'm not worried about, but shouldn't Lighthouse see a leaving message and gossip this to the other nodes?
Max
@maxpaj
Jul 06 2016 09:08
I'm attempting now to add some signal handler for my console application which runs a cluster node - making it shut down the actor system gracefully before terminating the application, but I'm not sure how to use ActorSystem.Terminate() and all that jazz. Unfortunately there's not much in the documentation about this either :(
Peter Bergman
@peter-bannerflow
Jul 06 2016 09:55
Does anyone know if there any benchmark numbers for clustered applications available somewhere?
voltcode
@voltcode
Jul 06 2016 13:02
was about to write here about #1670 , thanks @alexvaluyskiy , thanks to all involved! Looking forward to moving from some cluster-mimicking Akka.Remote code of mine to Akka.Cluster !
ilhadad
@ilhadad
Jul 06 2016 14:02
@Aaronontheweb as I work through my applications I certainly see the "russian doll" concept when passing messages to and from actors. My concern stems on the increasing size of the messages as they go along - does it affect performance? Is there a limit to the size?
to11mtm
@to11mtm
Jul 06 2016 14:45
@ilhadad : I'm not Aaron, but there are limitations around helios and frame size. Generally speaking you don't want to go to large especially when remoting. According to http://getakka.net/docs/Remoting (See 'ways in which transparency is broken) More than 128k will require a config change to even work. I think larger than like 50k you're guaranteed to hit packet size limits on TCP (Still pretty likely anyway as you can have different sizes between local vs inet, etc) and while things will still work, you are potentially/theoretically sacrificing performance and/or reliability.... realistically when we started designing some of our messaging patterns internally (retrieval of files to/from cloud storage) we set the limit for an 'in-memory-retrieval' as 96k
ilhadad
@ilhadad
Jul 06 2016 16:07
@to11mtm Thanks for the reply. I think I am not going to exceed those numbers. I am concerned with performance, though.
Aaron Stannard
@Aaronontheweb
Jul 06 2016 16:22
@to11mtm 's response is right on - performance only really becomes an issue once you either have a lot of messages (bandwidth issue) or the messages start exceeding built-in message size definitions (blocking the pipe). From a serialization / raw CPU perspective - it's more work to serialize a more complicated object than a simpler one, but that's usually not going to show up on your application's "hot path" unless it's a hideously complicated object
i.e. a recursive tree-like object or something with a really large graph
the good news: measuring the impact of your object's design on your serializer throughput is actually really straightforward, compared to something like testing for bandwidth issues
you'd need to set up a unit test or an NBench test where you serialize --> deserialize the same object 100000 times or so
and just measure how long it takes with different designs
you could also use that approach to measure the byte [].Length property after the serialize stage
which will tell you how large the serialized message is
you can access the serializer currently being used by Akka.NET via the Context.System.Serializers.GetSerializerFor(Type) method
@peter-bannerflow we don't have any cluster benchmarks, but we do have benchmarks for Akka.Remote
the system that sits underneath Akka.Cluster
so that actually measures stuff like network message throughput
although I think I designed those benchmarks improperly - @JeffCyr's benchmark on the 1.5 branch of Akka.NET has been much more accurate in reflecting changes to the performance of the networking pipeline than mine
either way - the benchmarks have still been good at helping us determine whether or not we're improving the state of the remoting system over time
Aaron Stannard
@Aaronontheweb
Jul 06 2016 16:28
to11mtm
@to11mtm
Jul 06 2016 16:53
@Aaronontheweb Glad I was able to learn from all the documentation! =)
Peter Bergman
@peter-bannerflow
Jul 06 2016 16:57
Thanks for the info @Aaronontheweb 🙂
Aaron Stannard
@Aaronontheweb
Jul 06 2016 17:08
np
Sean Gilliam
@sean-gilliam
Jul 06 2016 17:36
speaking of documentation, @/all do you all, the users, find the api documentation useful? I know there's several issues with it atm (large chunks missing, GhostDoc like comments, formatting issues, etc). But overall do you all use it?
btw we could use help in this area if anyone is interested in sending in PRs :)
to11mtm
@to11mtm
Jul 06 2016 17:48
@sean-gilliam It has some useful stuff, typically still find myself checking it which indicates that there's enough useful info for me to keep looking. =)
I'd be interested in writing some doc up actually.
Sean Gilliam
@sean-gilliam
Jul 06 2016 18:20
@to11mtm that's nice to hear
Stanley Goldman
@StanleyGoldman
Jul 06 2016 19:23
If I use Scheduler.ScheduleTellRepeatedly... how do I get it to stop?
ScheduleTellRepeatedlyCancelable
nvm
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:42
turns out #2136 is a false alarm
err
#2138 is
TL;DR; - using one seed node, which we don't recommend anyway, is a bad idea
if a single seed node restarts and it isn't aware of any other nodes (because they're not in its configuration when it starts)
it will form its own cluster
which is what it normally does when it starts anyway
I wrote a multi-node test and investigated this and noticed that the reason why the cluster doesn't reform properly after the only seed node restarts is because the seed node does what it would normally do if it's the only configured seed node: self-join and start
it gets contacted later by the other nodes in the old cluster
but it can't join two clusters
do it doesn't
and remains permanently unreachable
we stress in our documentation and in Gitter chat why using a single seed node is a really stupid idea for a litany of other reasons
since it is basically a single point of failure
so I think this qualifies as yet another reason to be appended to that list
that being said - I made a bunch of logging improvements inside that PR
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:48
so I'm going to send that in and if that passes muster with the gang, we can deploy
on the bright side: this forced me to double check all of the leader election and gossip convergence code
to11mtm
@to11mtm
Jul 06 2016 20:49
gz!
I'm excited =)
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:50
@alexvaluyskiy I found some deadlock conditions inside the TestConductor - this is definitely why the SurviveNetworkInstabilitySpec isn't passing.
voltcode
@voltcode
Jul 06 2016 20:50
and if I have two seed nodes but both of them are restarted at the same time @Aaronontheweb ?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:50
we basically need to not block on some Tasks that are being returned there
qwoz
@qwoz
Jul 06 2016 20:52
@sean-gilliam with respect to the docs, one thing I've been interested in learning more about are FSM actors. The current docs point to akka.io's docs which are rather cryptic unless you already completely understand the concept.
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:53
@voltcode hmm, let me modify my spec and try that out
would be a shame to throw this code away :p
regardless of what the answer is - would rather know for certain what's supposed to happen
as the Lightbend guys mentioned in that Google Groups link
you can always bootstrap the cluster by having it flush the list of previous nodes to disk
and append those to your seed node list on restart
should not be necessary though
for a multi-seed node configuration
voltcode
@voltcode
Jul 06 2016 20:55
event if they are not designed to be seed nodes?
won't that break something?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:55
going to find out
I suspect what will happen
is that if all of the seed nodes who are restarting
aren't able to contact someone who's a current member of the cluster
voltcode
@voltcode
Jul 06 2016 20:55
ok, very curious as I may need to cover such scenario in my code after 1.1 re;ease
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:55
then an island will form
that's what I'm seeing with a single seed node
let me try it with two
the reason for two is so one stays up while the other reboots
and is still a member of the current cluster
but I'm going to test that now to verify
voltcode
@voltcode
Jul 06 2016 20:57
I know, but for example in my scenario, sometimes all cluster members are all on the same box (depends on the size of deployment and customer)
I'd like to use akka as comm. layer, regardless of the location of all processes that form the cluster
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:57
ah, I see
might want to try that disk-flushing technique then
if the customer pulls power on the box
or something like that
voltcode
@voltcode
Jul 06 2016 20:58
sometimes I need to bounce cluster members (for example an upgrade install)
upgrade will bounce app pools and windows services, etc.
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:58
do you have the ability to upgrade one node at a time?
or is it all-or-nothing?
voltcode
@voltcode
Jul 06 2016 20:58
could happen in a flash, so even if I add another seed node in form of windows service, that may not save it.
it's one process at a time, but some app pools take a long time to start
Aaron Stannard
@Aaronontheweb
Jul 06 2016 20:59
got it
what I'd do in that case
is as your cluster forms
have each node flush to a file the addresses of other currently reachable nodes
and in the event that it restarts, append that address list to your HOCON configured list of seed nodes before you start
that way you're not relying on a static configuration to cover all of the different depolyment combinations
voltcode
@voltcode
Jul 06 2016 21:00
ok I can do that. That doesnt matter that some of those seed nodes werent seed before restart ?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:00
nope
nothing special about seed nodes other than a seed node can "join" itself
when a cluster first forms
voltcode
@voltcode
Jul 06 2016 21:00
so basically after a restart I dont have non-seed nodes
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:01
I'd keep some static seed nodes configured in the HOCON file itself
for when you first start your cluster
voltcode
@voltcode
Jul 06 2016 21:01
(restart after cluster forms for the first time)
ok
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:01
and then use that file for restarts
voltcode
@voltcode
Jul 06 2016 21:02
all right, thanks
I'm glad i was on gitter today, prob saved me hours of debugging later on :)
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:09
haha
I'll document a bunch of this stuff
rest of my month is going to spent updating our Akka.Cluster training course and producing some more content on it
in the docs, Petabridge blog
welp, thanks for the good idea for a spec @voltcode
wrote one to make sure that if we attempt to join a non-existent seed node
it doesn't affect joining the cluster if at least one other seed node is valid
so if your seed node list contains 3 addressses
and only 1 is reachable
the join will still work
which is what it's always supposed to be able to do
but now I can prove it :p
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:14
you'll see an association error shut up in the logs
and an error about a connection request being refused
but that's it
voltcode
@voltcode
Jul 06 2016 21:15
glad I could contribute at least in this way, thank you for all your hard work. I will copy your advice on the side, for future reference as gitter search sucks.
can you tell me what's the name of that spec ? I'll keep it as a reference to look at if I'm in cluster-trouble
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:24
JoinWithOfflineSeedNodeSpec
voltcode
@voltcode
Jul 06 2016 21:29
thanks
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:46
@Silv3rcircl3 did we upgrade the "add headers" script?
to use lightbend and 2016?
Marc Piechura
@marcpiechura
Jul 06 2016 21:47
We have a script for that? :)
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:47
yeah
Marc Piechura
@marcpiechura
Jul 06 2016 21:47
I wrote my own console app a while ago
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:47
otherwise it would be a huge pain in the ass :p
Marc Piechura
@marcpiechura
Jul 06 2016 21:48
I did a PR once with the update but didn't know that this script exists
good old PowerShell
Marc Piechura
@marcpiechura
Jul 06 2016 21:49
Nice, I never looked into this folder before :)
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:49
k, updated the script in my PR
forgot to run the API approval for Akka.Cluster
apparently overriding a ToString is enough to trigger that
Aaron Stannard
@Aaronontheweb
Jul 06 2016 21:58
really glad we have API approvals on all of the main modules now
Chris G. Stevens
@cgstevens
Jul 06 2016 22:00
what is the status of akka working on AspNet Core?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 22:01
@cgstevens we're going to begin laying the groundwork for that after 1.1
I think the goal is to get Akka core ready for .NET Core first
which means the serialization system needs to be .NET Core-ready
once that's done we can start on the networking layer - Akka.NET 1.5 will eliminate Helios as a dependency for Akka.Remote, which will make things easier
one less library to worry about
plus that transport will include TLS support and be much faster than Helios 2.1, at least 2x as fast (and 10x as fast as Helios 1.4.1)
Chris G. Stevens
@cgstevens
Jul 06 2016 22:03
sweet
Aaron Stannard
@Aaronontheweb
Jul 06 2016 22:03
the laggard of .NET Core support
will undoubtedly be Akka.Persistence
the core library itself will be easy to port to .NET Core
the implementations though....
those depend on all of the popular database drivers supporting it
Chris G. Stevens
@cgstevens
Jul 06 2016 22:04
thank you... We are starting to look and get into the Core and Angular 2 and need to see the road map where I can fit this in.
Aaron Stannard
@Aaronontheweb
Jul 06 2016 22:04
the other big thing we have to wait on for the networking layer
just remembered this
is Google Protobufs
which we use in Akka.Remote, Cluster, and Persistence
Jon Skeet mentioned on Twitter that it's in progress
Chris G. Stevens
@cgstevens
Jul 06 2016 22:05
everything is in progress...
always
Aaron Stannard
@Aaronontheweb
Jul 06 2016 22:05
by the time we get around to working on that part of the stack it'll probably be close to ready
the thing that's going to be a big pain in the ass is updating our build system to actually run on .NET Core
lol
since the state of tooling support there is still weak
but probably good enough to work
Steven Harrap
@stevenharrap
Jul 06 2016 23:00
Thanks @Silv3rcircl3 - that is great to know - I can go back to using Nunit again now!
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:06
hi all, how's 1.1 doing? is it out yet?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:06
typing up the release notes now
going out now-ish
have to document two breaking API changes
both very minor
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:06
nice
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:07
one basically requires you to add a constructor to any custom priority mailboxes
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:07
I've been asked to come up with a microservice architecture proposal - so Akka is going to be considered by my peers, writing some benchmarks for ASF vs Akka to proove my case
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:07
the other is we made ClusterReadView invisible and replaced it with Cluster.CurrentClusterState instead
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:08
yeah, read about that one
probably a much better name
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:08
ClusterReadView is still there
just internal now
it's what updates the CurrentClusterState
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:08
not Obsoleted?
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:08
nah, totally moved
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:08
right
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:08
that was part of the API freeze for Cluster
now that it's out of beta
had to make it serious
about what should be exposed vs. what isn't
we were too loose with that in 1.0 for Akka core
Maciek Misztal
@mmisztal1980
Jul 06 2016 23:12
aight, I'm off to bed, looking forward to see the end result, as I'm trying to explain it all to my new colleagues :D
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:12
:+1:
Aaron Stannard
@Aaronontheweb
Jul 06 2016 23:30
@/all akkadotnet/akka.net#2144 boom - let me know if there are any edits or changes that need to be made to the release notes. Going to leave that open for at least 45 minutes or so while CI runs
I have to do 1 more PR anyway to bring this into master
which is what actually triggers the release
Esun Kim
@veblush
Jul 06 2016 23:34
wow it's great. congrats! :clap: