by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:53
    CumpsD commented #4433
  • Jul 05 18:52
    KarolKalbarczyk commented #3234
  • Jul 03 20:21
    Arkatufus edited #4500
  • Jul 03 20:20
    Arkatufus opened #4500
  • Jul 03 18:12
    ismaelhamed opened #4499
  • Jul 03 17:40
    ismaelhamed opened #4498
  • Jul 02 19:33
    Danthar commented #4487
  • Jul 02 19:27
    Danthar closed #4494
  • Jul 02 19:27
    Danthar commented #4494
  • Jul 02 16:12
    Arkatufus commented #4265
  • Jul 02 15:18
    ismaelhamed edited #4497
  • Jul 02 15:16
    ismaelhamed edited #4497
  • Jul 02 15:15
    ismaelhamed opened #4497
  • Jul 02 15:07
    ismaelhamed commented #4482
  • Jul 02 08:02
    glikoz commented #4495
  • Jul 02 08:02
    glikoz commented #4495
  • Jul 01 13:26
    Aaronontheweb closed #4495
  • Jul 01 13:26
    Aaronontheweb commented #4495
  • Jul 01 13:20
    Aaronontheweb commented #4496
  • Jul 01 13:20
    Aaronontheweb milestoned #4496
Aaron Stannard
@Aaronontheweb
those messages only go to node 1
since an ActorSelection addresses only a single node explicitly
feng3245
@feng3245
kind of defeats the purpose of clustering but It's probably something I'd use since the code is closely tied to remoting and ask right now but with multiple addresses which are available
feng3245
@feng3245
Next step would be to add an abstraction on top of ActorSelection and Ask that does the pub sub
Alex Hofer
@alexhofer
@Aaronontheweb can you comment on what ActorProducerPluginBase might be replaced with? We are using it currently and wanna switch to the new thing if its in place already. Or keep it on our radar whenever its replacement arrives :)
Aaron Stannard
@Aaronontheweb
kind of defeats the purpose of clustering but It's probably something I'd use since the code is closely tied to remoting and ask right now but with multiple addresses which are available
I wouldn't say that
the purpose of clustering is to make you AWARE OF WHO IS IN THE NETWORK
and any given time
that's what the events are for
if you want to make WHO YOU ARE COMMUNICATING WITH transparent
use a tool like a clustered router
you can just Ask the router
and it will do the right thing
and hide all of those implementation details
can you comment on what ActorProducerPluginBase might be replaced with? We are using it currently and wanna switch to the new thing if its in place already. Or keep it on our radar whenever its replacement arrives :)
@alexhofer at the moment, that issue looks like something more complicated than I originally anticipated
I don't think it's going to get replaced necessarily since it contains some context-specific data inside of it
but the way we propagate that data inside Props is just really odd today
Blue
@heyixiaoran
@Aaronontheweb tks. It's work. Now sender publish a topic and receiver subscribe a topic. Then sender can send a message to receiver. Can I get the sender path when receive message and send a message back use the path ?
DSanchen
@DSanchen
Someone any Idea why resolving an actor (created with ActorOfAsTestActorRef) can fail sometimes ??
tkeegan-ealink
@tkeegan-ealink
I have been reading about the use of async/await (or more to the point the warning not to), as i understand it...it is generally safe to use the async/await at the beginning (i.e. prior to entering into the actor system)....but what if within the actor it is going to call async methods on other classes?
In particular, i have a command, class that defines an async Execute method, which will internally perform an Ask on a target actor. This is working fine if i am calling it from a controller....Can someone tell me if i going to expect issues if i were to call the same Execute method from within another actor....and how i should address this?
Blue
@heyixiaoran
@Aaronontheweb Hi . I use shard and run one lighthouse ,sender1 and receiver1. receiver1 can receive messages from sender1. Then run sender2 and receiver2. sender1 and receiver1 still receive the messages. How can make one message just received by one receiver ? I mean one message just handle once.
using (var system = ActorSystem.Create(_systemName, _config.WithFallback(ClusterClientReceptionist.DefaultConfig())
                                                                       .WithFallback(DistributedPubSub.DefaultConfig())))
            {
                var shardRegion = ClusterSharding.Get(system).Start(
                    nameof(SenderActor),
                    Props.Create<SenderActor>(),
                    ClusterShardingSettings.Create(system).WithRole(Roles.Sharding),
                    new MessageExtractor());

                for (int i = 0; i < 100; i++)
                {
                    Thread.Sleep(2000);
                    shardRegion.Tell(new ShardEnvelope("1", "1", "test" + i));
                }

                system.WhenTerminated.Wait();
            }


