These are chat archives for akkadotnet/akka.net

6th
Feb 2018
ShalokShalom
@ShalokShalom
Feb 06 2018 00:55
@OnurGumus Well, its quite challenging to contribute documentation for someone outside of the project.
Arturo Sevilla
@arturosevilla
Feb 06 2018 03:47
hello I'm trying to serialize through the Persistence plugins (through a snapshot) an ActorPath (to a remote actor), however when initializing the actor, the snapshot loading fails with the following:
Error loading snapshot [SnapshotMetadata<.....>], remaining attempts: [0]
System.InvalidCastException: Unable to cast object of type 'Surrogate' to type 'Akka.Actor.ActorPath'.
   at lambda_method(Closure , Stream , DeserializerSession )
   at Hyperion.SerializerFactories.EnumerableSerializerFactory.<>c__DisplayClass5_0.<BuildSerializer>b__1(Stream stream, DeserializerSession session)
   at Hyperion.Serializer.Deserialize[T](Stream stream)
   at Akka.Serialization.HyperionSerializer.FromBinary(Byte[] bytes, Type type)
   at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
   at Akka.Persistence.Serialization.PersistenceSnapshotSerializer.GetSnapshot(Byte[] bytes)
I have checked that this PR https://github.com/akkadotnet/akka.net/pull/589/files supposedly introduced ActorPath serialization
would it be best to just use plain old string? and then use ActorPath.Parse() ?
Vasily Kirichenko
@vasily-kirichenko
Feb 06 2018 08:35
@Horusiath about the Consul client bug. Should we 1. wrap it with a proxy, which would transparently re-create ConsulClient in case of specific exceptions, then re-call it 2. wrap it with an (fsm?) actor 3. just re-create a fresh client for every call?
Bartosz Sypytkowski
@Horusiath
Feb 06 2018 12:34
@vasily-kirichenko I was thinking about explicitly recreating consul client i.e. every 2 minutes
Ulimo
@Ulimo
Feb 06 2018 14:26
Hi again, I wonder if there are any limitations I should consider when having larger cluster sizes. At this time we have 2000 servers, but not all will be used, but its not sure how large our program will grow. Is there any cluster components we will have issues with > 500 or > 1000?
Bartosz Sypytkowski
@Horusiath
Feb 06 2018 14:57
@Ulimo do you have all of those servers inside a single data center?
(and yes, while it should be possible, be sure you'll have some problems)
Ulimo
@Ulimo
Feb 06 2018 14:59
No they are not in the same datacenter, they are located in 9 different countries
Maximum right now we have a 30ms latency between datacenters
Bartosz Sypytkowski
@Horusiath
Feb 06 2018 15:05
it could be possible, but it would require a lot of configuration and tuning. I'm working over optimizations targeting multi-DC scenario (see: #3284), that should make things easier by allowing to split cluster into groups.
Ulimo
@Ulimo
Feb 06 2018 15:11
Ok! sounds great, would this require us to rebuild quite a bit to use the multi-dc extension?
Bartosz Sypytkowski
@Horusiath
Feb 06 2018 15:25
from architecture point of view - probably. Multi-DC allows you to split cluster into something like "sub-clusters" - for some of features the behavior won't change significantly, but for some (like cluster sharding or cluster singletons) impact can be bigger. You can read more on this topic already in JVM docs: https://doc.akka.io/docs/akka/2.5/cluster-dc.html
Ulimo
@Ulimo
Feb 06 2018 15:27
Ok, tbh we mostly use cluster for node discovery and communication problem discovery.
Vasily Kirichenko
@vasily-kirichenko
Feb 06 2018 17:18
@Horusiath a great plan indeed :)
Edson Flores Palma
@Efp95
Feb 06 2018 21:12
Hello,
How can I make "ask" throws an exception?
I'm trying it responding with Failure and Status.Failure classes but task still looks as completed
Maxim Cherednik
@maxcherednik
Feb 06 2018 21:13
@Efp95 can you show some code?
Edson Flores Palma
@Efp95
Feb 06 2018 21:14
@maxcherednik sure
image.png
Maxim Cherednik
@maxcherednik
Feb 06 2018 21:15
hm
the responding part looks rather strange
what is this mixture of failure/exception/...
how about you try to return something positive?
like the real answer
I should have added the documentation
akkadotnet/akka.net#3220
you know try to options in your testactor
  1. reply with real answer - like Sender.Tell("bla");
  1. do not send anything
you will get your AskTimeoutException
Edson Flores Palma
@Efp95
Feb 06 2018 21:21
I was trying to get the exception error which could be thrown inside the actor
Maxim Cherednik
@maxcherednik
Feb 06 2018 21:22
so you did something strange
you actually replied with a proper reply
whatever payload was
Edson Flores Palma
@Efp95
Feb 06 2018 21:23
so, how could I reach that approach?
that's what I found in docs
Maxim Cherednik
@maxcherednik
Feb 06 2018 21:23
try what I proposed
to get the mechanics of the ask
  1. reply with real answer
  1. don't reply at all - you will get an AskTimeoutException
  1. you can throw some exception in side the test actor - to be honest I forgot what should be the out come
Maxim Cherednik
@maxcherednik
Feb 06 2018 21:41
In case of exception - you should get AskTimeoutException
cause there will be no answer