These are chat archives for akkadotnet/akka.net

26th
Sep 2017
Bartosz Sypytkowski
@Horusiath
Sep 26 2017 05:00
@chipdice I'm making a generic protobuf serializer - with a little luck I'll be able to release beta today. It's based on Marc Gravel's protobuf-net (not Google.Protobuf). But this is pretty straightforward as you need to call Serializer.Serialize(value, memoryStream) and Serializer.Deserialize(memoryStream, objectType) inside your custom Akka.NET serializer.
that being said, if you've got message that has size of 32MB, it looks like the problem is more likely to be in your domain logic.
Thomas Denoréaz
@ThmX
Sep 26 2017 12:04
Hi! I have a small question concerning Akka.IO, I need to send control Message during the communication between the two handlers, unfortunately, they don't know each other (as they are hidden behind the "TCPListener" from Akka.IO) now if we send a message that implements TCP.Command or even TCP.Message, will it be forwarded to the Handlers?
kariem-ali
@kariem-ali
Sep 26 2017 13:04

Hi everyone. I just updated to 1.3.1 . I am using Persistence.Sqlite and it seems to be getting the wrong serializer when deserializing the snapshots upon initialization:

2017-09-26 14:51:36 [Error] Persistence failure when replaying events for persistenceId ["..."]. Last known sequence number [0]
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: ?. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Akka.Serialization.NewtonSoftJsonSerializer.FromBinary(Byte[] bytes, Type type)
   at Akka.Persistence.Sql.Common.Snapshot.AbstractQueryExecutor.GetSnapshot(DbDataReader reader)
   at Akka.Persistence.Sqlite.Snapshot.SqliteSnapshotQueryExecutor.ReadSnapshot(DbDataReader reader)
   at Akka.Persistence.Sql.Common.Snapshot.AbstractQueryExecutor.<SelectSnapshotAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Persistence.Sql.Common.Snapshot.SqlSnapshotStore.<LoadAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Akka.Util.Internal.AtomicState.<CallThrough>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Akka.Util.Internal.AtomicState.<CallThrough>d__7`1.MoveNext()
2017-09-26 14:51:36 [Information] "Message Init from akka://server/temp/d to akka://server/user/$a was not delivered. 1 dead letters encountered."

The config specifies a serializer based on Hyperion. Why is it picking up "Akka.Serialization.NewtonSoftJsonSerializer" instead?

            akka {
                actor {
                    provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
                    serializers {
                        tnw = ""TNW.Actors.Serialization.Serializer, TNW.Actors.Serialization""
                    }
                    serialization-bindings {
                        ""System.Object"" = tnw
                    }
                }      
            }
Weston
@ronnyek
Sep 26 2017 15:44
I was thinking about my questions about the graphs and reanimation
I dont REALLY need distribution of the components of the graph persay, which simplifies things a lot
but I do recall hearing things about graphs arent really super reliable as far as communications go and I think @Horusiath recommended using something like kafka or rabbit or something
Zetanova
@Zetanova
Sep 26 2017 15:54
@ronnyek if u cant lose some data points in the graph then a reliable mq to decouple producer with consumer is a good idea. Other mothods are to transmit total values + timestamp for the graph, then a missing message can be omitted.
Graham Ambrose
@gambrose
Sep 26 2017 15:58
Is there a way to get the current size of a materialised akka streams buffer. I am recording metrics for through-put of my streams which I helps identify issues in production but I would like to add metrics for the buffer sizes so I can see what is causing my streams to throttle.
Could someone point me in the right direction?
Zetanova
@Zetanova
Sep 26 2017 16:05
@gambrose i am not sure if its the optimal method, but to hook up an report-event into the Backpressure function would be a good way to get the source of the trotteling component
Graham Ambrose
@gambrose
Sep 26 2017 16:12
@Zetanova what backpressure function are you referring to?
Zetanova
@Zetanova
Sep 26 2017 16:17
@gambrose make a scan flow that only handles backpressure upstream events
on some points in the stream
Graham Ambrose
@gambrose
Sep 26 2017 16:29
Zetanova
@Zetanova
Sep 26 2017 16:31
yes Scan + "backpressures when downstream backpressures" or write a own flow type
but dont realy know where to hook up the backpressure event
need to wait on @Horusiath response
Marc Piechura
@marcpiechura
Sep 26 2017 16:33
@gambrose Simplest way I could think of is http://getakka.net/articles/streams/builtinstages.html#conflatewithseed + SelectMany afterwards
Zetanova
@Zetanova
Sep 26 2017 16:34
may idea is to just put a "named" flow on mutiple points inside the stream and when the backpressure event occures it is sening as example to Log
Graham Ambrose
@gambrose
Sep 26 2017 16:36
I’m not sure backpressure event would help me. I’m streaming between multiple external systems so there should be a fair amount backpressure events as the stream reacts to load.
Marc Piechura
@marcpiechura
Sep 26 2017 16:36
There is no “backpressure event”, only demand is send upstream but it’s not exposed as public api
You could easily create a custom buffer stage that logs when buffer is > than a specific size
Graham Ambrose
@gambrose
Sep 26 2017 16:37
I am using Prometheus for production monitoring. Which is based on sampling the current state of the system rather than events.
Bartosz Sypytkowski
@Horusiath
Sep 26 2017 16:40
@gambrose just like @Silv3rcircl3 said, you can conflate events - even with sampling you can simply build a metric-only state based on incoming/outgoing events and use it for sampling.
Graham Ambrose
@gambrose
Sep 26 2017 16:43
I was thinking I would probably looking a creating a custom buffer stage. When I drilled into the source there is no Buffer implementation for me to copy. It's a SymbolicStagepresumably this is a performance optimization.
I think I should be fine implementing a buffer stage. It is after all fairly simple logic.
Including buffer
Graham Ambrose
@gambrose
Sep 26 2017 16:52
@Silv3rcircl3 thanks
I would need to do a custom buffer stage rather than use conflate as I still need to back pressure the source.
Joshua Garnett
@joshgarnett
Sep 26 2017 18:12
Has anyone gone down the path of running Akka.Net in Kubernetes? I’m debating on how I want to set things up.
My initial thought is to run the seeds as a StatefulSet and then setup a Deployment for each role type within the Akka cluster.
David Rivera
@mithril52
Sep 26 2017 20:21
Is there any way to turn off gossip in the logs?