public class SenderActor : ReceiveActor
    {
        private readonly IActorRef _mediator = DistributedPubSub.Get(Context.System).Mediator;

        public SenderActor()
        {
            Receive<string>(msg =>
            {
                Console.WriteLine(msg);

                _mediator.Tell(new Publish(Topics.SendMessageTopic, msg));
            });
        }
    }

public class ReceiverActor : ReceiveActor
    {
        private readonly IActorRef _mediator = DistributedPubSub.Get(Context.System).Mediator;

        public ReceiverActor()
        {
            Receive<string>(msg =>
            {
                Console.WriteLine(msg);
            });
        }

        protected override void PreStart()
        {
            base.PreStart();
            _mediator.Tell(new Subscribe(Topics.SendMessageTopic, Self));
        }

        protected override void PostStop()
        {
            _mediator.Tell(new Unsubscribe(Topics.SendMessageTopic, Self));
            base.PostStop();
        }
    }
tkeegan-ealink
@tkeegan-ealink
@heyixiaoran Could you not look at having a coordinating/validation actor that both will consult before processing the message. If the message has not been processed, then the coordinator will emit a new message back to the sender to tell it to process it.
Dan
@ctrlaltdan
Hey everyone. I've been using cluster sharding in a development/CI environment for a while now and this error I'm getting is a recurring theme. The only way I can get my application back on track is to clear the event journal and allow the application to start from fresh...
Is there a bug here or have I configured something incorrectly?
I am using Kubernetes pods so each deployment will (or is highly likely to) have a new address. As the error states, there is no region deployed to that address (verified by lighthouse and PBM tool)
If I'm correct, in this instance, should the shard region not be reallocated?
Error:
[09:59:17 ERR] Exception in ReceiveRecover when replaying event type [Akka.Cluster.Sharding.PersistentShardCoordinator+ShardHomeAllocated] with sequence number [9] for persistenceId [/system/sharding/customerCoordinator/singleton/coordinator]
System.ArgumentException: Region [akka.tcp://imburse@10.240.0.79:8081/system/sharding/customer#594538619] not registered
Parameter name: e
   at Akka.Cluster.Sharding.PersistentShardCoordinator.State.Updated(IDomainEvent e)
   at Akka.Cluster.Sharding.PersistentShardCoordinator.ReceiveRecover(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Persistence.Eventsourced.<>c__DisplayClass91_0.<Recovering>b__1(Receive receive, Object message)
Alex Michel
@amichel
Hi, I'm using a sharded cluster, where actor hosted in shards is creating child actor that is router with broadcast group. That's basically the only purpose of that top level actor, which seems redundant to me, just causing overhead of many messages passed for no real reason. Is it possible to host router directly in the shard region.
I tried to pass it in props using Props.Create<MyActor>().WithRouter(new BroadCastGroup()), but now messages always end in dead letter.
feng3245
@feng3245
@Aaronontheweb But what if the router is down? We are assuming the router have redundancy as well?
Alex Hofer
@alexhofer
@Aaronontheweb right on, thanks! We will put a comment in that it might change someday but just keep working with it :)
feng3245
@feng3245
@Aaronontheweb Is there anything that the resolve one is using? This need to be mocked to return good
Andre Loker
@aloker
@Aaronontheweb Hi there, first of all thanks (to you and the rest of the contributers) for this great framework. It has changed the way I'm thinking about certain software problems. However, I'm experiencing a showstopping bug in PersistentFSM which I was already able to fix (akkadotnet/akka.net#3655). The issue is pretty severe for us but easy to fix (two lines of code). Is there a chance to have this fix available on NuGet in a prerelease of 1.3.11?
Blue
@heyixiaoran
@tkeegan-ealink how to write it ? can you show me a demo ?
Bartosz Sypytkowski
@Horusiath
@amichel depends on what do you want to broadcast. In theory you can take a list of currently active sharded entities, but there is no such things as all entities (as they may come and go when needed). Also IMO using routers with sharding is not a great idea (especially when your routers use static configuration, while sharded actors location is dynamic).
@dubs999 what journal are you using for sharding?
Dan
@ctrlaltdan
@Horusiath I'm using the SQL Server driver at the moment. Happy to switch if this is causing the issue.
reuveniy
@reuveniy
I am looking at akka net clustering using Consul for discovery. Is anyone running a similar setup? [ was looking at https://github.com/Horusiath/Akka.Cluster.Discovery but that requires seed nodes to be available using the public-host + port (not public port) which is not my case ] . I was thinking on a simple solution in which each "node" is registering using "consul/service" tag, distinguishing itself by service name and tag. than akka query these when a node is starting it tries to join one of the registered nodes in the cluster, on success it will register itself or just start emitting a healthy healthcheck. Is that some sound or anyone has some advise here.
Blue
@heyixiaoran
Hi. Who can tell me how to make one message just handle once in shard ?
Bartosz Sypytkowski
@Horusiath
@heyixiaoran have you read this post? You should have this and more answers there: https://petabridge.com/blog/introduction-to-cluster-sharding-akkadotnet/
Onur Gumus
@OnurGumus
does cluster sharding provide message delivery guarantee as long as sender node is alive?
kandiyohi
@kandiyohi
Hi, friends!
joowon
@HIPERCUBE

Hi guys, i have a question.

I generated a huge amount of message and sending these message to a remote actor. Then i connection is closed and quarantined by system, after getting following warnings.

[WARNING] ... You should probably implement flow control to avoid flooding the remote connection.

Is it quarantined because of the catastrophic communication?
Is it possible to throttling messages? Any suggestions to avoid this issue?

Blue
@heyixiaoran

@Horusiath I found sender can set shardId. But receiver can not set shardId . So I have sender1 to send message to shardId1 and sender2 to send message to shardId2 . How to set receiver1 just receive the message from sender1 and receiver2 just receive the message from sender2 ?
sender :

            var shardRegion = ClusterSharding.Get(system).Start(
                    nameof(SenderActor),
                    Props.Create<SenderActor>(),
                    ClusterShardingSettings.Create(system).WithRole(Roles.Sharding),
                    new MessageExtractor());

                for (int i = 0; i < 100; i++)
                {
                    Thread.Sleep(2000);
                    shardRegion.Tell(new ShardEnvelope("1", "1", "TestFromSender1"));    // or  shardRegion.Tell(new ShardEnvelope("2", "1", "TestFromSender1")); 
                }

receiver:

              var clusterSharding = ClusterSharding.Get(system);
                SenderShardActor = clusterSharding.StartProxy(nameof(SenderActor), Roles.Sharding, new MessageExtractor());  //Did I miss any settings  at here?

                ReceiverActor = system.ActorOf<ReceiverActor>("receiver");
Bartosz Sypytkowski
@Horusiath
@heyixiaoran sorry but your naming is bit confusing. I don't get, what are you trying to achieve in your 'receiver' snippet. What is sender/receiver in your context?
Aaron Stannard
@Aaronontheweb
@HIPERCUBE looks like you're just sending messages to Akka.Remote faster than remoting can process it
suggestions are to either implement flow control - throttle the rate at which you hand messages off to akka.remote
or do some things that will help remoting work faster, like not using JSON.NET as your serializer
to11mtm
@to11mtm

@Aaronontheweb Somehow your 'looks cool' comment about my job scheduler gave me some encouragement... After getting some feedback from my normal work job team, I did some refactoring... I now have an example where various actors in a pipeline can get Jobs as wire-friendly results aggregated in a collection , such that the final effects of a command can be committed atomically.

I think it could be a great way to bridge the gap for distributed systems into scenarios where people want transactional behavior with minimum effort

Aaron Stannard
@Aaronontheweb
keep going I say
would be great to see more tools like that out in the .NET space
there's definitely demand for distributed scheduling capabilities
Blue
@heyixiaoran
@Horusiath sender is a send message node and receiver is a receive message node. They are both project name. I want to run multi send nodes and receive nodes . for example. run sender1 ,sender2 , receiver1. Then sender1 send message to shardid=1,entityid=1 and sender2 send message to shardid= 2,entityid=2 . I want receiver1 receive message from sender1 and sender2. Now I run a receiver2. Because it will rebalance . So I think receiver1 will receive message from sender1 and receiver2 will receive message from sender2. Do I miss some thing about rebalance ?