Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 12:27
    valdisz synchronize #3904
  • 11:43
    cptjazz commented #3925
  • 11:40
    cptjazz synchronize #3925
  • 11:02
    valdisz edited #3904
  • 10:55
    Aaronontheweb synchronize #3926
  • 10:45
    Aaronontheweb opened #3927
  • 10:01
    valdisz synchronize #3904
  • 06:22
    cptjazz commented #3925
  • Sep 21 19:33
    Aaronontheweb opened #3926
  • Sep 21 16:19
    valdisz synchronize #3904
  • Sep 21 14:58
    Aaronontheweb synchronize #3924
  • Sep 21 14:58
    Aaronontheweb commented #3922
  • Sep 21 14:45
    valdisz synchronize #3904
  • Sep 21 14:43
    valdisz synchronize #3904
  • Sep 21 14:35
    Aaronontheweb commented #3925
  • Sep 21 09:51
    cptjazz opened #3925
  • Sep 21 09:11
    cptjazz opened #3924
  • Sep 20 23:30

    Aaronontheweb on dev

    added ability to support custom… (compare)

  • Sep 20 23:30
    Aaronontheweb closed #3923
  • Sep 20 23:30
    Aaronontheweb closed #3861
Aaron Stannard
@Aaronontheweb
/// <summary>
    ///     Used to load HOCON definitions from a dedicated HOCON file
    /// </summary>
    public static class HoconLoader
    {
        /// <summary>
        ///     Parses a HOCON <see cref="Config" /> object from an underlying file
        /// </summary>
        /// <param name="path">The path to the HOCON file.</param>
        /// <returns>A parsed <see cref="Config" /> object.</returns>
        public static Config FromFile(string path)
        {
            return ConfigurationFactory.ParseString(File.ReadAllText(path));
        }
    }
