Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 17:27
    Aaronontheweb commented #90
  • 17:26
    Aaronontheweb commented #90
  • 17:25
    Aaronontheweb assigned #90
  • 17:16

    Aaronontheweb on dev

    Provide static GetRoutees.Insta… (compare)

  • 17:16
    Aaronontheweb closed #3974
  • 17:16
    Aaronontheweb milestoned #3974
  • 16:05
    jackowild opened #90
  • 15:08
    Aaronontheweb commented #3974
  • 15:08
    Aaronontheweb commented #3974
  • Oct 13 14:40
    cptjazz synchronize #3974
  • Oct 13 14:07
    cptjazz opened #3974
  • Oct 13 08:30
    ismaelhamed commented #3937
  • Oct 12 15:50
    IrvinDominin opened #127
  • Oct 11 18:21
    Aaronontheweb commented #3973
  • Oct 11 18:20
    Aaronontheweb commented #3937
  • Oct 11 18:16
    Zetanova commented #3937
  • Oct 11 18:11
    Zetanova commented #3937
  • Oct 11 15:09
    Aaronontheweb commented #3937
  • Oct 11 15:08
    Aaronontheweb commented #3937
  • Oct 11 14:36
    Aaronontheweb commented #3973
Bartosz Sypytkowski
@Horusiath
"subject was null" suggests that both ends (both actor systems) have connected successfully, but the one that received the identification request, couldn't find an actor under provided path
Francis Paulin
@paulinfrancis
yes, it's a topshelf service that I have started (as a console app, without installing the service, for simplicity), and I make sure I see the output indicates that the actor has successfully started before I launch the web app
Bartosz Sypytkowski
@Horusiath
@Aaronontheweb any ideas?
Francis Paulin
@paulinfrancis
It's probably worth mentioning that I'm using ASP .NET Core, but targeting 4.6.1. The project does have a web.config, and I was under the impression that it should be possible to use it for hocon, in parallel with the presence of project.json.
Bartosz Sypytkowski
@Horusiath
I know that akka.remote is not yet compatible with .net core
Francis Paulin
@paulinfrancis
Should it not be OK though, when using the full framework?
Bartosz Sypytkowski
@Horusiath
I don't know
Arsene T. Gandote
@Tochemey
Hello Guys can someone show how to define PreStart and PostStop in F# API
Damian Reeves
@DamianReeves
@paulinfrancis try loading your Hocon by another means... I believe in ASP.NET core web.config is only involved in IIS invocation not in application lifecycle
Vagif Abilov
@object
@Tochemey F# API doesn't have one-to-one match with C# API, actors in F# are functions, not types, so there are no such overrdes like PreStart and PostStop. If you need to execute some code before actor starts processing messages, just place it in the beginning of the function, prior to the recursive message handler function. And for PostStop you can use mailbox.Defer() and pass it a list of deferrables (disposables) that need to be executed when actor stops.
Francis Paulin
@paulinfrancis
@DamianReeves Great success!
var config = ConfigurationFactory.ParseString(@"
    akka {
        loglevel = DEBUG

        actor {
            provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
            debug {
                receive = on
                autoreceive = on
                lifecycle = on
                event-stream = on
                unhandled = on
            }
        }

        remote {
            helios.tcp {
                transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
                transport-protocol = tcp
                port = 0
                hostname = ""127.0.0.1""
            }
        }
    }");

_actorSystem = ActorSystem.Create("SimulatorSystem", config);
I'll move the config to appsettings.json now, but good to see remoting works with ASP .NET Core targeting full framework :)
Damian Reeves
@DamianReeves
:thumbsup:
There's a part of me that really wants to build a Microsoft.Extensions.Configuration extension for HOCON. What is the status of HOCON outside of the Akka.NET repo, is https://github.com/akkadotnet/HOCON/commits/master still a thing being worked on?
Andrew Buttigieg
@andrewbuttigieg
in http://getakka.net/docs/clustering/cluster-client, how do I get a reference to ClusterReceptionist please?
ignore, you need to add Akka.Cluster.Tools via nuget.
verilocation
@verilocation
Quick question... I have a cluster which deploys geocode actors that will perform geocodes against Google. This is all great BUT google only lets us do 50requests a second. Is there any way I can communicate efficiently between the actors to figure out how many requests have been made per second and to throttle accordingly?
verilocation
@verilocation
Also.. is there an Akka.net equivalent of this? It'd be really nice to be able to see throughput and such
verilocation
@verilocation
Also.. in the examples when addressing a clustered router we ask for the routees and check there are any before continuing... this seems like it could be a performance issue.. is this the recommended pre-check?
var routees = await this.GeocodeActor.Ask<Routees>(new GetRoutees());
if (routees.Members.Any()) { /* Do things */ }
Arjen Smits
@Danthar
@verilocation i think the webcrawler sample has something like that for communicating with the github api. (request throttling)
you might want to look there
verilocation
@verilocation
@Danthar Hey, thanks, I cant seem to find any mention of throttling or github within that project, any pointers as to where or what to look for?
Daniel D'Agostino
@dandago2_twitter
Creating a child actor via ActorOf() and Props is a bit of a pain since it takes params object[], which means technically you can pass anything, and you need to make sure you're passing in the right dependencies, or you'll have runtime issues. Is there a clean way to instantiate actors that guarantees compile-time safety?
Damian Reeves
@DamianReeves
I have a worker executable that I want to do work and shutdown: Is it a bad ID for that worker to join my cluster?
Garrard Kitchen
@garrardkitchen
Hi @corneliutusnea, were you ever able to form cluster with web app in Azure App Services? I've put the seed in a webjob to run continuously and deploy both webjob and web app in same place (deployed via vsts) and both are running but unfortunately they are not seeing each other. akka messages show no errors (thanks to @andreyleskov). I can see both are running on diff w3wp.exe's. I'm using localhost as hostname on both [webjob + web app] and diff ports.
Damian Reeves
@DamianReeves
How do I gracefully leave a cluster when my actor system is terminating?
Francis Paulin
@paulinfrancis

I need to send a largish object with remoting, and an Akka.Remote.OversizedPayloadException is thrown:

Akka.Remote.OversizedPayloadException: Discarding oversized payload sent to [akka.tcp://SimulatorSystem@127.0.0.1:20228/]: max allowed size 128000 bytes, actual size of encoded PPSim.ActorModel.Messages.DiagramLoadedMessage was 723509 bytes.

I've tried setting maximum-frame-size = 4000000b (arbitrary number substantially larger than my message) in both ends:

remote {
    helios.tcp {
        transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
        transport-protocol = tcp
        port = 0
        hostname = ""127.0.0.1""
        maximum-frame-size = 4000000b
    }
}
Are there other settings I need to set to enable larger messages?
Bartosz Sypytkowski
@Horusiath
@paulinfrancis sending 700MB message is definitely not a good idea
Francis Paulin
@paulinfrancis
Shouldn't that be 0.723MB?
Arjen Smits
@Danthar
@verilocation ah sorry, i was wrong its not in that project. I distinctly remember it being in some sample project. Let me check
Arjen Smits
@Danthar
@verilocation Cant seem to find what i was looking for. I thought the sample stuff in the bootcamp for communicating with github had some throttling. And it has, but its to basic.
However there are various way you can throttle with Akka. One pattern is described here: http://letitcrash.com/post/28901663062/throttling-messages-in-akka-2 its from the JVM version. but the same principle applies. And should be fairly easy to port to .net.
Alternative is to use the Akka.Streams API
that has throttling mechanisms as well
On a side note. The TimerBasedThrottler could be something that we could offer OOB under the patterns namespace
Akka streams has an throttle operator which you can use
So what you could do is have one actor act as the source of your stream definition, and the google geocode API as your sink
with message mapping and throttling in between
Check the docs: http://getakka.net/docs/streams/quickstart for a good starting point
Arjen Smits
@Danthar
If you have specific questions regarding Akka.Streams we have an AkkaStreams gitter chat full with capable ppl :)
Marc Piechura
@marcpiechura
@dandago2_twitter you can also use the factory func and call the constructor of the child actor directly
Damian Reeves
@DamianReeves
When a node leaves my cluster, the cluster continuously throws exceptions which are being logged... how can I stop that (I know I just not log remote lifecycle events, but that endless cycle of trying to connect to a node seems wasteful)
Bartosz Sypytkowski
@Horusiath
@paulinfrancis sorry, my mistake. maximum-frame-size should be enough
@DamianReeves maybe you can set auto downing of unreachable actors?
Francis Paulin
@paulinfrancis
Interesting! I noticed that my collections were null after changing to remoting. I tested a couple of different options, and discovered this:
public class TestMessage
{
    public TestMessage(string message, IEnumerable<string> collection)
    {
        Message = message;
        Collection = collection;
    }

    public string Message { get; } //OK
    public IEnumerable<string> Collection { get; } //null after remoting
}

public class TestMessage
{
    public TestMessage(string message, IEnumerable<string> collection)
    {
        Message = message;
        Collection = collection;
    }

    public string Message { get; private set; } //OK
    public IEnumerable<string> Collection { get; private set;  } //OK
}
Bartosz Sypytkowski
@Horusiath
@paulinfrancis check if you have referenced newtonsoft.json v8 or higher
Francis Paulin
@paulinfrancis
@Horusiath I was wrong too - something else was amiss with my configuration, and when I sorted it out then maximum-frame-size did the trick :)