These are chat archives for akkadotnet/akka.net

26th
Apr 2016
Steven Harrap
@stevenharrap
Apr 26 2016 01:16

Hi there

I want (need) to add a monitoring sub-system to my Akka.net project so that I can do the usual things such as monitoring performance, throughput, detecting bottle necks etc. Reading the docs and much searching leads me to the conclusion that I should use the https://github.com/petabridge/akka-monitoring project and that it provides these monitoring options:

  1. StatsD

    • Requires a linux server and configuration
    • Substantial configuration curve involving the Graphite system.
    • Ongoing up-keep of another system where technical understanding is limited
  2. Microsoft AppInsights

    • Online service which may be free or cheap for some amount of time
    • Could be quick to get going if my Azure subscription worked.
  3. Performance Counters

    • Heavy reliance on the current machine with minimal reporting functionality to a web interface
    • More learning curve and implementation if there is some reporting method.

All these systems are not to friendly to a debug environment where I can start a system, throw data at it and watch the results. I understand that my production environment would have a permanent monitoring system. In regard to monitoring this is what I'm looking for:

  • Completely self contained in regards to debug: start.monitor.stop and be secure that all trace of that system is gone upon stopping.
  • Minimum upkeep of the monitoring system. Configure graphs against available metrics and go.

Does anyone have any links, advice etc that could help me out?

Thanks,
Steven.

Justin Merth
@jdmerth
Apr 26 2016 03:48
@schepersk thanks for the quick reply. I set up some monitoring and discovered it is exactly as you say. When I passivate an entity the CurrentShardRegionState response reports the correct number of entities for that region. It would be helpful to know how many entities are present within the cluster, I thought that GetClusterShardingStats would provide that, but I don't get a response message of ClusterShardingStats when sending that to a shard region. Any insight would be appreciated!
Justin Merth
@jdmerth
Apr 26 2016 04:05
@stevenharrap in terms of performance monitoring, I have found that Sumo Logic's collectors are useful. You'll need to install the collector on the server, but after doing so you'll have a great deal of control over what you log. I discovered this when experimenting with Azure Service Fabric's performance counters. I had trouble collecting anything useful from Operational Insights, but the Sumo Logic setup was a breeze. Let me know if you move that direction and I can give you a bit more guidance on how I set it up.
Steven Harrap
@stevenharrap
Apr 26 2016 04:19
Thanks @jdmerth. Sumo looks like an experience similar to Azure. I gather that there is a component that is installed into server, configured in the .config/code and referenced in the Actor classes with the help of some documentation. Can you describe how Sumo works in the debugging experience? Is it possible to separate debug results from production results.
Justin Merth
@jdmerth
Apr 26 2016 04:34
There are a few different approaches. Since I'm running on a virtual machine scale set that I can define, I prefer to install the sumo logic collector on to the VM directly. That way I get all of the benefits of their client, then I log everything to a known location (e.g. d:/logs/out.log) that is configured in the collector. I use NLog and SlowCheetah tranforms to have a different nlog.config for release and debug. You can do the same for ApplicationInsights.config. Another approach is to use the network target, which I sometimes use for local development. I'm just starting to work with the Akka-Monitoring solution which looks very promising for sending App. Insights events. Let me know if you'd like some samples and i'd be happy to provide.
Corneliu
@corneliutusnea
Apr 26 2016 05:34
Are there alternatives to configuring Akka except HOCON? I find HOCON terribly hard to read and there are no good text editors for it like there are for JSON
Corneliu
@corneliutusnea
Apr 26 2016 06:13
answering my own question: the ConfigurationFactory seems to be happy to load pure JSON
Toshko Andreev
@Ravenheart
Apr 26 2016 12:03
good day
Toshko Andreev
@Ravenheart
Apr 26 2016 12:16
i'm building my first akka project and wanted some design tips
suppose i have an actor that will accept Login and Logout messages
and should then hold a list of all those that have logged in
should i use a pool router
or just go with a normal actor
(i will keep a list of actor paths)
Marc Piechura
@marcpiechura
Apr 26 2016 12:20
@Ravenheart use a normal actor with a list inside.
Toshko Andreev
@Ravenheart
Apr 26 2016 12:21
alright thanks
hope you don't mind if i ask some other newbish questions later
Marc Piechura
@marcpiechura
Apr 26 2016 12:26
nope, all good ;)
Kevin McFarlane
@kevinmcfarlane
Apr 26 2016 13:47
I'm having difficulty getting a simple persistence example to work based on the first example in the Petabridge blog post. I'm using SqlServer. I don't get any errors but otoh nothing gets written to the journal and snapshot tables. This is using Akka 1.0.6 with Persistence 1.0.6.17 and Persistence SqlServer 1.0.6.3. I'm on Sql Server 2008 R2, so I don't know whether that's an issue? Can someone take a peek if I post it up to my GitHub, unless they can think of an obvious gotcha to check in the meantime?
Toshko Andreev
@Ravenheart
Apr 26 2016 14:21
suppose i'm writing the client side actors
do i have to specify my actor path as if its gonna be remote
like akka.tcp://MySystem@127.0.0.1:1234/user/someActor
or can i specify it like a normal in-app path: akka://MySystem/user/someActor
Dave Sansum
@dave-sansum
Apr 26 2016 14:27
I'm currently using a child per entity model and after getting this running locally I'm starting to look into the remoting/clustering elements. In seems the clustering is really geared towards actors that are functional rather than entity based and I'm struggling to any documentation on dynamic systems. What I'm looking to do is have location transparency so if an entity A lives on node A, if node A fails the entity can be brought up seamlessly on node B ? It seems cluster sharding is the right (only) thing for this but it doesn't seem that mature at the moment. Any advice would be much appreciated?
Marc Piechura
@marcpiechura
Apr 26 2016 14:31
@Ravenheart you only need the Akka.tcp path if you want to communicate with a remote actor
Toshko Andreev
@Ravenheart
Apr 26 2016 14:37
also i've noticed that in some of the tutorials when you override say PostStop() you call the base method
while in some others you don't
do i always call the base method or
Kevin McFarlane
@kevinmcfarlane
Apr 26 2016 14:47
@Ravenheart I wondered that as well! But IIRC I think base PostStop() curently does nothing?
Toshko Andreev
@Ravenheart
Apr 26 2016 14:50
hello kevin
might i ask how long you've been using akka.net?
Marc Piechura
@marcpiechura
Apr 26 2016 14:55
@Ravenheart @kevinmcfarlane the comment of the methods give you information weather you could skip the base call. PreStart and PostStop do nothing, rest does something
Kevin McFarlane
@kevinmcfarlane
Apr 26 2016 15:01
@Ravenheart so far I've just tried it as a learning exercise on a home utility application I wrote to do backups to cloud storage. I wrote it conventionally and then thought I'd redo it using Akka. I tweak it from time to time once I think of some ideas or oversights.
Aaron Stannard
@Aaronontheweb
Apr 26 2016 16:00
akkadotnet/akka.net#1911 - sorry for the delay on this @Horusiath
but that's all staged and ready to go - going to let the build server do its little dance
Aaron Stannard
@Aaronontheweb
Apr 26 2016 17:15
alright, Akka.NET v1.0.8 is on its way to NuGet now
very minor patch - mostly just changes the configuration for Akka.Persistence back to the way it was
to11mtm
@to11mtm
Apr 26 2016 18:04

