These are chat archives for petabridge/akka-bootcamp

26th
May 2015
Doron Grinzaig
@gdoron
May 26 2015 10:19
Regarding: "Experience the danger of the typeof syntax for Props yourself" in Unit 1, Lesson 3.
If it's that horrible, why does it even exist...?
Bartosz Sypytkowski
@Horusiath
May 26 2015 10:23
there may be cases, when you have to build actor dynamically i.e. from some kind of configuration. In that case you cannot set Props with type safety in code
Thomas Lazar
@thomaslazar
May 26 2015 10:24
there`s that but… i would phrase it like this… "if people want to shoot themselves in the foot, who are we to prevent that?" ;)
zoltanarvai
@zoltanarvai
May 26 2015 12:20
Hi people! The bootcamp is amazing, but I have a question I can't seem to understand. I'm at lesson 2.3, and you are creating the PerformanceCounterActor with a Func<PerfCounter> in the constructor. How is that possible? Am I missing something? I kind of thought that from a coding point of view Actors are location transparent. This means the actor could be running in a different data center... As far as I know Func<T> is not serializable...
Arjen Smits
@Danthar
May 26 2015 13:28
They are, and they can. Actors are location transparent through their ActorRef. And not their constructor.
Bartosz Sypytkowski
@Horusiath
May 26 2015 13:35
I think that @zoltanarvai was talking in context of remote deployments. Then ofc, Func<> as constructor param won't be permited, but if you now that you're deploying actors only localy, it's not a problem.
Arjen Smits
@Danthar
May 26 2015 13:44
Ah, Didn't consider remote deployments. :+1:
Aaron Stannard
@Aaronontheweb
May 26 2015 16:19
@zoltanarvai yeah, in that case these actors are responsible for gathering performance metrics for a specific machine
if I wanted to deploy those in such a way that they could gather metrics for any arbitrary machine
I would deploy a copy of their parent remotely first
who would then create the children with the Func<T> arguments for generating perf counter instances
using the fan-out pattern
zoltanarvai
@zoltanarvai
May 26 2015 21:54
Ahh brilliant, thanks guys!