These are chat archives for akkadotnet/akka.net

18th
Apr 2015
Natan Vivo
@nvivo
Apr 18 2015 14:19
I have a question about stashing. The original docs say: "stash is part of the ephemeral actor state, unlike the mailbox. Therefore, it should be managed like other parts of the actor's state which have the same property."
but from what I see, stashes work exactly like mailboxes: they are preserved (in memory) if the actor restarts
does it mean "ephemeral" in the sense that it's memory, and not disk?
Roger Johansson
@rogeralsing
Apr 18 2015 14:20
You should talk to @Aaronontheweb and @HCanber about that, they built most of the stashing support. It would be odd if the stash was deleted upon restart as that would defeat the purpose of it, no?
Natan Vivo
@nvivo
Apr 18 2015 14:21
I agree.
I'll document as it's implemented and remove this comment from the docs. If @Aaronontheweb or @HCanber have any comments, I'll update it.
Roger Johansson
@rogeralsing
Apr 18 2015 14:38
yay, got cluster up and running on Raspberry PI
in both directions
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:42
Hey guys, nice work on akka! I have used the Java and scala version and the .net version is great!
Roger Johansson
@rogeralsing
Apr 18 2015 14:42
Thanks! :)
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:43
I didn't find on the docs if it's supported to create routers using the docs. Is it possible?
Roger Johansson
@rogeralsing
Apr 18 2015 14:44
Creating custom routers? or just using the built in ones? http://getakka.net/docs/working-with-actors/Routers
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:45
I am building a website with external processors. I am using akka for the communication. The intention is, when necessary, just change the configuration to create some kind of load balance.
The predefined will serve
Hummmm ok
Roger Johansson
@rogeralsing
Apr 18 2015 14:46
ok, you can apply routing using hocon config, or by C#/F# code
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:46
That's what I want to know!
Natan Vivo
@nvivo
Apr 18 2015 14:46
take a look at the Deployment section
Natan Vivo
@nvivo
Apr 18 2015 14:47
also, would be nice if you let me know if the explanation is good enough or if it's missing something
Roger Johansson
@rogeralsing
Apr 18 2015 14:48
I love the updated router docs!
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:48
thanks
I will check
there is some links broken in the docs when I tried
Natan Vivo
@nvivo
Apr 18 2015 14:48
@rogeralsing thanks. I'm trying to make them more readable and with more examples
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:48
or not implemented hehe :D
the docs are cool!!
even more simple than the original akka
Natan Vivo
@nvivo
Apr 18 2015 14:49
cool
Roger Johansson
@rogeralsing
Apr 18 2015 14:50
the JVM docs are very academic in many places
Natan Vivo
@nvivo
Apr 18 2015 14:50
yes, which is nice to have but not as the first thing you see when learning =)
had to learn a lot about the consistent hashing algorithm to know if the docs made sense
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:51
yes, but I am a professor too and it sometimes explains what you don’t want to read in the place!
Roger Johansson
@rogeralsing
Apr 18 2015 14:51
We are probably going to incorporate some animated gif's too :) might sound weird, but its very nice to see how messages are flowing
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:51
kkkk ok
Natan Vivo
@nvivo
Apr 18 2015 14:52
that would be awesome. unfortunately my drawing skills are terrible =) I tried to come up with some extra drawings, but I decided to leave it for later
how do you do these animated gifs? export from powerpoint?
Roger Johansson
@rogeralsing
Apr 18 2015 14:53
send me a PM with description and I'll draw them
animate in ppt and then gif capture with one of the many gif recording apps
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:53
I have one more question, if I define a remote actor, than in the client gets a reference by using the actor selection, it will return to me a new temporary actor (that I should stop after using) or it will return to me the same always?
The point is, how many ports will I have opened after get some actors this way?
then*
Roger Johansson
@rogeralsing
Apr 18 2015 14:55
the actor selection is not an actor ref, its a pattern to one or more paths (wildcards are supported), so when sending a message to an actor selection, the message and the selection is passed to the remote system for evaluation, so that the remote system can evaluate what actors match the path/pattern described
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:55
yes, yes, but I could resolve to one instance too
I understand the selection
:)
Roger Johansson
@rogeralsing
Apr 18 2015 14:56
ah yes, then you get a RemoteActorRef, it returns the same always if you resolve one
the remoting layer makes sure you dont have multiple copies of the same remoteactorref
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 14:57
hummm thanks!! That is the info!
do the remote actor always use the same channel for communication?
Natan Vivo
@nvivo
Apr 18 2015 14:58
are you asking if a new connection is open for each actor you reference?
Roger Johansson
@rogeralsing
Apr 18 2015 14:59
yes, or one of the two, there is one inbound and one outbound. if you initiated the comm from system a to system b, there will be an outbound comm from a to b
if the connection fails, and system b tries to talk to b, it will reconnect with an inbound conn from b to a
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 15:00
ok
Natan Vivo
@nvivo
Apr 18 2015 15:00
that means connections are open between actor systems, not between actors, right? Shouldn't matter how many references you have to remote actors if the remote system is the same
Roger Johansson
@rogeralsing
Apr 18 2015 15:00
yes
Daniel Ferreira Monteiro Alves
@danfma
Apr 18 2015 15:01
yes! That what I need to know!
ok!
thanks guys! I will be living here for a time! hehe :D
Natan Vivo
@nvivo
Apr 18 2015 15:43
I'm trying to use .net fiddle for some examples, but I'm getting some security exceptions when running akka there. did it work before?
It fails with: "Assembly 'Akka, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e9bba8567560efe9' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted."
Roger Johansson
@rogeralsing
Apr 18 2015 15:50
Natan Vivo
@nvivo
Apr 18 2015 15:50
thanks!
Roger Johansson
@rogeralsing
Apr 18 2015 15:51
you have to use the TaskDispatcher, which is security safe, instead of the ThreadPoolDispatcher which uses UnsafeQueUserWorkItem or whatever the name is
somewhat slower than the default dispatcher
Roger Johansson
@rogeralsing
Apr 18 2015 15:56
maybe we can make the deafult dispatcher fallback to other schedulng mechanics under medium trust, is it possible to check trust level?
Aaron Stannard
@Aaronontheweb
Apr 18 2015 15:58
@rogeralsing I think it's try...catch.... ;)
I don't think we should try to be that smart
better off just letting the system crash for the end-user and letting them set a new default dispatcher in akka config
Natan Vivo
@nvivo
Apr 18 2015 16:00
I had another idea
I was going to create a simple nuget package only to use in the .net sample fiddles that creates the actorsystem with this setting, just to prevent having too much unrelated code in the samples
what do you think?
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:02
hmmm
any downsides?
like people accidentally using that NuGet package instead of the core one?
Natan Vivo
@nvivo
Apr 18 2015 16:03
well, it should be a very clear named package.. one downsite I see is that the code wouldn't run directly if you copy...
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:04
yeah
eh - it's a shit sandwich either way, right?
Natan Vivo
@nvivo
Apr 18 2015 16:04
I was thinking of having a simple extension method like "ActorSystem.FiddleCreate".. i don't know
hehe
yep. I'm just worried having 6 of code in every fiddle with a comment saying "hey, this is needed only here, don't need this in your app" would be even worse...
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:05
the lesser of two evils is probably just sticking the configuration crap in the examples and saying
//blah blah DotNetFiddle needs this because medium trust blah blah
that's probably not so bad
Natan Vivo
@nvivo
Apr 18 2015 16:05
well.. let's try that and see how it goes
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:05
every .NET developer will nod their heads and go "oh yeah"
Natan Vivo
@nvivo
Apr 18 2015 16:07
question... does it need the throughput = 30 in every sample? what does it do?
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:07
ah, you don't need that
so the dispatcher throughput is something that effects how many messages the mailbox will attempt to push into an actor on any given mailbox run
the higher the throughput, the more work the mailbox does each time it's activated
Natan Vivo
@nvivo
Apr 18 2015 16:09
ok. so shouldn't matter for simple examples with half dozen messages
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:09
yeah, exactly
Roger Johansson
@rogeralsing
Apr 18 2015 16:09
it gives a tradeoff, higher number, better throughput, but possibly less fair to other actors
Natan Vivo
@nvivo
Apr 18 2015 16:09
ok. so I'll try to inline this config in the actorsystem constructor and leave a comment there
Aaron Stannard
@Aaronontheweb
Apr 18 2015 16:10
sounds like a good idea
:thumbsup:
Roger Johansson
@rogeralsing
Apr 18 2015 21:04
@nvivo what illustrations was it that you wanted for the docs?