Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 23 19:39

    Aaronontheweb on nuget

    (compare)

  • Sep 23 19:39

    Aaronontheweb on dev

    Bump AkkaVersion from 1.4.41 to… (compare)

  • Sep 23 19:39
    Aaronontheweb closed #158
  • Sep 23 19:30
    dependabot[bot] edited #158
  • Sep 23 19:29
    dependabot[bot] synchronize #158
  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29

    dependabot[bot] on nuget

    Bump AkkaVersion from 1.4.41 to… (compare)

  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29
    dependabot[bot] edited #158
  • Sep 23 19:29

    Aaronontheweb on dev

    Bump Docker.DotNet from 3.125.1… (compare)

  • Sep 23 19:29

    Aaronontheweb on nuget

    (compare)

  • Sep 23 19:29
    Aaronontheweb closed #157
  • Sep 23 19:29
    Aaronontheweb auto_merge_enabled #158
  • Sep 23 19:28
    dependabot[bot] labeled #158
  • Sep 23 19:28
    dependabot[bot] opened #158
  • Sep 23 19:28

    dependabot[bot] on nuget

    Bump AkkaVersion from 1.4.41 to… (compare)

  • Sep 23 18:18
    dependabot[bot] edited #5370
  • Sep 23 18:17
    dependabot[bot] synchronize #5951
  • Sep 23 18:17

    dependabot[bot] on nuget

    Bump FluentAssertions from 5.10… (compare)

  • Sep 23 18:17
    dependabot[bot] edited #5951
