Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 06:43
    dependabot-preview[bot] labeled #4230
  • 06:43

    dependabot-preview[bot] on nuget

    Bump FsPickler from 5.3.1 to 5.… (compare)

  • 06:43
    dependabot-preview[bot] opened #4230
  • 05:38
    Aaronontheweb commented #4229
  • 05:38
    Aaronontheweb commented #4229
  • 03:29
    atrauzzi opened #4229
  • Feb 17 21:57
    Arkatufus edited #4228
  • Feb 17 21:46
    Arkatufus synchronize #4228
  • Feb 17 20:17
    Arkatufus synchronize #4228
  • Feb 17 19:55
    Arkatufus opened #4228
  • Feb 17 19:14
    Arkatufus synchronize #4226
  • Feb 17 18:28
    Aaronontheweb commented #4226
  • Feb 17 18:27
    Aaronontheweb commented #4226
  • Feb 17 18:23
    Aaronontheweb synchronize #4226
  • Feb 17 18:23

    Aaronontheweb on nuget

    (compare)

  • Feb 17 18:23

    Aaronontheweb on dev

    Bump Google.Protobuf from 3.11.… (compare)

  • Feb 17 18:23
    Aaronontheweb closed #4225
  • Feb 17 18:23

    Aaronontheweb on dev

    ActorSpawn benchmark tweaks (#4… (compare)

  • Feb 17 18:23
    Aaronontheweb closed #4227
  • Feb 17 18:17
    Aaronontheweb labeled #4227
Vagif Abilov
@object
Thank you @tstojecki, you can grab sample code here: https://dl.dropboxusercontent.com/u/8734289/ReactiveTweets-NDC.zip
tstojecki
@tstojecki
thanks!
Kosta Petan
@kostapetan
Hey guys, anyone can help me with setting up akka remoting under docker?
basically I have a docker-compose file defining an API service , seed node (worker) and regular node (worker), but so far no success in connecting the nodes between each other
jalchr
@jalchr
@object Yes I tried persistent actors few days ago and experienced the same issues you got.
Kosta Petan
@kostapetan
my remote config looks like this
        remote {
            log-remote-lifecycle-events = INFO
            log-received-messages = on

            dot-netty.tcp {
              transport-class = "Akka.Remote.Transport.DotNetty.TcpTransport, Akka.Remote"
                  applied-adapters = []
                  transport-protocol = tcp
              #will be populated with a dynamic host-name at runtime if left uncommented
              #public-hostname = "127.0.0.1"
              hostname = 0.0.0.0
              port = 4053
              maximum-frame-size = 256000b
            }
        }
then, via environment variables, I'm overwriting the ports
Vagif Abilov
@object
@jalchr we've been using persistent actors for quite some time with some of these issues coming and going, but recently we revised our code to create more persistent actors simultaneously, and it looks like such errors occur much more frequently now.
Maxim Cherednik
@maxcherednik
@kostapetan but what exactly doesn't work?
jalchr
@jalchr

@object

I'm trying to use Akka.Persistence with in-memory snapshot for the AtLeastOnceDeliveryReceiveActor. If everything is left with defaults, it works. The actor "stops" receiving any message, if I use the following serialization in my HOCON:

              serializers {
                wire = "Akka.Serialization.WireSerializer, Akka.Serialization.Wire"
              }
              serialization-bindings {
                "System.Object" = wire
              }

I also tried Hyperion, same issue. If I remove this configuration, it works .
Is this a bug or misconfiguration ?
Okay, I just noticed this #2743

Kosta Petan
@kostapetan
@maxcherednik I have basically two services, an API and a worker which acts as the seed node as well
Maxim Cherednik
@maxcherednik
I did it once some time ago, and was following this article: https://mukis.de/pages/akka-cluster-with-docker-containers/
there was something tricky with the ips
Kosta Petan
@kostapetan
exactly, the seed node IP seems unreachable, even though if I exec inside the container, from there I can successfully "netcat" it
Maxim Cherednik
@maxcherednik
unfortunately that setup is gone. But anyhow the article helped.
Kosta Petan
@kostapetan
yeah, probably I need to play with the network configuration a bit, I've gone through the reference configuration for remoting, couldn't figure out what I'm doing wrong
Vagif Abilov
@object
@jalchr we are using similar serialization settings but our snapshots are in the database. It mostly works but often raises exceptions like I posted above.
Arsene
@Tochemey
Hello geeks, can someone pls show a tutorial on how I can use actors to implement the Sagas pattern because I see it very relevant for the actor model.
Carlos Torrecillas
@CarlosTorrecillas

Hi guys, quick question I'm not sure about. I have a distributed akka cluster up and running and I can see the lighthouse registering all the nodes. I have successfully published messages to all subscribers for a topic however I'm not able to do an Ask with a publish message. Is it possible to achieve that? I can see the mediator has the Ask method available. The code I use to perform the ask is the following:

`var mediator = DistributedPubSub.Get(Context.System).Mediator;

        var publishMessage = new Publish("my-topic, new Message());

        Logger.Debug($"{Context.Self.Path.Name} publishing request");

        var response = await mediator.Ask<MyResponseMessage>(publishMessage);

        Context.Sender.Tell(response, Self);`
Bartosz Sypytkowski
@Horusiath
@object what is your data volume? It may be that sqlserver persistence is serving db requests too slow? In that case batching journal should help (see the code here: akkadotnet/Akka.Persistence.SqlServer#56 )
(unfortunatelly I'm going on vacation and it may be that we hit v1.3 before I finish akka.persistence rework)
Vagif Abilov
@object
Could be, but it sounds strange if it doesn't manage to restore the state within 30 seconds. In the db I am testing it it's 1M+ event journal records and very few snapshots.
Bartosz Sypytkowski
@Horusiath
I guess, that in your case events and snapshots both share the same ADO.NET pool of connections
Vagif Abilov
@object
But we found that we were running latest released NuGet packages (from October 2016!), we changed now to use build from latest sour.ce
Thanks for the reference to batching.
Bartosz Sypytkowski
@Horusiath
if you're building from source, you may as well try to build batching journal ;) It has some extra configuration options, but in terms of persistence format it's drop-in replacement of existing journal (also if you need base class for batching journal, it's here: https://github.com/akkadotnet/akka.net/blob/cd33195b5aad34895f0fb69893bd2074d539201f/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/BatchingSqlJournal.cs )
sorry for that delay, we should push v1.3 already.
Vagif Abilov
@object
But will batching journal be a part of 1.3?
Bartosz Sypytkowski
@Horusiath
it already is, but we need sqlserver impl of it as well + it's opt in, not the default
Vagif Abilov
@object
I was offline for some hours. @Horusiath since you mentioned ADO.NET pool of connections, is it so that our problems may have been caused by exausted connection pool? Especially now that we have refactored large parts of our system (getting rid of consistent hashing btw :-)) and now there are more parallel activities using persistent actors?
So this is something that batching journal can help with, but there's no SQL Server plugin for it right?
Kosta Petan
@kostapetan
btw guys, managed to get the docker-compose setup to work, which looks something like this [API] -> [SEED WORKER] -> [NODE WORKER], I'll try to document it, someone might find it useful
Maxim Cherednik
@maxcherednik
That would be cool.
Boban
@bobanco
Hi folks
anyone using akka.net mysql persistence plugin?
NyronW
@NyronW
Hi Everyone,
NyronW
@NyronW
I am just getting started with Akka.Net, I want to use it to create micro services, which I'm also just getting started with as well. I've read that one of the best practices with micro services is have them be as isolated as possible. So don't shared anything between the services, such as code or data storage. Akka.net uses classes/messages to communicate, so those class would need to be shared among all the services, which would introduce some form of coupling. I don't see how I can have a fully decoupled set of services using akka.net, unless i'm gonna pass a primitive datatype, such as a string (as json) and then deserialize it to objects in each service. but then I lose all the validation that a class would offer. What are my options to using akka.net to create a loosely coupled micro service architecture system?
Youenn Bouglouan
@Youenn-Bouglouan
Hi @NyronW , so if I understand correctly, you want to have several microservices being internally implemented as separate actor systems?
For instance, microservice A having its own ActorSystemA, microservice B having ActorSystemB, and so on?
If this is the case, you are free to use different message types for each internal actor system. The only things that would need to be shared are the messages that transfer data between the microservices themselves.
Carlos Torrecillas
@CarlosTorrecillas
hi guys, is there any "obvious" reason why an actor could terminate a method (or finishes a message processing) when invoking an await Method(); ? I trying to figure that out but so far I had no luck. I call an I/O operation inside a Receive<RequestMessage> and I can't see any log line or anything going on, really weird. It just start processing the next message in the mailbox
I have used both Receive Async and PipeTo and both print when the message starts to be processed but nothing else
`private void Subscribed()
{
Logger.Debug($"{Self.Path.Name} node is ready");
        Receive<RequestMessage>(e => ProcessRequest(e));

        Receive<ResponseMessage>(p => SendResponseBack(p));
    }

    private void ProcessRequest(RequestMessage requestMessage)
    {
        Logger.Debug($"{Self.Path.Name} started request processing");

        _aDependency.ProcessAsync(requestMessage.Data)
                              .ContinueWith(e => new ResponseMessage(e.Result), TaskContinuationOptions.AttachedToParent & TaskContinuationOptions.ExecuteSynchronously)
                              .PipeTo(Self, Context.Sender);
    }

    private void SendResponseBack(ResponseMessage response)
    {
        Context.Sender.Tell(response, Self);

        Logger.Debug($"{Self.Path.Name} finished request processing");
    }`
Carlos Torrecillas
@CarlosTorrecillas
that's the code and I'm not entirely sure what am I doing wrong. The Subscribed method gets invoked when the node joins the cluster and I can see that happening. Then the started processing log line is also printed. But immediately after the next message starts. The operation should take 2 seconds so I should expect to see the "finished" at some point but I see nothing. Also there is nothing related to the logging printed by the dependency inside the method which makes me think that the ProcessAsync simply doesn't start
Carlos Torrecillas
@CarlosTorrecillas
found that out. THe actual message content (Data) was null. It's all good now
you can ignore all of the above
Janusz Fijałkowski
@JohnnyTheAwesome
Figured out the problem I've had earlier. It seems Hyperion can't deserialize the Exception type. It actually made me realize I don't need to send the entire object just the error message and stack trace. Yay for lighter payloads.
Alex Valuyskiy
@alexvaluyskiy
@JohnnyTheAwesome Hyperion has limited support for serializing/deserializing exceptions. But the exceptions should have a default public parameterless constructor
And it does not support custom fields/properties inside exceptions
Janusz Fijałkowski
@JohnnyTheAwesome
@alexvaluyskiy Exception does indeed have a public parameterless constructor. However it's TargetSite field is of MethodBase type, which in turn has a protected constructor. Guess this might be it, however I didn't dig further once I've realized that jamming the entire Exception object in a message sent over the network isn't really something that I want to do.