Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:12
    Aaronontheweb labeled #4099
  • 13:12
    Aaronontheweb labeled #4099
  • 13:12
    Aaronontheweb opened #4099
  • 10:41
    Aaronontheweb commented #4097
  • 08:19
    ismaelhamed synchronize #4097
  • 02:22
    kimbyungeun opened #4098
  • Dec 15 19:47

    Aaronontheweb on dev

    TypeExtensions.TypeQualifiedNam… (compare)

  • Dec 15 19:47
    Aaronontheweb closed #4071
  • Dec 15 19:47
    Aaronontheweb closed #3767
  • Dec 15 19:47
    Aaronontheweb labeled #3767
  • Dec 15 19:47
    Aaronontheweb labeled #3767
  • Dec 15 19:47
    Aaronontheweb milestoned #3767
  • Dec 15 19:44
    Aaronontheweb labeled #4097
  • Dec 15 19:44
    Aaronontheweb milestoned #4097
  • Dec 15 13:23
    Aaronontheweb commented #4096
  • Dec 15 13:22
    Aaronontheweb commented #4093
  • Dec 15 13:16
    ismaelhamed commented #4093
  • Dec 15 13:04
    ismaelhamed edited #4097
  • Dec 15 13:04
    ismaelhamed opened #4097
  • Dec 15 12:50
    ismaelhamed commented #4096
Corneliu
@corneliutusnea
argh ... just noticed ... tabs vs spaces in files .. my fault ... leave it like that for now, code is correct
Aaron Stannard
@Aaronontheweb
don't make me go all whitespace religion on you pal!
I'll fix that in the release - there's a tool in VS that keeps this stuff consistent project to project
can't remember what it is anymore
Corneliu
@corneliutusnea
I'm willing to start a fight :) pro Tabs :) hahahah
Aaron Stannard
@Aaronontheweb
spaces always win since the Tabalamo
Aaron Stannard
@Aaronontheweb
@corneliutusnea ok, got that out
made some minor changes to the file (SPACES FOREVER)
build server is cranking it out now
Corneliu
@corneliutusnea
awesome
Corneliu
@corneliutusnea
@Aaronontheweb I have lots of messages that have to go to specific actors (by path) but those actors might not be created
as the init part of the actor is quite expensive so I want to create them on demand only
Aaron Stannard
@Aaronontheweb
create some parent actors who just listen for incoming messages
Corneliu
@corneliutusnea
is is a good pattern to send the message to a "parent" that checks if the child is created, if not create it then forward the message? This is going down 4-7 layers.
Aaron Stannard
@Aaronontheweb
oh yeah
was about to suggest that
first pattern we teach in our design patterns course does that
"child per entity" pattern
Corneliu
@corneliutusnea
the issue I see is that instead of one message going from A => G I end up with 10 intermediate messages
Aaron Stannard
@Aaronontheweb
yeah, but that's extremely fast in-memory
Corneliu
@corneliutusnea
well, once you add the overhead in each layer to check if children are there .. it starts to add up
Aaron Stannard
@Aaronontheweb
the overhead of checking on the first layer of node is going to be the same as routing all the way down to the bottom node
that's how actor selections work
Corneliu
@corneliutusnea
yeah, I have 4-7 layers, each with their own checks
Aaron Stannard
@Aaronontheweb
those checks on whether a child exists or not are very fast
it's a constant time read operation
since it uses a hash
(dictionary)
Corneliu
@corneliutusnea
would it be more efficient to listen to the dead-message queue (somehow?) and notice the target children was not there, init all the actors from A .. G and repost the message?
Aaron Stannard
@Aaronontheweb
you'd have to test it
the dead letters system might end up becoming a bottleneck if you're dealing with message volumes at the level where this is a concern
Corneliu
@corneliutusnea
it would be a bit more reactive, I generally have bursts of messages so if one inits the A..G then the rest of messges will be happy
bugger
Aaron Stannard
@Aaronontheweb
the overhead of checking to see if a child exists is very loiw
Corneliu
@corneliutusnea
your overhead yes, but I have my own checks
Aaron Stannard
@Aaronontheweb
doing that N times won't be too bad - what you should eventually do though is have that leaf node child reply to the sender
and then have the sender and leaf communicate directly after that if there needs to be a "conversation"
that way you only pay for the checks once
since each will hold an actor ref to each other
Corneliu
@corneliutusnea
hm, but then if it dyes ?
Aaron Stannard
@Aaronontheweb
Context.Watch
get a deathwatch notification
and then go back through the hierarchy again
Corneliu
@corneliutusnea
ok .. so there is no way for a parent to monitor the dead-messages for their potential children
Aaron Stannard
@Aaronontheweb
there is, but all dead messages go globally to the same place
Corneliu
@corneliutusnea
yeah, so that was my question, I want to pick/intercept that in the parent not globally
Aaron Stannard
@Aaronontheweb
yeah, not possible to do that
parent can check if the child exists first
before routing the message to it
and that's the preferred way of dealing with it