Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 12:04
    nagytech synchronize #4092
  • 11:53
    nagytech synchronize #4092
  • 11:49
    nagytech edited #4092
  • 11:40
    nagytech opened #4092
  • 11:32
    nagytech edited #4091
  • 11:32
    nagytech opened #4091
  • 10:13
    nagytech commented #3954
  • 05:29
    nagytech commented #4090
  • 05:29
    nagytech opened #4090
  • Dec 11 23:52
    scptre commented #4082
  • Dec 11 14:26
    nagytech commented #3954
  • Dec 11 11:18
    nagytech edited #4089
  • Dec 11 11:17
    nagytech opened #4089
  • Dec 11 11:00
    nagytech commented #4083
  • Dec 11 08:34
    jiyeongj commented #4083
  • Dec 11 08:33
    jiyeongj commented #4083
  • Dec 11 08:33
    jiyeongj commented #4083
  • Dec 11 07:57

    dependabot-preview[bot] on nuget

    (compare)

  • Dec 11 07:57

    dependabot-preview[bot] on dev

    Bump MongoDB.Driver from 2.9.1 … (compare)

  • Dec 11 07:57
    dependabot-preview[bot] closed #104
Aaron Stannard
@Aaronontheweb
looks like this is a good candidate for a model-based test
Ronnie Overby
@ronnieoverby
?
Aaron Stannard
@Aaronontheweb
in fact, I should probably just make the priority calculator immutable
I have no idea why it isn't
I still need to publish post 3 in that series
Ronnie Overby
@ronnieoverby
will read :+1:
Aaron Stannard
@Aaronontheweb
@Silv3rcircl3 so yeah, this is a stumper.... the LocalActorRefProvider throwing when creating the system guardian, but only inside Akka.Streams.Tests and only randomly on some of them?
well, always one sure fire way to fix this
not use the expression compiler that way, period
Aaron Stannard
@Aaronontheweb
ok, inlined that part of the guardian startup process
i don't know why that failed on only the Akka.Streams.Tests
let's see if this works
Aaron Stannard
@Aaronontheweb
yep, that did the trick
although the Thread.Interrupt call we make on one of the specs caused the XUnit test runner to blow up
which is actually kind of entertaining TBH
but otherwise the Akka.Streams.Tests are passing now
Marc Piechura
@marcpiechura
@Aaronontheweb great! Replacement for the Interrupt call is already in the netcore branch see alexvaluyskiy/akka.net@3c6861a if you want to pick it
Peter Hvidgaard
@hvidgaard
Is there any way to create an Actor from a background thread, which can use the "akka.actor.synchronized-dispatcher" dispatcher without capturing the context from a UI thread and injecting it?
it just seems to backwards.
Marin
@mrn-aglic

I am not sure if this is a bug or not, or if this should be posted here or not, but here it goes...

