by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 17:18
    Arkatufus synchronize #4425
  • Aug 08 10:17
    Zetanova edited #4533
  • Aug 07 23:32

    dependabot-preview[bot] on nuget

    (compare)

  • Aug 07 23:32

    dependabot-preview[bot] on dev

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • Aug 07 23:32
    dependabot-preview[bot] closed #4538
  • Aug 07 22:00
    Arkatufus synchronize #4531
  • Aug 07 19:27
    dependabot-preview[bot] commented #4538
  • Aug 07 17:52
    dependabot-preview[bot] edited #4538
  • Aug 07 17:52
    Aaronontheweb commented #4538
  • Aug 07 17:52
    dependabot-preview[bot] synchronize #4538
  • Aug 07 17:52
    dependabot-preview[bot] synchronize #4337
  • Aug 07 17:52

    dependabot-preview[bot] on nuget

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • Aug 07 17:52

    dependabot-preview[bot] on nuget

    Bump FSharp.Quotations.Evaluato… (compare)

  • Aug 07 17:52
    dependabot-preview[bot] edited #4538
  • Aug 07 17:52
    dependabot-preview[bot] edited #4337
  • Aug 07 17:50
    dependabot-preview[bot] edited #4538
  • Aug 07 17:50
    dependabot-preview[bot] edited #4337
  • Aug 07 17:50

    Aaronontheweb on dev

    Enhance OpenCircuitException er… (compare)

  • Aug 07 17:50
    Aaronontheweb closed #4534
  • Aug 07 17:50
    Aaronontheweb closed #4314
Arjen Smits
@Danthar
And for more context and samples: https://getakka.net/articles/streams/integration.html
Sam13
@Sam13
@Danthar Ok thanks, just want to make sure I understood everything correctly. I'll have a look at that!
Vasily Kirichenko
@vasily-kirichenko
@Sam13 why do you not use struct tuples?
Bruno Alencar
@bruno-alencar

Can anyone help me?

I'm looking for a way to combine Rest API with Akka.net in a Cluster System. I would not connect the rest api receiver inside the cluster,
but sending messages for the cluster group.
I saw something about recepcionist, but when I tried to use inside the lighthouse system, It occurred exception because it was required that
know all messages types.

Is there any way to use these things together with best performance?

Sam13
@Sam13
@vasily-kirichenko I'm still on .NET 4.6.1, ValueTuple was introduced in 4.7
AndreSteenbergen
@AndreSteenbergen
Guys, what do you think? I created an Unbounded ---Stable--- PriorityQueue. Is this Gist worthy of creating a Pull Request to fix: akkadotnet/akka.net#2652
nathvi
@nathvi
@AndreSteenbergen , I would change Seqnum to SequenceNumber
If you're going to name that Func priorityCalculator instead of priorityCalc, might as well be equally verbose.
nathvi
@nathvi
Also I'd change the line:
var ci = _data.Count - 1; // child index; start at end
To something like:
var endChildIndex = _data.Count - 1;
@AndreSteenbergen
AndreSteenbergen
@AndreSteenbergen
I am actually not so much inclined to change that code, as it is a straight copy from the ListPriorityQueue from akka.net sources on github
seqnum and priorityCalc yes, I think you are correct.
nathvi
@nathvi
If you have to add a comment to explain what the intention of the statement is, then the variable names are poor.
Not always, but in this case, I think having a more explicit name for the var would be much better than littering the code with comments.
AndreSteenbergen
@AndreSteenbergen
I understand what you are saying. my goal here was to keep as close to original source as I could, but changing the functionality in such a way we can end up with a priority queue with correct order.
nathvi
@nathvi

if (rci <= li && comparator.Compare(_data[pi],_data[rci]) > 0) return false; // check the right child too.

The entire check inside of the if should be a single bool variable. The comment just confuses things.
Code never lies. Comments sometimes do.

If you can make code more readable, do it. We spend at least 90% of our time reading code. Not writing it.
AndreSteenbergen
@AndreSteenbergen
This is my original source:
I understand what you are saying, but I am still not inclined to change copied stuff, when there is proven code, as in don't fix if it ain't broken.
nathvi
@nathvi
It's not "broken" as in the functionality works, but it's "broken" in that it's not as clean as it could be.
I think it's worth cleaning up the code if it makes understanding it easier.
AndreSteenbergen
@AndreSteenbergen
ok
nathvi
@nathvi
If I had a 2000 line function that was nested 8 levels deep and passed all my unit tests, it's probably still worthless as far as being composable or understandable by other people. This is an extreme case, but I think you get me.
AndreSteenbergen
@AndreSteenbergen
From the comment you made I understood you ;)
nathvi
@nathvi
:)
nathvi
@nathvi
omfg
} // ListPriorityQueue
Comments like this really irk me.
AndreSteenbergen
@AndreSteenbergen
little too much copy paste I guess. ;)
nathvi
@nathvi
GAH!
AndreSteenbergen
@AndreSteenbergen
I see it is 4 year old code I copied over ;) @rogeralsing made the commits for the PriorityQueue
nathvi
@nathvi
DAMN YOU! lol
AndreSteenbergen
@AndreSteenbergen
I removed the closing tag comments ;) and seqnum is now SequenceNumber ;)
nathvi
@nathvi
:)
Alex Hofer
@alexhofer