similar to how you'd use a .JSON file for Microsoft.Extensions.Configuration
and then I pass that hocon object into the ActorSystem.Create(string name, Config config) method
we'll probably add something to Akka.NET core to make that easier soon
mmansouri
@mmansouri
ok thanks :smile: i will try this
Aaron Stannard
@Aaronontheweb
you'll want to set the text file to be treated as Content by MSBUILD
and then set it to Copy Always or Copy If Newer
mmansouri
@mmansouri
yeah an easier way to manage hocon in net core will be awesome
Jose Carlos Marquez
@oeaoaueaa
@Aaronontheweb PR updated: AkkaNetContrib/Akka.DI.Ninject#10 will bear that in mind next time
AnchishkinAlex
@AnchishkinAlex
@Aaronontheweb Hi! Thanks again for support yesterday! It works! There is another one problem with Akka.NET Remote.
I suppose it's enum serialization problem. We're expecting from remote actor enum return type but it returns long. (Of course Sender.Tell(EnumType))
Actor.Ask<EnumType>() //InvalidCastException
Google says about Akka.Cluster only. Is it right way for fixing this problem?
Bartosz Sypytkowski
@Horusiath
@AnchishkinAlex probably some problem with serializer. You may need something non-standard.
@object sometimes there are actors, that are not fully initialized at the end of the constructor call i.e. ReceiveActor doesn't have it's handler behavior compiled yet, PersistentActor didn't trigger recovery procedure. PreStart is not always mandatory, but it's a good rule of thumb
AnchishkinAlex
@AnchishkinAlex
@Horusiath does it mean asking of actor for EnumType is non-standard? For example, is it better to create Message class with Enum field?
Bartosz Sypytkowski
@Horusiath
@AnchishkinAlex I mean, you may try to use custom serializer for the enum type. Usually actors exchange more complex messages, afaik enum field in complex object should be deserialized correctly
AnchishkinAlex
@AnchishkinAlex
@Horusiath ok. I asked it because this problem occurs only with remote actor. Actors from one actor system can return enum type without exception. So I need explore near custom deserialization and serialization?
Bartosz Sypytkowski
@Horusiath
yes, messages exchanged between actors on the same node are not serialized.
AnchishkinAlex
@AnchishkinAlex
@Horusiath thanks! The last question: has Akka.Cluster some implementations for serialization? Does it make sense to realize Akka.Cluster only for fixing it?
Bartosz Sypytkowski
@Horusiath
@AnchishkinAlex I don't quite get your question.
AnchishkinAlex
@AnchishkinAlex
@Horusiath I'm sorry. If I'll make connection between actors through Akka.Cluster this problem can be fixed automatically? Or it needs custom serializer anyway?
Bartosz Sypytkowski
@Horusiath
Akka.Cluster is a layer on top of Akka.Remote - it doesn't replace transport
AnchishkinAlex
@AnchishkinAlex
Ok. Thanks a lot! All the best!
Bartosz Sypytkowski
@Horusiath
no problem ;)
Vagif Abilov
@object
Thanks @Horusiath
Bart de Boer
@boekabart
I had this idea today that would greatly help debugging Akka applications (actually, unit tests) - a way to render all the interactions between actors as a sort of 'sequence diagram' . But in order to do this, I need some kind of hook that tells me about each message being Telled. IIRC Monitoring does something like it - but is there a generic way to hook in somewhere in order to get the data I'm looking for?
Bart de Boer
@boekabart
Hook into Dispatcher somehow?
Aaron Stannard
@Aaronontheweb
the ActorCell or mailbox maybe
ActorCell has the best information probably
if not there then overriding the AroundReceive base method
on your actors
Bart de Boer
@boekabart
The thing with AroundReceive is that... it's actually the moment of telling that's interesting as well
most interesting and consistent, as multiple Tells will always be in the right order then.
But Dispatcher can't have the hook as it handles entire mailboxes, and Monitoring , well, requires changes to each actor as well...
Going to look at Cell
Andrew Young
@ayoung
as far as you guys know, compatibility between nodes running in .NET Framework and .NET Core isn't a problem, right?
Cluster nodes, that is.
Bart de Boer
@boekabart
@ayoung IIRC it is not supported at all (serialization issues with at least one of the serializers)
Arjen Smits
@Danthar
@ayoung @boekabart Im not aware of any issues? If you use the same serializer on each side, it should not be an issue. Best approach would be to use protobuff all the way through.
/cc @alexvaluyskiy ?
Roman Golenok
@shersh
Guys, is Akka.IO ready for production?
I still see TBD in documantation for classes.
Alex Valuyskiy
@alexvaluyskiy
@shersh yes, it is ready. TBD is related only for XML Documentation, not for the API itself
Paweł Bańka
@pmbanka

Hi, I have a question related to Stash. I don't understand this piece of docs:

The IWithUnboundedStash interface implementation of PreRestart will call UnstashAll(), which is usually the desired behavior.

(http://getakka.net/articles/actors/receive-actor-api.html#stash) Does this happen automagically when I implementIWithUnboundedStash on my actor? Where is this logic defined? I can't find it...

yeah, seems like it, since BeforeIncarnated is a

Plugin behavior applied to underlying <paramref name="actor"/> instance before the actor is being recycled.

Paweł Bańka
@pmbanka
While I'm at it, another question - why is UntypedActor API "recommended for C# 7 users"? Because of better switch support?
Aaron Stannard
@Aaronontheweb
@shersh yep, we use it in our products
@pmbanka I still use ReceiveActor mostly myself
but yeah, C# 7 makes working with the UntypedActor much more bearable
but ReceiveActor can do things switch cannot, such as matching on generics
Paweł Bańka
@pmbanka
thanks @Aaronontheweb. The docs left me quite confused about the difference and whether one of them should be preferred (and why)
Bart de Boer
@boekabart
So is the bottom line that ReceiveActor is likely to be 'heavier' than necessary for C# 7 code?