Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:23
    Aaronontheweb commented #4096
  • 13:22
    Aaronontheweb commented #4093
  • 13:16
    ismaelhamed commented #4093
  • 13:04
    ismaelhamed edited #4097
  • 13:04
    ismaelhamed opened #4097
  • 12:50
    ismaelhamed commented #4096
  • 12:48
    ismaelhamed commented #4096
  • 12:05
    Aaronontheweb commented #4096
  • 11:43
    ismaelhamed commented #4096
  • Dec 14 19:13
    hwanders commented #4096
  • Dec 14 13:05
    IgorFedchenko commented #4085
  • Dec 14 03:08
    hhko commented #4094
  • Dec 13 21:37
    Aaronontheweb commented #4085
  • Dec 13 20:28
    IgorFedchenko commented #4085
  • Dec 13 20:27
    IgorFedchenko commented #4085
  • Dec 13 15:38
    Aaronontheweb labeled #4096
  • Dec 13 15:38
    Aaronontheweb milestoned #4096
  • Dec 13 15:38
    Aaronontheweb labeled #4096
  • Dec 13 15:38
    Aaronontheweb opened #4096
  • Dec 13 10:41
    peirens-bart opened #4095
Aaron Stannard
@Aaronontheweb
ohhhhhhhh
that was my talk at the Cassandra Conference
me-slove
@me-slove
yep. that's it
Aaron Stannard
@Aaronontheweb
nice
I can certainly do more of that
way easier than writing a tutorial!
:p
@sbacquet I didn't realize they were skipped; must be some more hardening required for those specs
I want to get that stuff out of beta ASAP
decoupling Akka.Cluster.Sharding from Akka.Persistence is a win-win for many users
DData is essential to doing that
I wish I could offer a timeline on when that would happen
but I'm spread pretty thin at the moment and I know @Horusiath is hard at work on the multi-datacenter cluster stuff we're including in the Akka.NET v1.4 release
Sebastien Bacquet
@sbacquet
Ok thank you @Aaronontheweb for your answer.
Re-enabling the tests could be a good first move on the path of making DData official, at least to ensure that no major regression is introduced.
Aaron Stannard
@Aaronontheweb
gotta debug them too
there's a reason they're disabled
hectorcaban
@hectorcaban

private void CreateChildUserIfNotExists(int userId)
{
if (!_srdapclients.ContainsKey(userId))
{
IActorRef newChildActorRef =
Context.ActorOf(Props.Create(() => new SRDAPClient(userId)).WithRouter(FromConfig.Instance), "SRDAPClient" + 1);

            _srdapclients.Add(userId, newChildActorRef);

            ColorConsole.WriteLineYellow(string.Format("UserCoordinatorActor created new child UserActor for {0} (Total SRDAPClient: {1})", userId, _srdapclients.Count));
        }
    }

if I am trying to configure round-robin using Hokon.

/SRDAPClient {
router = round-robin-pool
nr-of-instances = 5
routees.paths = ["/SRDAPCoornator/SRDAPClient/*"]
}

Stephen Riley
@stephen-riley
Hi gang, got a question about contexts (Contexts?) inside lambdas in Akka.net. I am trying to do a Tell() inside a ContinueWith( ...lambda... ) and the message always comes from deadLetters. However, when I put a self (closed over copy of Self) as the explicit sender in the Tell(), it works fine.
hectorcaban
@hectorcaban
since the actors are created dynamically, how do I configure the Hokon ?
Stephen Riley
@stephen-riley
So my question is, how does the Tell() work under normal circumstances when you don't give it an explicit sender?!
Code as follows:
Onur Gumus
@OnurGumus
@stephen-riley It defaults to NoSender AFAIK.
but that depends on from where you invoke I think.
Stephen Riley
@stephen-riley
var self = Self;

httpClient.GetAsync(req.Url).ContinueWith(responseTask =>
{
    var response = responseTask.Result;
    var duration = stopwatch.Elapsed.TotalMilliseconds;
    var msgResponse = new AkkaBlaster.Dto.WebResponse
    {
        StatusCode = response.StatusCode,
        Duration = duration
    };

    mylogger.Tell($"{(int)msgResponse.StatusCode} {msgResponse.Duration} - {req.Url}" /*, self */);        // <---
},
TaskContinuationOptions.AttachedToParent & TaskContinuationOptions.ExecuteSynchronously);
Onur Gumus
@OnurGumus
@stephen-riley Self itself is a property
and it requires to access to current actor within the current synch context.
what I do is ``` var self = Self; //now I can use self anywhere ````
Stephen Riley
@stephen-riley
within the current synch context
I think that's what I'm not getting.
Onur Gumus
@OnurGumus
Inside the actor if you run another thread like Task.Run ( you can't access to Self any more.
because Self invokes code and requires you to be on the message queue thread of the actor.
Stephen Riley
@stephen-riley
Yes, @OnurGumus , I have the var self = Self; thing, but I don't get why there's at least some Self defined inside the lambda I'm passing to ContinueWith().
because Self invokes code and requires you to be on the message queue thread of the actor.
OOOOOOOH! :-D
me-slove
@me-slove
It sounds like the issue isn't that. It's a closure problem. Assign a local variable and pass that through. You are running a task which means things can change
Stephen Riley
@stephen-riley
If Self is invoking code, I see the opportunity for what I'm seeing.
Okay.
Onur Gumus
@OnurGumus
yes it is. That's why I said offload it by var self = Self;
then you can use it anywhere.
Stephen Riley
@stephen-riley
I'm still not sure why my mylogger ActorSelection isn't carrying context with it, though.
var mylogger = Context.ActorSelection("/user/ConsoleLogger");
Why must I specify my closed-over self as the explicit sender in my call to mylogger.Tell()?
Onur Gumus
@OnurGumus
you don't need.
I thought you were trying to access self.
Stephen Riley
@stephen-riley
var mylogger = Context.ActorSelection("/user/ConsoleLogger");

mylogger.Tell("message");            // this does not work (always from deadLetters)

mylogger.Tell("message}", self);    // this works fine
Onur Gumus
@OnurGumus
that's not normal.
Stephen Riley
@stephen-riley
lol
Good, glad it's not just me. :smile:
Onur Gumus
@OnurGumus
No it's just you.