These are chat archives for akkadotnet/akka.net

25th
Jun 2015
Aaron Stannard
@Aaronontheweb
Jun 25 2015 00:49
@rogeralsing Mono builds are now active for all PRs coming into the main Akka.NET project
senor @stefansedich is going to help me resolve which #1094, which should allow monoc to compile the solution
going to be offline for a few hours here tonight, but I have an Akka.Persistence CI image that can do all of the Postgres / SQL Server stuff
going to start breaking off those projects into their own repos with independent build scripts also
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 10:57
@Aaronontheweb @rogeralsing Akka.Persistence.MongoDb looks like it's ready to be merged into dedicated repository, but I don't have write access there :P
Roger Johansson
@rogeralsing
Jun 25 2015 10:57
Noob :)
Ill add you to all teams :)
antonamana
@antonamana
Jun 25 2015 10:59
hi guys, sorry for offtopic - do you know asp.net gitter room? (cannot find it with google :) )
Arjen Smits
@Danthar
Jun 25 2015 11:34
looks like they dont have one. However you can find them on Jabbr.net
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 12:06
I was bothered by one thing: we often have to operate with a millions of small messages - this seems to be perfect fit for messages-as-structs scenario. Less memory overhead, less GC pauses etc. My concern is copying value types on method args and boxing/unboxing when using object or interface casting. Do you think, it would be feasible to take some time an measure those?
jnkramer3
@jnkramer3
Jun 25 2015 12:08
@Aaronontheweb I am going to have the same issue soon. Is there any examples of doing this in Akka. If not this would be a good generic actor for support actor.
Alex Achinfiev
@aachinfiev
Jun 25 2015 14:20
@Aaronontheweb Thank you very much for the reply. Yes, breaking message apart into pieces was going to be my next step. I was just trying to figure out the upper limits on existing protocols. Thanks again.
Roger Johansson
@rogeralsing
Jun 25 2015 14:37
My CNUG presentation is now online: https://youtu.be/71R_TvCxjFw
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:35
@Horusiath you know, I haven't had enough experience with deep profiling yet to give you a good answer to that question - but here's the book I'm reading which I think will help: http://www.amazon.com/Writing-High-Performance-NET-Code-Watson/dp/0990583430/ref=sr_1_1?ie=UTF8&qid=1435246500&sr=8-1&keywords=high+performance+in+.NET
awesome @rogeralsing !
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:40
the video is currently private at the moment - am I allowed to tweet it out?
Roger Johansson
@rogeralsing
Jun 25 2015 15:42
I think the cnug people are making it public any moment now
Apparently i lied about udp support in there though :P
Natan Vivo
@nvivo
Jun 25 2015 15:46
@rogeralsing I was able to open the video. starting to watch it right now
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:48
the video is accessible to anyone who has the link, but it's not "listed" on YouTube
was wondering if the CNUG people had a reason for that :p
and as for UDP support, we'll address that soon
Natan Vivo
@nvivo
Jun 25 2015 15:48
you're right. apparently akka is a secret
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:48
so I have a build server image that can do CI for MongoDB, Cassandra, Postgres, and SQL Server
going to start breaking all of those up into separate projects today and writing the CI stuff into them
going to have to bake some configuration details into the App.configs for each test project
Natan Vivo
@nvivo
Jun 25 2015 15:50
@Aaronontheweb did you come to Rio already?
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:50
@nvivo not yet, that's in late August
8/24-8/29
looking forward to it - never been to South America before
Natan Vivo
@nvivo
Jun 25 2015 15:50
Right.!
I plan to go to rio in the next months, maybe I can go to this conference, but not sure yet
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:51
that'd be awesome!
Natan Vivo
@nvivo
Jun 25 2015 15:51
send me the link to the conference again
Aaron Stannard
@Aaronontheweb
Jun 25 2015 15:51
Natan Vivo
@nvivo
Jun 25 2015 15:52
thanks!
anyone used akka with geteventstore yet? starting to look into it
Andrew Skotzko
@skotzko
Jun 25 2015 16:03
Alex Achinfiev
@aachinfiev
Jun 25 2015 16:10
Hi folks. Have a question about using Surrogate within NewtonsoftJsonSerializer. It seems that you are serializing ints, decimals, and floats as an object to preserve the type. Which turns a List<int> from [ 10, 11 ] into [ { "$": "10" }, { "$": "11" } ] which if you had a list of a lot of numbers will add a big overhead to the size of the message. I was under impression that Json serializer already handles different types of numbers. Is that not the case? What is the rational behind keeping track of the types of numbers? Thanks.
Natan Vivo
@nvivo
Jun 25 2015 16:11
@skotzko thanks!
Andrew Skotzko
@skotzko
Jun 25 2015 16:13
:) np
Roger Johansson
@rogeralsing
Jun 25 2015 16:34
@aachinfiev the problem is when you have a list of object, then json wont know what type of integer it needs to use
we pass object arrays for class constructors in remotedeployment for example
there are cases where we probably could optimize that, and only augument the values when the container is an object or object[], but I dont know if json.net supports that
if message size is a real issue, then one should probably switch serializer anyway and use e.g. protobuf serializer for those messages
Andrew Skotzko
@skotzko
Jun 25 2015 16:49
@rogeralsing awesome about your CNUG video! gonna watch it tonight. thx for sharing it
Alex Achinfiev
@aachinfiev
Jun 25 2015 16:54
@rogeralsing The Protobuf serializer in Akka.Remote.Serialization is not implemented, is that something on the radar for near releases or the assumption is to create your own? Thanks.
Roger Johansson
@rogeralsing
Jun 25 2015 16:56
users can implement their own, its just two methods ToBinary and FromBinary that needs to be implemented, which underneath just can call any serializer/deserializer
Arjen Smits
@Danthar
Jun 25 2015 17:18
cool vid @rogeralsing Puts a proper face to the name :D
Natan Vivo
@nvivo
Jun 25 2015 17:37
good talk @rogeralsing. My only question is: how can you use the VS with white background? =)
Roger Johansson
@rogeralsing
Jun 25 2015 17:37
I dont... :P
only for presentations
as dark theme just gets blurred on many projectors
and TY :)
Natan Vivo
@nvivo
Jun 25 2015 17:38
hmm good to know
=)
Roger Johansson
@rogeralsing
Jun 25 2015 17:42
I have even ported the VS dark theme to IntelliJ Scala :D
Arjen Smits
@Danthar
Jun 25 2015 17:43
lol
Natan Vivo
@nvivo
Jun 25 2015 17:44
hey, off topic, i have been watching some videos from java 8. it seems they are introducing Tasks to java. just a matter of time to have TPL ported haha
Arjen Smits
@Danthar
Jun 25 2015 17:44
lol
Does java really needs such an abstraction ?
Natan Vivo
@nvivo
Jun 25 2015 17:46
just kidding about tpl
but it seems they didn't have tasks
Arjen Smits
@Danthar
Jun 25 2015 17:46
Last thing i heard they got a Bean class for just about everything :P
Natan Vivo
@nvivo
Jun 25 2015 17:46
they are adding FutureTask that will work exactly like C# tasks in the threadpool
i always though MS should have split tasks and futures... but seeing the java implementation I have my doubts
FutureTask just seems wrong =)
Roger Johansson
@rogeralsing
Jun 25 2015 17:48
in the "Orbit" framework (Project Orleans port to Java) they have some sort of async await support via methods.. and I have have no freaking idea how they got that to work w/o blocking and no language support.. but apparently it works somehow
Arjen Smits
@Danthar
Jun 25 2015 17:48
its magic!
Natan Vivo
@nvivo
Jun 25 2015 17:49
well, people have done async/await before using Enumerator and yield, it's probably the same idea
i have been using babeljs for javascript, it supports async/await through facebooks Regenerator library
but enough of async await! akka question now...
I'm looking into the eventstore + akka persistence stuff.
Natan Vivo
@nvivo
Jun 25 2015 17:54
from what I understood, the idea is that each aggregate is an actor instance, and then a lot of times you start an actor only to do what you need and stop it. is that correct?
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 17:54
except stopping, yes ;)
Natan Vivo
@nvivo
Jun 25 2015 17:55
well, you can leave them.. but at some point you will have hundreds of thousands of actors doing nothing
but I got the idea
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 17:56
when you're making some request to an aggregate, it's quite probable that in near future you'll ask it for something again
Natan Vivo
@nvivo
Jun 25 2015 17:56
right, makes sense
Chris Martin
@trbngr
Jun 25 2015 17:57
@nvivo check out @Horusiath CQRS sample. He has an aggregate coordinator that will "Harvest" aggregates when needed.
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 17:57

