These are chat archives for akkadotnet/akka.net

20th
Jun 2017
Aaron Stannard
@Aaronontheweb
Jun 20 2017 02:03
sigh.....
I found the bug
and it is dumber than I could have ever imagined
new VectorClock.Node() does not produce the same output as VectorClock.Node.Create - the former doesn't hash the node ID
which is what we use here
and in all of the other areas where we perform pruning
thus, the vector clocks of those nodes could never compare correctly
I told @heynickc it would be a one-line fix lol
I could feel it
Aaron Stannard
@Aaronontheweb
Jun 20 2017 02:13
yep, just saw a bunch of missing prune notifications show up for the first time in my reproduction spec
horay
half tempted to make a semi-breaking change to the API and just make the constructor private... so no one can ever do this again lol
Aaron Stannard
@Aaronontheweb
Jun 20 2017 04:58
half tempted to make a semi-breaking change to the API and just make the constructor private.
just realized that fix would break the serializability of the vector clock
so no, not going to be doing that :p
Голодный Монстр
@Kalinin_Aleks_twitter
Jun 20 2017 08:54
Hi all! I have the problem again... My customer gets "Akka.Remote.Transport.Helios.TcpClientHandler Connection was reset by the remote peer." error from tcpClientHandler and tcpServerHendler when has no connection. I have investigated that he gets SocketException and ExceptionCaught() method handled this exception (maxcherednik/akka.net@78638d4). But after this the socket is down the connection cannot be established. The ExceptionCaught should notify all listeners, but this error will not be published as "RemoteLifecycleEvent" and I can not catch this event. Can anyone tell me how I can catch it to restart my app?
Roman Melnikov
@Neftedollar
Jun 20 2017 12:17
hi all. How can I send global event to all actors in region?
Aaron Stannard
@Aaronontheweb
Jun 20 2017 12:48
@Kalinin_Aleks_twitter you should be able to handle the DisassociatedEvent
which will tell you that the Akka.Remote connection has reset underneath
Weston
@ronnyek
Jun 20 2017 16:58
greetings fine gentlemen
Aaron Stannard
@Aaronontheweb
Jun 20 2017 17:22
@Neftedollar thought I answered this earlier
but apparently that was just in my head
if you need to be able to message EVERY ACTOR underneath a certain position in the hierarchy of any given ActorSystem
you can use wild-card actor selections for this
Sys.Selection("/user/*") will select all top-level actors
Sys.Selection("/user/*/*") will select all top-level actors' children
and I can't remember.... but Sys.Selection("/user/**") might get EVERYONE underneath the /user actor
let me double check real fast...
Aaron Stannard
@Aaronontheweb
Jun 20 2017 17:28
public static class WildcardMatch
    {
        #region Public Methods
        /// <summary>
        /// TBD
        /// </summary>
        /// <param name="text">TBD</param>
        /// <param name="pattern">TBD</param>
        /// <param name="caseSensitive">TBD</param>
        /// <returns>TBD</returns>
        public static bool Like(this string text,string pattern, bool caseSensitive = false)
        {
            pattern = pattern.Replace(".", @"\.");
            pattern = pattern.Replace("?", ".");
            pattern = pattern.Replace("*", ".*?");
            pattern = pattern.Replace(@"\", @"\\");
            pattern = pattern.Replace(" ", @"\s");
            return new Regex(pattern, caseSensitive ? RegexOptions.None : RegexOptions.IgnoreCase).IsMatch(text);
        }
        #endregion
    }
so..... given that this is a Regex... I have no idea what it does
so I'm not sure how to hit the entire actor hierarchy globally without using recursive wild-card actor selections
better way of doing it probably
have every single actor subscribe to a topic on the EventStream
and just publish to that when you want them all to receive the command
Weston
@ronnyek
Jun 20 2017 18:36
is clusterdaemon something other than lighthouse?
Aaron Stannard
@Aaronontheweb
Jun 20 2017 18:37
yeah
it's the system actor that actually runs the cluster's topology
there's a copy of one on each node
Lighthouse is just a barebones user-defined app on top of it
basically
Weston
@ronnyek
Jun 20 2017 18:38
ok, and I know I've asked this before, so I appreciate bearing with me
Aaron Stannard
@Aaronontheweb
Jun 20 2017 18:38
there's a few other system actors who play an important role in the cluster, but the cluster daemon is the brain of the cluster
nah, you're good man
Weston
@ronnyek
Jun 20 2017 18:39
if I have a couple nodes of lighthouse, both of those go down, but peers had been made aware of one another, and say two peers were still up
should lighthouse nodes come up, will they rejoin and be fine?
Aaron Stannard
@Aaronontheweb
Jun 20 2017 18:39
as long as the lighthose node can contact another node who is currently a member of the cluster
when it starts
(so have that node listed as a seed)
then it can restart safely
Weston
@ronnyek
Jun 20 2017 18:39
ok
I am gonna set that up... I was building something with that scenario and it seemed to black list nodes or whatever where I had to restart lighthouse and then restart the workers
Roman Melnikov
@Neftedollar
Jun 20 2017 19:27
@Aaronontheweb thanks, I remember that I can use wildcards, but what if my actor was shutdowned? I mean I have userActor and it has lifetime. If I'll send message to /user/regionName/* will it respawn actors that was stopped?
qwoz
@qwoz
Jun 20 2017 19:43
what are the latest hosting recommendations on azure? how do others create akka clusters there? windows vm? cloud services? service fabric?