Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 22:08
    dependabot[bot] labeled #234
  • Dec 03 22:08
    dependabot[bot] opened #234
  • Dec 03 22:08

    dependabot[bot] on nuget

    Bump MongoDB.Driver from 2.14.0… (compare)

  • Dec 03 19:13

    dependabot[bot] on nuget

    (compare)

  • Dec 03 19:13
    dependabot[bot] opened #115
  • Dec 03 19:13
    dependabot[bot] closed #112
  • Dec 03 19:12
    dependabot[bot] commented #112
  • Dec 03 19:12
    dependabot[bot] labeled #115
  • Dec 03 19:12

    dependabot[bot] on nuget

    Bump Npgsql from 5.0.10 to 6.0.… (compare)

  • Dec 03 16:34
    Arkatufus labeled #5415
  • Dec 03 16:34
    Arkatufus opened #5415
  • Dec 03 16:25
    Aaronontheweb milestoned #5414
  • Dec 03 16:25
    Aaronontheweb labeled #5414
  • Dec 03 16:25
    Aaronontheweb opened #5414
  • Dec 03 16:21
    Aaronontheweb edited #5413
  • Dec 03 16:21
    Aaronontheweb labeled #5413
  • Dec 03 16:21
    Aaronontheweb opened #5413
  • Dec 03 16:16
    dependabot[bot] edited #5370
  • Dec 03 16:15
    dependabot[bot] synchronize #5368
  • Dec 03 16:15

    dependabot[bot] on nuget

    Bump Microsoft.Data.SQLite from… (compare)

Chandra Sekhar Manginipalli
@leo12chandu
Thanks Alex
I found out from prior trials that Hyperion has issues when a full framework actor has to communicate with a .net core framework actor. This means with the new version of akka.net we cannot have full framework apps sending messages to core akka app it sounds like. I will try to put together a test app with akka.net 1.8 and see how it behaves.
Specially when we have Dictionaries and IEnumerables.
Alex Hofer
@alexhofer
Yes we encountered that issue too. Its either .Net Core everything or nothing. Unless you roll your own serializer
Chandra Sekhar Manginipalli
@leo12chandu
Aha. Thats a bummer that hyperion being a faster serializer than protobuf with an Achilles heal. Wouldnt it be nice if there was a way to translate the types using manifest. Did you end up using protobuf as your custom or microsoft bond or something else?
Alex Hofer
@alexhofer
Nope we just went all .Net Core. Luckily everything we needed worked in it. However we did run into a serialization issue with naming in our POCOs which caused the serializer to not deserialize properly and silently get rid of the message which was hard to track down.
Chandra Sekhar Manginipalli
@leo12chandu
ugh. ok.
Aaron Stannard
@Aaronontheweb
@leo12chandu @alexhofer technically, we do have a way of achieving x-framework with .NET core and .NET full
Chandra Sekhar Manginipalli
@leo12chandu
we do?
the knowntypes thingy?
Aaron Stannard
@Aaronontheweb
akkadotnet/akka.net#2947
bit of a hack around Hyperion itself
which is why the serialization doesn't "just work" out of the box
but it deals with the fact that .NET Core moved all of the default namespaces for primitives
Chandra Sekhar Manginipalli
@leo12chandu
@Aaronontheweb - data.Replace("System.Private.CoreLib", "%CORE%"); works because we are using json serialized string. With hyperion, we dont have a string as a type for serialized data. So, how do we even replace the mscorlib and CoreLib in the hyperion serialized data?
Chandra Sekhar Manginipalli
@leo12chandu
Or are you saying, use some other serializer like json first to serialize the whole shabang and then replace the library versions. And then serialize that whole Json'd string into using hyperion?
Vasily Kirichenko
@vasily-kirichenko
I have a Source.Queue. At some point I know that I've enqueued all messages into it and I need to wait until all of them reached the sink (Sink.Ignore). If I just wait the Task that ViaMaterialized(Sink.Ignore) returns, I wait forever because the stream is not terminated. Any ideas how to do this?
I could enqueue a special message (KillYourself) and raise exception in a Via(x => ...) added at the end of the stream, but it does not feel right.
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko ISourceQueueWithComplete has Complete method
Vasily Kirichenko
@vasily-kirichenko
yes, just tried it :) It completes the stream immediately
the messages in the queue are lost
Bartosz Sypytkowski
@Horusiath
@vasily-kirichenko yes, this is actually as desgined (as stream doesn't know which message is the last one) - you can send special message like FinishStream and then use flow.TakeWhile(msg => !(msg is FinishStream))
Vasily Kirichenko
@vasily-kirichenko
@Horusiath it does not work very well with SelectAsyncUnordered though ;)
Bartosz Sypytkowski
@Horusiath
if you cannot pass control message as part of the stream, you can always add KillSwitch and execute it manually
Vasily Kirichenko
@vasily-kirichenko
but it will kill the stream immediately?
Bartosz Sypytkowski
@Horusiath
yes, but when you tell it to
you know, there's no magic there - you cannot tell stream to stop itself once there are no more messages, because it doesn't understand how to interpret "no more". In event streams you don't have all of them given up front
you can apply some timeout and tell something like "complete this stream, if no message arrived for the last X seconds" (bascially combination of KeepAlive + TakeWhile could do that)
Vasily Kirichenko
@vasily-kirichenko
no, timeout is not an option. OK, a special message works (FSharpResult.Error(obj()) :))
one more question: does ISourceQueueWithComplete.WatchCompletionAsync().Wait() is the same as adding ToMaterialized(Sink.Ignore<...>(), Keep.Both) and Wait() on the Task that Sink.Ignore returns?
I mean, does the former completes when all the messages reached the end of stream, or when the source queue completes?
ah, got it
as I added TakeWhile(x => x.IsOk) at the end of stream, it's safe to WatchCompletionAsync.
Sam13
@Sam13
Is there any documentation about how to improve performance of SQLite persistence for journalling and snapshots? When I trace my application with JetBrains dotTrace I can see that a lot of time is burned in Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
Vasily Kirichenko
@vasily-kirichenko
is an idea of storing application settings via akka persistence crazy?
Vasily Kirichenko
@vasily-kirichenko

