These are chat archives for akkadotnet/akka.net

27th
Jan 2015
David Smith
@smalldave
Jan 27 2015 17:27
@rogeralsing I'm still alive. Thanks for checking! Very busy with work.
Aaron Stannard
@Aaronontheweb
Jan 27 2015 17:28
@smalldave :+1:
starting to work on your Heisenberg bug today :fire:
David Smith
@smalldave
Jan 27 2015 17:31
Great. Was going to ask. As I mentioned I've got the odd hour just not had time to have a real look at it.
Aaron Stannard
@Aaronontheweb
Jan 27 2015 17:31
I know the feeling!
Roger Johansson
@rogeralsing
Jan 27 2015 17:31
Yay!
David Smith
@smalldave
Jan 27 2015 17:32
Need any pointers give me a shout. The test runners are a little rough at the moment
Aaron Stannard
@Aaronontheweb
Jan 27 2015 17:32
Will do @smalldave
I think Petabridge is about to get a big chunk of Azure credits this week, and I'm going to work on getting us a real build server finally
because frankly I don't think AppVeyor can handle the multi-node tests :smile:
David Smith
@smalldave
Jan 27 2015 17:35
they are slow to run. can't remember how long the jvm version takes to run but it is significant
Aaron Stannard
@Aaronontheweb
Jan 27 2015 17:35
yeah, that doesn't surprise me - but on AppVeyor it doesn't help that their servers have a pretty high load
David Smith
@smalldave
Jan 27 2015 17:35
yep
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 18:00
@rogeralsing I'm wondering If we can omit ActorRef and ActorPath serialization problems with simple ignore attributes. Don't you think that using a introducing a specialized ISurrogate interface to work around default Akka serializer is a little hacky?
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:02
@Horusiath @rogeralsing in Scala Akka, does the default serializer handle ActorPaths? or do they have a custom one registered to do that?
that's another option to consider
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 18:03
Also for a long time I didn't noticed that we use Json.NET serialization even for in-proc message passing. Orleans uses deep copies - which I think are faster, but have a possible message mutability drawback.
@Aaronontheweb I'll take a look, but I haven't found anything similar to surrogates in canonical Akka
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:22
@Horusiath if that's the case then it's definitely worth taking a closer look at the Scala serializer registry
and I'm really glad we're having this discussion now - this would be a giant pain in the ass for someone who was running a big Akka.NET cluster
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 18:29
Ok, Akka uses default Java serializer:
Yes, the default Java serialization works for cyclic references. When you serialize object C, the field will contain a backreference to the already-serialized object A instead of serializing it again.
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:30
is that binary serialization?
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 18:30
Yes
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:30
so I guess the .NET equivalent would be, what - BinaryFormatter ?
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 18:31
I'm wondering if there exists some other fast, general purpose serialization able to handle cyclic references to use as default for Akka.NET
nope, AFAIK is slow as hell
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:32
does JSON.NET have some settings we can tune to give it the ability to handle cyclic references better?
something in the JsonSerializerSettings class
Aaron Stannard
@Aaronontheweb
Jan 27 2015 18:33
sound like it then :)
although it makes me wonder - does the current PingPong benchmark reflect any internal serialization overhead?
I'd be curious to see how JSON.NET with preservation of references performs against some other alternatives
Roger Johansson
@rogeralsing
Jan 27 2015 19:12
@Horusiath we only use serialization locally if that option is turned on, we pass by ref by default for spee
speed
Aaron Stannard
@Aaronontheweb
Jan 27 2015 19:13
@rogeralsing that's the SerializeAllMessages = on setting right?
Roger Johansson
@rogeralsing
Jan 27 2015 19:13
the ISurrogate is absolutely hacky, but so is surrogates, but they are still useful to transfer special messages
@Aaronontheweb yepp
Aaron Stannard
@Aaronontheweb
Jan 27 2015 19:55
I'm pretty cool on how we decide to solve this problem - I trust @rogeralsing and @Horusiath to come up with a good solution. I
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 20:29
Maybe we could combine both: leave ISurrogate for specific messages and allow to preserve reference handling for JSON.NET? For the second case it would be nice to check perf benchmark changes
I remember that, when I've run it around v0.6 there was something like 35mln messages/sec, now it's more like 20+mln on my comp
Roger Johansson
@rogeralsing
Jan 27 2015 20:33
Thats how it is now( ?) the interface is only for surrogates, there is only one type that needs that.
The pingpong sample use ref passing, so no serialization there
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 20:37
@rogeralsing at the present moment JSON.NET reference handling option is not turn on - this should also solve most of the problems with circular references, making Akka looks more predictable. And talking about benchmarks, I mean overall performance change as result of framework grow up, not the serialization alone
Roger Johansson
@rogeralsing
Jan 27 2015 20:38
Ah, didnt know about the refhandling :) it can do cycles?
Bartosz Sypytkowski
@Horusiath
Jan 27 2015 20:39
I've pasted the link to the official JSON.NET documentation an hour ago ;)
Roger Johansson
@rogeralsing
Jan 27 2015 20:41
Oh, reading it now. Thats awesome :)
Carlos Iriarte
@ciriarte
Jan 27 2015 20:59
Guys, noob here. I have a couple of questions as I am evaluating Akka.net vs Orleans
When I was reading the documentation, one of the example use cases is "Service backend (any industry, any app)
Service REST, SOAP, Cometd, WebSockets etc Act as message hub / integration layer Scale up, scale out, fault-tolerance / HA"
Is there an example of using Akka.Net and exposing it as a REST interface? Or should I expose my endpoint with a Technology such as ServiceStack or WebApi?
Please let me know if this is not the forum to ask for these questions! (and my sincerest apologies for spamming)
Aaron Stannard
@Aaronontheweb
Jan 27 2015 21:07
@ciriarte hi there! No, this is totally a good place to ask questions like that
most of us also check for the Akka.NET tag on StackOverflow too
so I've used Akka.NET in production for this very use case
what I recommend doing is having a good old-fashioned Web API using ServiceStack, NancyFX, ASP.NET MVC, or whatever actually handle your incoming HTTP requests
and under the hood, you can easily pipe that stuff into some Akka.NET actors who can either do the work:
  1. Right there inside your app OR
  1. Push the work using Akka.Remote to a remote Akka.NET cluster, in case you're going with a tiered / micro-services strategy
