These are chat archives for akkadotnet/akka.net

20th
Mar 2015
Bartosz Sypytkowski
@Horusiath
Mar 20 2015 08:22
Recently I've asked myself two basic questions, I have hard time to find answers for:
  1. Why JSON.NET? Why not for example protocol buffers by default?
  2. Why there is no globally configurable receive timeout?
Roger Johansson
@rogeralsing
Mar 20 2015 08:23
  1. because of friction, json.net is pretty much the only serializer that allows serializing messages of any shape or form by default w/o altering constructors, adding attributes or interfaces
and for surrogates, surrogate support is mandatory as ActorRef needs special handling to be resolved into a real actorref.. and it can be embedded deeply inside another message
I do want to get rid of Json.NET, but most other serializers lack some features
e.g. polymorphic serialization
Bartosz Sypytkowski
@Horusiath
Mar 20 2015 09:04
and what about 2nd? Don't you think we should add a globally configurable HOCON option for this? I think it's very risky that now we don't have any kind of timeout configured by default. It's not safe, if user forgot at any point to set receive timeout, his/her service could possibly hang forever
Roger Johansson
@rogeralsing
Mar 20 2015 11:50
Im not following here, you mean a timeout for the receive method? I thought you were talking about ReceiveTimeout, the callback feature for actors
if you mean a way to ensure that no receive method runs forever.. I have looked into this, but there is no fast way to deal with it. there would need to be some supervisor thread that polls that no thread have been executing a receiveblock for too long
Roger Johansson
@rogeralsing
Mar 20 2015 11:56
there is a dispatcher setting "deadlinetime" which decides for how long each mailbox run may run, but that does not deal with frozen/zombie threads. it only decied when the mailbox run should exit a batch op
During the very early stages of akka.net, I put together this: https://gist.github.com/rogeralsing/8472797 it does what you want, but expensive, and the implementation would beed to be cleaned
Bartosz Sypytkowski
@Horusiath
Mar 20 2015 12:24
it think that the most common case is Ask - AFAIK it doesn't have any timeout by default
Michal Franc
@michal-franc
Mar 20 2015 18:10
there is no default timeout i just crashed my VS because of that, due to infinite ncrunch test running and running :)
Roger Johansson
@rogeralsing
Mar 20 2015 18:20
thats pretty much the same as for any code. you cant make a function break after x time in oop either
Dave Bettin
@dbettin
Mar 20 2015 21:07
I plan on using Akka.net; Is it a terrible idea to read Akka in Action? I am concerned it will lead me down a path of confusion.
Roger Johansson
@rogeralsing
Mar 20 2015 21:35
No, its a great book, actually I'm reading it right now, halfway through and everything applies except for the special Scala specific stuff like their Future library
Dave Bettin
@dbettin
Mar 20 2015 21:39
Perfect! Thanks!