Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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
  • Dec 13 08:37
    Aaronontheweb synchronize #4071
  • Dec 13 08:13
    jiyeongj opened #4094
  • Dec 12 15:42
    Aaronontheweb synchronize #4086
  • Dec 12 15:42
    Aaronontheweb closed #4083
  • Dec 12 15:42

    Aaronontheweb on dev

    Fix #4083 - Endpoint receive bu… (compare)

  • Dec 12 15:42
    Aaronontheweb closed #4089
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb labeled #4093
  • Dec 12 15:42
    Aaronontheweb opened #4093
  • Dec 12 14:20
    Aaronontheweb commented #4092
Roger Johansson
@rogeralsing
That is done using either .stop or sending poisonpill, not by calling dispose
See the actor system as its own container, bad idea to try to have two competing containers decide when to kill things
The same things that is
Roger Johansson
@rogeralsing
You can create a factory that creates the actor for you, and if the factory is disposed, you send poisonpill to kill the actor. That way, the ActorSystem is in charge all the time, while you still can inject the factory and get the actorref
Natan Vivo
@nvivo
@rogeralsing Is Pigeon.conf really always loaded by the actor system, or is it just a reference?
Roger Johansson
@rogeralsing
Then DI the factory whereever you need it
Arjen Smits
@Danthar
and back. catching up on reading
Roger Johansson
@rogeralsing
Always loaded , its the fallback for properties that the user config didnt supply
Natan Vivo
@nvivo
thanks
Roger Johansson
@rogeralsing
There are probably some old JVM gunk in there still
Natan Vivo
@nvivo
@rogeralsing about the dispatchers, do you have any other common use case for them, so I can mention in the documentation?
Roger Johansson
@rogeralsing
Yes, we have one dispatcher that captures current synchronizationcontext , so you can run actors in gui threads and update controls and such w/o threading issues
Eg if you want to async fill a grid or something
Natan Vivo
@nvivo
hmm. ok!
that's important
Roger Johansson
@rogeralsing
(Those actors should ofc not do heavy work, just update gui in a reactive way)
Maybe a reactive gui app for stock prices are a good example
There is also a pinned thread dispatcher, if you want to dedicate an entire thread to a specific actor
And the forkjoindispatcher, that has its own dedicated threadpool, to avoid noisy neigbours. Eg if some actors are more important than others, it can be isolated from the default shared threadpool
Natan Vivo
@nvivo
Thanks! that helps a lot, gave me already some direction
Arjen Smits
@Danthar
@rogeralsing You basically confirmed what I already expected. Akka uses the DI container to create an instance of your Actor, and after that, Akka is responsible for the lifecycle of the Actor. And not the DI container.
So that confirms my remarks about not supporting any DI lifetime scope except Transient/InstancePerDependency
Roger Johansson
@rogeralsing
it depends on what you mean with scope i guess, lets say you have one dependency that should be recreated for each usage in a dependency graph, that ofc works, and of there is some dependency that should be unique per resolve, that would work too... Eg if a foo have a ref to 5 bars and 3 baz. It could be resolved as 5 bars and one single baz. For the same foo, if foo is injected to the actor
Natan Vivo
@nvivo
@rogeralsing please correct if I'm wrong. Most of the JVM akka docs say that hocon configuration overrides code config. But some tests I did here shows the opposite. For example, if you specify WithRouter(...) in code, it overrides any hocon config. Is it correct that Akka.net gives preference to code over config or I missed something?
Arjen Smits
@Danthar
@rogeralsing I'll do a write-up about this for the http://getakka.net/docs/Dependency%20injection page. Ill run it by you guys when im done.
Arjen Smits
@Danthar
General question to whomever can answer this :P. My ActorSystem behaves in such a way, that it can be in an 'idle' state. Which effectively means that the mailboxes for a few key Actors in my system are empty. Does Akka currently has a way for a user of the framework to monitor this kind of state for an actor ?
So something along these lines:
    actor1.Ask<bool>("areyoubusy")
where the "areyoubusy" is a system(?) message which tells me if there are messages in the actor1's mailbox
Alexander Prooks
@aprooks
I'd beter save info when last message is processed, and on 'areyoubusy' report if any message is processed for the last second/minute whatever you need
Natan Vivo
@nvivo
@Danthar It's a good idea to leave a note on akkadotnet/getakka.net#7 to help coordinate the efforts
depending on the size of your changes
@Danthar by chance I'm looking at the resizer implementation. It seems that if you create a custom router, you can use ActorRefRoutee to lookup this information: https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka/Routing/Resizer.cs#L245
Natan Vivo
@nvivo
I guess the way to do it then would be create a parent to intercept "are you busy" messages and the actor would ask the custom router directly
Arjen Smits
@Danthar
@aprooks a busy message based on actor idle time/last message processed would work. But I am not sure it fits my scenario. Would have to think about it some more.
Natan Vivo
@nvivo
fwiw, i did the same with actors directly and a simple "entry" record for each child
Arjen Smits
@Danthar
@nvivo a group-router-like actor could definitely be used to wrap the idle-monitoring behaviour.
Natan Vivo
@nvivo
basically created a class Entry { ActorRef Actor; bool Busy; }
and set the flags on request response. this of course depended on all answers going back to the actor I had
this model is so flexible there are many ways to do the same thing
Arjen Smits
@Danthar
Yup
Thats why I was asking if there is anything in Akka right now, that can be used to achieve the same thing. Without me having to manually implement it.
Brandon Wilhite
@JediMindtrick
Is there a way to allow an akka.net actor to interact with a remote akka (jvm) actor? Akka-jvm has a wire protocol, would this allow it?
Natan Vivo
@nvivo
not currently
Brandon Wilhite
@JediMindtrick
ok, so not currently. If we wanted to build such a thing, does anyone know if the wire protocol might be the enabling tech for it? OR is there really not any enabling tech (other than design off of http/tcp/whatever from the ground up)?
Arjen Smits
@Danthar
When you start talking about communicating between the CLR and JVM It suffers from the same problems as any remoting tech. The wire protocol is the least of your problems.
Brandon Wilhite
@JediMindtrick
Sure, there would be a lot of obstacles.
There's a lot of complexity there that would have to be handled. My thought was that possibly the Akka wire protocol was defined to help handle some of it....not really just worried about the transport here.
Arjen Smits
@Danthar
@Aaronontheweb would know alot more about this topic.
Brandon Wilhite
@JediMindtrick
k, thanks