Carlos Iriarte
@ciriarte
Jan 27 2015 21:10
@Aaronontheweb this is incredibly helpful.
Aaron Stannard
@Aaronontheweb
Jan 27 2015 21:10
Feel free to email me at aaron@petabridge.com - I'd be happy to do a Skype call or something and answer your questions 1:1
Carlos Iriarte
@ciriarte
Jan 27 2015 21:10
I was afraid my idea wouldn't match the desing of akka.net
Aaron Stannard
@Aaronontheweb
Jan 27 2015 21:12
Akka.NET is great technology for connecting internal services together - it's something that plays nice with any sort of pub / sub or message bus system
Roger Johansson
@rogeralsing
Jan 27 2015 21:13
+1 on what @Aaronontheweb said... I use async web api endpoints (normal c# async await) , and then I can use something like `var res = await myactor.Ask<SomeResult>(someMessage); this way, we can join the request response based web api with the async model of Akka
Carlos Iriarte
@ciriarte
Jan 27 2015 21:13
I can see that. We have an internal custom one that's starting to show its age. I like Akka but doing the jump to the jvm is too much for me at the moment, maybe I am getting older.
Sweet.
Aaron Stannard
@Aaronontheweb
Jan 27 2015 21:14
I made the same call for my previous company - would have been too expensive to migrate to the JVM
and we were a big Cassandra / Solr shop too, so we had a lot of incentive to go in that direction. But it would have changed everything about our deployment, QA, DevOps processes. More than I could chew.
Carlos Iriarte
@ciriarte
Jan 27 2015 21:19
Thank you. I'll read a little bit more and send you an email if I have further questions. And please let me buy you a beer/burger if you are near the LA area!
Aaron Stannard
@Aaronontheweb
Jan 27 2015 21:20
@ciriarte as a matter of fact, we're in Santa Monica
Carlos Iriarte
@ciriarte
Jan 27 2015 22:17
Sounds great @Aaronontheweb I'll be happy to honor my offer!
Aaron Stannard
@Aaronontheweb
Jan 27 2015 22:18
I am a fan of burgers and beer!
What's your email - I'll set something up?
whoops, didn't mean to add a ? there
@/all just published a detailed post on how to use PipeTo inside actors and how it works. Included some animated gifs I made to illustrate the concurrent parts. Any feedback on this before I promote / publish this tomorrow? http://petabridge.com/blog/akkadotnet-async-actors-using-pipeto/
Andrew Skotzko
@skotzko
Jan 27 2015 22:40
@ciriarte just sent you a note to set something up, @Aaronontheweb and I would love to meet up and get your POV on a few things and chat in general
Carlos Iriarte
@ciriarte
Jan 27 2015 22:55
@skotzko of course, I'd be happy to. Just let me get through my chores of the day. (AKA meetings, emails)
Andrew Skotzko
@skotzko
Jan 27 2015 22:59
for sure
coffeeyesplease
@coffeeyesplease
Jan 27 2015 23:20
Hi there all. Hope you're all well. I'd like to ask about resources to get me started on Akka.net. I read about the original, while I've never used it myself. I do have extensive .NET/C# experience, so good pointers would be much appreciated. Thanks
Andrew Skotzko
@skotzko
Jan 27 2015 23:48
@coffeeyesplease @ciriarte we are in the middle of putting together an Akka.NET bootcamp that I think is exactly what you’re looking for. The website will be going up soon, but go ahead and sign up here and we’ll get you early access to the material! >> http://eepurl.com/bcEa_j