These are chat archives for petabridge/akka-bootcamp

13th
May 2015
varghesep
@varghesep
May 13 2015 01:52
I have a ProductActor and a child ProductValidatorActor. In the ProductValidatorActor, I want to access the state of the parent actor. I see only Self and Sender but not a Parent property. How can I get the Parent?
Arjen Smits
@Danthar
May 13 2015 06:05
@varghesep when the parent sends a message to the child. The Context.Sender in the child is the parent. As for state. You cannot directly access the state of an actor. The only way to get it is to ask for it with a message you send to the parent. Actors can only communicate using messages.
Raymen Scholten
@raymens
May 13 2015 08:32
wp_ss_20150513_0001.jpg
The last email is a bit hard to read on my Phone (WP8.1, 768p)
previous emails were just fine
Arjen Smits
@Danthar
May 13 2015 08:35
@raymens looks like a scaling issue. What happens if you try to zoom out ?
Does it just spring back when you release?
Raymen Scholten
@raymens
May 13 2015 08:44
Can't really zoom out as it just indeed springs back
Arjen Smits
@Danthar
May 13 2015 08:46
And you don't have some wierd ease-of-access custom text-size setting ?
Raymen Scholten
@raymens
May 13 2015 08:49
found out what the problem is :(
scrolled all the way down and saw the 'download message (14kb)' button
sorry :)
Arjen Smits
@Danthar
May 13 2015 08:51
and then it also downloaded styling information ? lol
Raymen Scholten
@raymens
May 13 2015 08:52
yeah, but usually the button isn't that low
Arjen Smits
@Danthar
May 13 2015 08:53
Still odd it inflates the text like that. Must be the difference in resolution then. Mine is 1080p, and haven't noticed any issues.
Raymen Scholten
@raymens
May 13 2015 08:56
Not sure why it does that
mggillen
@mggillen
May 13 2015 12:11
@Aaronontheweb Thanks Aaron regarding your reply about the TaskContinuationOptions in the ContinueWith-PipeTo scenarios.
Thomas Lazar
@thomaslazar
May 13 2015 12:41
@Aaronontheweb just wanted to ask if you already sent out the mail containing the infos regarding the training course tomorrow.
Aaron Stannard
@Aaronontheweb
May 13 2015 15:37
@thomaslazar not yet Thomas! We'll do that shortly!
Thomas Tomanek
@thomastomanek
May 13 2015 16:27
Yo, can someone clear up an issue around the ConsistentHashingPool please. I've created a pool that I want to route messages based on an int to a worker. It looks like it only ever creates one 'worker' though, and immediately as well, even before the first messages comes in. I've got 'nrOfInstances' set to 1 so that sort of makes sense, but if I set it to > 1 it immediately creates n instances. Isn't it supposed to create them on demand as new messages come in with a previously unseen hash?
ah crap thought I was in the akka room, well I guess it applies to the bootcamp too
Aaron Stannard
@Aaronontheweb
May 13 2015 16:43
haha
no worries
all Pool routers immediately create their N number of routees
UNLESS you use a resizable router
in which case it starts with a lower-bound and can scale towards the upper-bound based on pressure
but IMHO, not a good idea to use resizers with the ConsistentHashRouter
defeats the purpose of having a consistent hash range :p
the way the hash range distribution works is that is takes the 2^64 possible hash range values for its hashing function
and divides those by N routees
so if N = 4
routee 0 owns the first quarter of the range
routee 1 owns the second
and so forth
if you add a new routee to the pool
all of the ranges get rebalanced
so each routee ends up with a fifth
so for best results you want to keep the number of routees fixed
Clustered consistent hash routers are an exception to this
but that's a story for a different day :p
Thomas Tomanek
@thomastomanek
May 13 2015 16:53
hmm, ok I massively misunderstood pool routers. So to get what I want (a one to one mapping of an integer id to a worker actor), where the actor isn't created until it's needed, am I barking up the wrong tree with consistent hashing pools? Sounds like it
Patrick Kelly
@featuresnap
May 13 2015 17:14
In Lesson 1.3, I was trying to do TDD for the ValidationActor.
Sorry in lesson 1.3 I was trying to do TDD for the ValidationActor. I have a suite of unit tests that will pass individually but I have some coupling because some of them fail when run as a group. Here is the code of my test fixture. https://gist.github.com/2e1dacda7944786d2d88.git
Patrick Kelly
@featuresnap
May 13 2015 17:55
My questions are: (1) Is there a teardown step I should use to prevent coupling between the tests? (2) Is my approach of injecting the TestActor into the ValidationActor as a stand-in for the ConsoleWriterActor an appropriate methodology? (3) Given that I am using the TestActor as a stand-in for ConsoleWriter, I had to use another approach to verify the ValidationActor is responding to its sender with ContinueProcessing, hence the use of Ask in the last test shown in my gist. Is that the appropriate pattern to test that the ValidationActor gives something back to its sender? Here is a link to my testfixture. https://gist.github.com/featuresnap/2e1dacda7944786d2d88