Hey all, I am running into some weird issues with Docker and clustering. My cluster works perfectly fine outside of Docker, but while running in docker I get association errors after about 15 seconds of it being up. Before this Lighthouse shows both nodes as being welcomed to the cluster and moving to up. After that nothing happens out of the ordinary on the nodes, they just start throwing association errors:

**From Lighthouse**
[INFO][07/05/2018 16:29:59][Thread 0019][[akka://hub-system/system/cluster/core/daemon#107465231]] Leader can currently not perform its duties, reachability status: [Reachability([akka.tcp://hub-system@localhost:26100 -> UniqueAddress: (akka.tcp://hub-system@localhost:26800, 1690450065): Unreachable [Unreachable] (1)][akka.tcp://hub-system@localhost:26800 -> UniqueAddress: (akka.tcp://hub-system@localhost:26100, 1417053438): Unreachable [Unreachable] (1)])], member status: [$akka.tcp://hub-system@lighthouse:4053 $Up seen=$True, $akka.tcp://hub-system@localhost:26100 $Up seen=$False, $akka.tcp://hub-system@localhost:26800 $Up seen=$False]

**From a Node**
[Akka.Remote.EndpointWriter] [WARN] : AssociationError [akka.tcp://hub-system@localhost:26100] -> akka.tcp://hub-system@localhost:26800: Error [Association failed with akka.tcp://hub-system@localhost:26800] []
[remoting] [WARN] : Tried to associate with unreachable remote address [akka.tcp://hub-system@localhost:26800]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: [Association failed with akka.tcp://hub-system@localhost:26800] Caused by: [System.AggregateException: One or more errors occurred. (Connection refused tcp://hub-system@localhost:26800) ---> Akka.Remote.Transport.InvalidAssociationException: Connection refused tcp://hub-system@localhost:26800

Has anyone else run into this?

matneyx
@matneyx

What's the proper way to grab an IActorRef for other Actors within the same system?

I'm initializing my ConsoleWriterActor immediately after starting up the Actor system, inside the Main method of my command line program

static void Main(string[] args) {
            _actorSystem = ActorSystem.Create("FileWatcherActorSystem");
            _consoleWriter = _actorSystem.ActorOf<ConsoleWriterActor>("consoleWriter");

And then I'm trying to grab that same actor two children deep, in the first Actor that needs to actually write anything.

_consoleWriter = Context.System.ActorSelection("consoleWriter").Anchor;

But when I try to Tell the consoleWriter anything, I get info about a dead letter...

I've also tried this using the absolute and relative paths to the consoleWriter.

Alex Hofer
@alexhofer
Is that an actor you will be sending messages to from all over?
Bartosz Sypytkowski
@Horusiath
@matneyx by default every actor is placed under user guardian actor. In your case, the path to it is actually /user/consoleWriter. However the fact that you need to do something like that points, that you've got some design problem in the first place.
@alexhofer are you sure that nodes can target each other?
matneyx
@matneyx
@Horusiath -- That very well could be the case. Any resources you'd recommend to help me fix that?
Alex Hofer
@alexhofer
@Horusiath thats what I'm thinking the problem actually is, they can both communicate with Lighthouse but cant talk to each other. Though I can't figure out why. Based on the console logs in Docker they are attempting to communicate with their assigned ports. Both running on localhost:26100 and localhost:26800. Which match my configurations. Maybe I am just misunderstanding how Docker works.
Eduardo
@EduardoSantosGit

Hello!

@bruno-alencar asked the following question above.

Can anyone help me?

I'm looking for a way to combine Rest API with Akka.net in a Cluster System. I would not connect the rest api receiver inside the cluster,
but sending messages for the cluster group.
I saw something about recepcionist, but when I tried to use inside the lighthouse system, It occurred exception because it was required that
know all messages types.

Is there any way to use these things together with best performance?

Would you have any suggestions to help us?

Bartosz Sypytkowski
@Horusiath
@matneyx pattern depends on what you actually want to use it for - but IActorRef can be easily passed either in message or constructor to other actors.
matneyx
@matneyx
Thanks
Alex Hofer
@alexhofer
@matneyx you can also have a static class that you assign IActorRefs to when you create them on system startup. For things like that console writer which I assume you will use all the time across multiple actors.
Bartosz Sypytkowski
@Horusiath
@EduardoSantosGit you can limit most of the clustering features of akka to some subset of nodes by configuring them with roles
this includes distributed pub sub and cluster client
but tbh I don't know what problem do you really have - cluster members must share the common knowledge about used message types.