and how to deal with them:

@Horusiath
In akka.net, currently I've found 2 ways of dealing with loading/harvesing persistent actors.

  1. you have some aggregate coordinator, which you request for your aggregates. If has internal collection of children aggregates - if they are already loaded, they are returned immediately. If not it will create them and return. In my example there is a limit of allowed children buffer, so that you won't overuse the memory. If limit is passed it will harvest X actors to free part the buffer. Coordinator is a proxy for messages send to aggregates - it also buffers messages waiting for aggregates to being recreated.
  2. Same think - aggregate coordinator returns aggregates on demand. But here each aggregate uses Context.SetReceiveTimeout method to identify if it's not used for some period of time. If so, it will receive ReceiveTimeout message. Then it should send some kind of Passivate message back to coordinator and stop itself. Passivate is necessary so that coordinator knows not to send any messages to the dying aggregate. If there are some messages pending, coordinator caches them, then recreates an aggregate and finally sends waiting messages back to it.

Difference between 1 and 2 is that first defines some pool of actors, that you won't exceed, but you won't know if actor is not used for a longer period of time and be able to automatically free the aggregate pool. In second you don't have a pool, but each actor knows, for how long it has not been used and it's able to "recycle" itself if no longer needed. Cons is that you could possibly have more actors at the moment, than your memory is allowed to fit. Ofc you can create a hybrid of both approaches.

Chris Martin
@trbngr
Jun 25 2015 17:57
welp...^^ haha
Bartosz Sypytkowski
@Horusiath
Jun 25 2015 17:57
from akka-bootcamp this morning
2nd approach is simplified description of what Akka.Cluster.Sharding will do under the hood
Chris Martin
@trbngr
Jun 25 2015 17:58
can't wait for cluster.sharding
Natan Vivo
@nvivo
Jun 25 2015 17:59
great. thanks! that's kinda what I was thinking
Timur Babyuk
@timba
Jun 25 2015 18:02
@rogeralsing great presentation, thanks! nice t-shirt, where did you get it? wanna get one ;)
Roger Johansson
@rogeralsing
Jun 25 2015 18:07
@timba ty :) its our company that have ordered them.. its the akka.nethouse.se link on the bottom. but maybe we should have a shirt/sticker shop for akka.net too , for users
Chris Martin
@trbngr
Jun 25 2015 19:27
@rogeralsing Nice preso. I enjoyed that.
Roger Johansson
@rogeralsing
Jun 25 2015 19:50
ty
Alex Achinfiev
@aachinfiev
Jun 25 2015 20:55
@rogeralsing Very nice presentation.