Stupid question.... Context.ActorOf() inside an actor will create a child
So if I have inside my actor code pathed at
/user/SomeActor
{
Context.ActorOf(Props.Create(new S3SingleBucketFileOperationActor(params),"child")));
}

That will create it under /user/SomeActor/child/ , right?

Arjen Smits
@Danthar
Apr 26 2016 18:22
yes
Maxim Cherednik
@maxcherednik
Apr 26 2016 18:31
Hi @Danthar I asked a question before, but no one answered. Could you please comment on this:
Hi guys got a q. I know I've already asked similar one, but I didn't quite get the answer.
Here are a few facts:
  1. Cluster is still in beta
  2. There are online courses from the Petabridge about akka.net including Clustering
    So having these 2, I would assume that the cluster module can be used already. Even though it's still in Beta, there could be a limited number of bugs for some edge cases, but it should work in the most cases.
    Is this correct? @Silv3rcircl3 @Danthar @Aaronontheweb
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:07
yep
getting Akka.Cluster out of beta is my number one priority at the moment
suspended work on just about everything else to finish it
throwing the kitchen sink at this fucker
but overall, you should be able to start using it
we've had people running it in production for years already
Maxim Cherednik
@maxcherednik
Apr 26 2016 19:09
yeah, ok then. Some time ago you were advising me to take the course. Which I am planing to do, but I wasn't sure about the status of the clustering and how soon I can use it in Prod
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:09
just got off the phone and told someone end of May / early June
who asked me the same question, another Akka.NET user
I'm committed to making that happen
Maxim Cherednik
@maxcherednik
Apr 26 2016 19:14
Cool. Yet I still wonder about the cluster. I wanted to try an empty cluster without any real actor in there. Very simple setup - it was working more or less on local(when all the nodes are on the same machine). Then when you clarified that the port should be the same and of course auto-down is off. I decided to roll out several virtual machines in azure so that to try it. Doesn't work. No matter what I do. If I restart the node hard(as if it died), seed node start acting up with lots of exceptions.
So basically cluster formed, but actual failover cases I didn't manage to try...
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:30
If I restart the node hard(as if it died), seed node start acting up with lots of exceptions.
the stuff I'm working on now should address that
the socket server sitting underneath Akka.Cluster has a bunch of fun issues that had never been properly classified until recently
race conditions at startup
spent the past two weeks working on an update to that
on top of that, latest release today includes a patch I made to the EndpointRegistry in Akka.Remote
which also caused issues that occurred on node restart
I'm working those issues from the bottom up
dealing with the socket server first, then Akka.Remote's endpoint system, and then finally dealing with things like the cluster daemon
Vladyslav Pyshnenko
@Pisha91
Apr 26 2016 19:47
Hi , @Aaronontheweb , we using Akka.Cluster in our project hosted on Azure Cloud service and very often one of node on worker role is not starting after deploy or reboot. In logs we could see next error "Failed to startup Cluster. You can try to increase 'akka.actor.creation-timeout'.". Does this issue related to all that you described before?
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:48
I've seen that issue before - that's unrelated
how many cores are you running those nodes on?
Vladyslav Pyshnenko
@Pisha91
Apr 26 2016 19:48
8
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:48
ok, you should be good there
is where that issue occurs
the network isn't even a factor at that point
Vladyslav Pyshnenko
@Pisha91
Apr 26 2016 19:50
yeah, and after than node is shutting down
Aaron Stannard
@Aaronontheweb
Apr 26 2016 19:50
might be something off with the sequencing at startup there, but basically one of the system actors failed to start on time
I would start by looking at the system actors there and see if there's a race condition - it's going to be easier to spot than a traditional one, because everything is happening inside actors here. Coverage is probably missing in some edge case where resource A gets a request before it gets something it needs from resource B
and rather than buffering the request / poking resource B, it waits indefinitely and times out
I personally don't have time to look into that now (I am but one man) - but if you file a bug I'll get on it
Vladyslav Pyshnenko
@Pisha91
Apr 26 2016 19:54
ok, i will create bug tommorow
thanks