more concretely:

  1. On start we spawn a singleton persistent actor (Config).
  2. It's state contains a list of ids of persistent actors, each of which stores configuration of a single kind of "worker" (WorkerConfig).
  3. The Config actor spawns an actor for each such configuration, providing ids.
  4. Each WorkerConfig actor loads the config (via persistence) and spawns any required worker actors (via ClusterPoolRouter I think).
  5. Configuration is changed via sending messaged to Config actor.
  6. If configuration changed, Config actor stops/spawn WorkerConfig actors, pass them config changes, they stop/spawn Worker actors.

Does it look too complicated or just not a right job for Persistence (I've never used it before)? One downside of this that I can see is versioning.

Garrard Kitchen
@garrardkitchen
Is this normal behaviour? I have 1 seed and 2 worker nodes. If I restart either of the worker nodes, they register as cluster members with other nodes. However, if I restart the seed node, it does not register as member in other nodes. Surely, split-brain can't happen if there's a concensus?
fliuAtAim
@fliuAtAim
Do you guys mind not retiring your betas? Some people are still using them.
Chandra Sekhar Manginipalli
@leo12chandu
is there a way to replace substring of a hyperion serialized stream of bytes?
Chandra Sekhar Manginipalli
@leo12chandu
I am trying to replace the references to mscorlib and System.Private.CoreLib so it could work against 4.5.1 and Core but by the time it seriaizes it already is in its own encoding version of bytes hence trying to override it in Akka.Serialization.Serializer.ToBinary of my implementation
Ismael Hamed
@ismaelhamed
@Horusiath off the top of your head, pros and cons of using read-only structs instead of classes for actor messages?
Bartosz Sypytkowski
@Horusiath
@ismaelhamed you don't need to think about nulls or accidental mutability ;) But internally akka operates on untyped mailboxes, so every struct will be boxed anyway and allocated (as it may need to travel between threads) and I'm not expecting any significant improvement in akka itself - you could get some in your own code depending on the use case.
Shukhrat Nekbaev
@snekbaev
if I have actor A and it inside does ActorSelection for actor B to send messages, how do I setup the hierarchy for B for testing?
I understand the don't use ActorSelection and pass IActorRef via constructor, but those two hierarchies are quite different and I will have to carry required IActorRefs everywhere and finally pass to the ctor of A, that's a bit of a...
Ismael Hamed
@ismaelhamed
@Horusiath also lack of inheritance? Though I guess you could argue that you don't need/want it in your messages anyway. Thanks, man.
Shukhrat Nekbaev
@snekbaev
@ismaelhamed I used inheritance in some messages, for example for RequestGet which implementation was identical for several target actors. Thus I created an abstract RequestGetBase class. Messages are routed through a parent gateway actor, but children deal with RequestGetBase. Children also have a base class which actually handle that kind of message
Shukhrat Nekbaev
@snekbaev
it seems ActorOfAsTestActorRef is for setting up the hierarchy, however, with ActorSelection, I think I'm running into race condition :)
Shukhrat Nekbaev
@snekbaev
@Horusiath I'm working on my first akka.net test, say, I have a hierarchy and there's an actor on a third depth level that is required (let's call it Target). In the test I'm creating the root actor for that hierarchy using Sys.ActorOf. After that I'm creating an actor ("Source") who is going to send and receive the message from the "Target". Internally "Source" does ActorSelection into "Target". It seems that when I run the test, the "Source" performs the ActorSelection into the actor which doesn't exist yet, thus, message is lost. The way I fixed the test for now is by adding the Task.Delay(1000); before creating the "Source" actor. If there a way to await until "Target" with its entire parent hierarchy is created first?
Shukhrat Nekbaev
@snekbaev
hm, in the aforementioned scenario I changed the variable that holds "Target" IActorRef to be a public static one. Then in the "Source" instead of ActorSelection I used that variable directly via its container type. Was expecting it to contain a value, but it turns out to be null. When I have 1 second delay between actor "Target"'s parent hierarchy and "Source" actor creation, then there's a value, in other words, issue is not about using ActorSelection, but rather race condition for creation of actors. "Source" is being created and sends messages before "Target"'s parent hierarchy is initialized, though in the code I have Sys.ActorOf for "Target" before the "Source"
Bartosz Sypytkowski
@Horusiath
@snekbaev I don't really know what you want to hear here. There are several ways of establishing contact between two actors. From stuff like preinitialization of actors, via publish/subscribe buses to custom actor system extensions.