Shukhrat Nekbaev
@snekbaev
crash:
akka://Test/user/$a/a/$a
akka://Test/user/$a/a/$g
akka://Test/user/$a/a/$i
akka://Test/user/$a/a/$h
akka://Test/user/$a/a/$j
akka://Test/user/$a/a/$e
akka://Test/user/$a/a/$c
akka://Test/user/$a/a/$b
akka://Test/user/$a/a/$f
akka://Test/user/$a/a/$d
CHRParentActor - PreStart
Work received for userId 0
Instance counter: 10
Work received for userId 2
Instance counter: 10
Work received for userId 1
Instance counter: 10
Work received for userId 3
Instance counter: 10
Work received for userId 4
Instance counter: 10
akka://Test/user/$a/a/$e
akka://Test/user/$a/a/$d
akka://Test/user/$a/a/$a
akka://Test/user/$a/a/$h
akka://Test/user/$a/a/$i
akka://Test/user/$a/a/$b
akka://Test/user/$a/a/$c
akka://Test/user/$a/a/$f
akka://Test/user/$a/a/$j
akka://Test/user/$a/a/$g
[ERROR][23.7.2018 11:27:27][Thread 0005][akka://Test/user/$a/a] Being reused!
Cause: System.Exception: Being reused!
   at TestActors.ConsistentHashRouting.CHRChildActor.HandleWork(Work work) in c:\Workspace\c#\akka.net\TestActors\ConsistentHashRouting\CHRChildActor.cs:line 40
   at Akka.Case.With[TMessage](Action`1 action)
   at TestActors.ConsistentHashRouting.CHRChildActor.OnReceive(Object message) in 
REDACTED
Bartosz Sypytkowski
@Horusiath
@snekbaev you can always Context.Watch over your actors - if they are killed (i.e. as a result of not being albe to replay they journal) they will notify watchers with Terminated message. Btw. if this happens in production, it means that your event journal has been corrupted and can no longer serve as a reliable source of data - in that case waiting for the response is the least of your problem.
Shukhrat Nekbaev
@snekbaev
this is a test app I'm using to learn Akka :) and to test things faster :)

btw, I ran into some quirks with:

 message.Match().With<Work>( HandleCrash )
                   .Default( Unhandled );

the pattern matching API, I'd assume it is not meant to be used by end users? Yesterday, I was "watch"ing and waiting for "Terminated" message, but never got it, though was getting unhandled messages, when checked, it was some Akka.Case which wrapped the "Terminated" message. Because of that I reworked the message handler to switch

Shukhrat Nekbaev
@snekbaev
message.Match().With<SEChildChildActor.Crash>( HandleCrash )
       .Match().With<Terminated>(HandleTerminated)
       .Default( o =>
                 {
                     Console.WriteLine( o );
                     Unhandled(o);
                 } );
became:
switch (message)
{
    case SEChildChildActor.Crash crash:
        HandleCrash( crash );
        break;

    case Terminated terminated:
        HandleTerminated(terminated);
        break;

    default:
        Unhandled( message );
        break;
}
Vasily Kirichenko
@vasily-kirichenko
I believe ConsistentHashPool guarantees that messages with same key are routed to the same actor (but it does not guarantee that there is single actor per key). It seems it keeps a ring of actors and select one by index.
Shukhrat Nekbaev
@snekbaev
@vasily-kirichenko any ideas why not-naming/short-naming the pool affects that rotation?
Vasily Kirichenko
@vasily-kirichenko
no
Vasily Kirichenko
@vasily-kirichenko
so, I don't think the resizer can be used at all
because if nr of actors grows, messages may be routed to different actors
Shukhrat Nekbaev
@snekbaev
yeah, I'd probably go with a list/dictionary and create actors per "some id"
Vasily Kirichenko
@vasily-kirichenko
let me check some books on this pool
Shukhrat Nekbaev
@snekbaev
btw, what is the common practice for that: say I want actor per user, I can create actor for each user and prefix the actor name with userId. Then, if needed, I can use ActorSelection to talk to it directly. Another way, is to have a list in some UserManagerActor, which has userIds mapped to each IActorRef. But in that case to talk to a child UserActor I will need to route through the UserManagerActor
Vasily Kirichenko
@vasily-kirichenko
ActorSelection would be too slow I'm afraid
it should be avoided in most cases
Bartosz Sypytkowski
@Horusiath
@snekbaev if you're using clusters, akka cluster sharding gives you exactly that
Vasily Kirichenko
@vasily-kirichenko
yeah, but I'm afraid he does not use cluster.
Bartosz Sypytkowski
@Horusiath
then a simple user coordinator can work
Vasily Kirichenko
@vasily-kirichenko
which holds a userid -> actorref dictionary?
I mean using ActorSelection is not good for this
@snekbaev
image.png
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko @snekbaev if a coordinator is a single purpose, you don't need dictionary or anything:
Receive<SendTo>(send => {
  string recipient = send.Recipient;
  object message = send.Message;
  var child = GetChild(recipient);
  if (Equals(child, ActorRefs.Nobody)) 
  {
    child = Context.ActorOf(childProps, recipient);
  }
  child.Forward(message);
});
Vasily Kirichenko
@vasily-kirichenko
ah, GetChild
cool
Shukhrat Nekbaev
@snekbaev
no cluster, no remoting so far, just a test app :)
Vasily Kirichenko
@vasily-kirichenko
I hope it's O(1) ;)
Shukhrat Nekbaev
@snekbaev
@vasily-kirichenko ActorSelection, I've been battling to avoid it, but then I'm left either pass it via constructor and the chain can be long, or try to init the actor with some message, which shifts those actors to use "Become", also they will probably use some "discovery" actor by ActorSelection anyway...
@Horusiath hm, I don't seem to have GetChild in Akka 1.3.8, did you mean: Context.Child( )?
Aaron Stannard
@Aaronontheweb
@eaba what persistence driver are you using?
@snekbaev yes he does
Context.Child is O(1) - it's a dictionary lookup
Vasily Kirichenko
@vasily-kirichenko
great
Ebere Abanonu
@eaba
@Aaronontheweb sqlserver
Aaron Stannard
@Aaronontheweb
yeah, so color me really, really skeptical that it's missing sequence numbers
it's the most heavily used
catalinrolea
@catalinrolea
@catalinrolea
guys, i'am still having this error when i try to build an akka HttpListener to cloud foundry:" org.cloudfoundry.security.CloudFoundryContainerTrustManagerFactory getSystemTrustManager
org.cloudfoundry.security.CloudFoundryContainerTrustManagerFactory getSystemTrustManager
org.cloudfoundry.security.CloudFoundryContainerTrustManagerFactory getContainerTrustManager
2018-07-23T14:27:21.67+0300 [APP/PROC/WEB/1] ERR INFO: Adding TrustManager for /etc/ssl/certs/ca-certificates.crt"
You can see the code here:
https://github.com/catalinrolea/cf-akka-http
I have tried a lot of examples from akka but still not working
many thanks.
Aaron Stannard
@Aaronontheweb
@catalinrolea wrong framework
this is Akka.NET
C# / F# port
catalinrolea
@catalinrolea
sorry
Aaron Stannard
@Aaronontheweb
no problem
@eaba please file an issue with a description of what you're observing and a minor reproduction case if you can
Shukhrat Nekbaev
@snekbaev
@Aaronontheweb regarding the ConsistentHashingPool and naming issue I mentioned earlier, do you know why this happens?
Ebere Abanonu
@eaba
@Aaronontheweb I will give it a try
Rodger Brennan
@rodgerbrennan
I have a ReceivePersistentActor that talks to an IOT device. My real-life use case is surprisingly similar to the Device Actor in the introduction tutorials but, I need to throttle calls to the device to no more than 1 call for every 250ms. Can anyone provide some guidance on how I might accomplish this?
Shukhrat Nekbaev
@snekbaev
@rodgerbrennan maybe set a ReceiveTimeout for the given interval?
v1rusw0rm
@v1rusw0rm
@rodgerbrennan what is the source of calls to the device? Is device actor periodically calling it? Or another actor\external system sends request to the device actor and then the device actor sends\ask something from device?
Rodger Brennan
@rodgerbrennan
The source is a webapi implemented with Giraffe. There's also a job that will run on a schedule of every 15 minutes. The device I'm talking to has several commands that need to be called in sequence, and each command needs to be about 250ms apart. Ex. The job reads the temperature from the device, then reads the power levels of the device. Right now I have the actor doing this and storing the results of the read operation. I have an actor for each device. What I don't have at the moment is a way to prevent the actor from executing more than on command within that 250 window.