I am using Akka.NET remoting, I have one "client" and one "server" application (I know akka doesn't distinguish between them) and I wanted to receive some entity (called History) from the server.

The class I was sending from the server has an IReadOnlyCollection of one of my custom entities (conveniently called Entity).
Now the Entity class had 2 constructors, first of which took a string and parsed it into a DateTime object, and the second which took a DateTime object.

However, when I tried to send this History from the server to the client I would get a disassociated exception.
Looking into it, I first commented out the construct that takes the DateTime object. However, when the other constructor was invoked, the string paramater (which I would like to parse to a DateTime) was equal to null.

Commenting out the constructor that takes a string and tries to parse it into a DateTime, I was left with only the second constructor which takes a DateTime object. This worked.

But I don't know why exactly it didn't work when I had both constructors, or why the string parameter was equal to null.

I can send or link the file with all of the classes if it could help.

Sorry if I am/was unclear.

Bartosz Sypytkowski
@Horusiath
@mrn-aglic looks like a problem with serialization/deserialization - assuming you're using default (JSON.NET), it's probably not able to match the serialized fields with constructor arguments.
eyantiful
@eyantiful
Hi guys, A question regarding cluster router, How can i prevent the router from receiving messages before its routees table is ready?
I mean is there some IsReady event i can get from the router?
asking the router for GetRoutees returns empty while not ready ....
Bart de Boer
@boekabart
@mrn-aglic I always add unit tests for all types that need over-the-wire serialization, that tests their ability to be (de)serialized (and correctly so)
Using this helper:
public static class SerializerTestHelpers
    {
        public static async Task<T> AkkaSerialized<T>(this T src)
        {
            var hokon = "akka.actor.provider = \"Akka.Remote.RemoteActorRefProvider, Akka.Remote\"" +
                        Environment.NewLine +
                        "akka.remote.helios.tcp.port = 0" + Environment.NewLine +
                        "akka.remote.helios.tcp.hostname = localhost";
            var sys = ActorSystem.Create("src");//, ConfigurationFactory.ParseString(hokon));
            await sys.Terminate();
            var ser = sys.Serialization.FindSerializerFor(src);
            var bin = ser.ToBinary(src);
            return (T)ser.FromBinary(bin, typeof(T));
        }
    }
Bart de Boer
@boekabart
If you use a different-than-default serializer, you configure it in the hokon string as you do for your application.
So you instantiate your class, then call .AkkaSerialized() on it, and compare the resulting output (if not an exception ;) ) with the input version. Should be equal enough for your use case.
Damian Reeves
@DamianReeves
@boekabart thats a nice and straightforward utility method
Bart de Boer
@boekabart
Just notice now that the hokon is not used in the code ;)
commented out
Damian Reeves
@DamianReeves
Hey guys I've been looking at Akka.Interfaced, but before I dive headlong into making interface contracts for all my actors I wanted to know how everyone else manages the needs to have contracts/protocols for their actors so that they are approachable by all members of the team. I'm assuming Akka.Interfaced is not that widely used (but it does give you nice Orleans style interfaces to code against)
Ismael Hamed
@ismaelhamed
When deleting events from the EventJournal in Akka.Persistence.SqlCommon, has the IsDeleted column any use anymore?
Ronnie Overby
@ronnieoverby
@Aaronontheweb akkadotnet/akka.net#2308
Bartosz Sypytkowski
@Horusiath

@DamianReeves in Akka (and other message based models) it's easier to define a contract on message level, i.e:

interface IMyProtocolMessage {}
sealed class MyMessage1 : IMyProtocolMessage {}
sealed class MyMessage2 : IMyProtocolMessage {}

Unlike method calls, messages are composable. You can wrap one message with another, batch them, redirect or persist if necessary. Also, you can define dynamic interfaces (through Become) with that.

For type safety it's possible to wrap IActorRefs with typed version (think IActorRef<IMyProtocolMessage>) - I've made this a default in Akkling.

Damian Reeves
@DamianReeves
Hmm... that makes sense. So @Horusiath when you store IActorRefs in your actor implementations you store IActorRef<T>s so that that lets you know what set of messages you can send?
Bartosz Sypytkowski
@Horusiath
yes, I use custom surrogate wrapper over existing one
which contains type parameter
Damian Reeves
@DamianReeves
Cool, will crack open Akkling and take a look. I was starting to feel like the whole Akka.Interfaced approach was solving one problem but eliminating some of the benefits of a message oriented app model
Bartosz Sypytkowski
@Horusiath
Akkling is in F# - in C# you can do a little more (F# doesn't allow you do explicitly define covariant/contravariant types)
Damian Reeves
@DamianReeves
So what is the role of the TypedActorRefSurrogate<'Message>, is that for serialization purposes?
Bartosz Sypytkowski
@Horusiath
yes, actor refs need to have their own custom serialization/deserialization strategy - they are not serializable/deserializable without context. This is where surrogates come to play.
Damian Reeves
@DamianReeves
Ok, will have to look at examples of Akka's serialization surrogate usage. I like the pattern
Vagif Abilov
@object
When using F# API and piping an async task, where should a client catch possible task cancellation exception?
I.e. if the code looks like
doSomethingAsync |!> mailbox.Self
And doSomethingAsync is cancelled
How does this cancellation propagated to an F# actor function?
Bartosz Sypytkowski
@Horusiath
@object not tested but I guess it should be Failure message with TimeoutException inside
Ronnie Overby
@ronnieoverby
Messages are not copied when being passed between local actors, correct?
Vagif Abilov
@object
@Horusiath Failure message? What kind of message is it? Where is it defined?