Coder Social home page Coder Social logo

Cluster Details about protoactor-go HOT 3 CLOSED

asynkron avatar asynkron commented on September 22, 2024
Cluster Details

from protoactor-go.

Comments (3)

rogeralsing avatar rogeralsing commented on September 22, 2024 4

One other important note is that Proto.Actor do not manage it's own cluster.
We piggyback on other cluster tools, e.g. Consul.

This means that if you are already using Consul, we are not bringing in any extra level of cluster mechanics.
All Consul tooling will work to manage your cluster.
And all of the complex mechanics of clustering is handled within Consul.

The ClusterProvider interface can be used to implement the same support over other tools, e.g. Zookeeper, ETCD and others.

Cluster

It should be noted that the Cluster module is the least mature of the modules right now.

from protoactor-go.

mvbaffa avatar mvbaffa commented on September 22, 2024 1

Thanks Roger,

Does the examples included in the repo have a sample of how to use the cluster?

from protoactor-go.

rogeralsing avatar rogeralsing commented on September 22, 2024

Hi.

Cluster support works fine using Docker, it also supports a dynamic topology where nodes come an go.

Cluster notifications are sent on the EventStream, much like Akka, there are currently 5 events you can subscribe to:

MemberJoinedEvent

Once a new node not known to the cluster, this is the event that will fire.

MemberRejoinedEvent

Similar to the above, but is fired if a node appears with a new "Generation".
This means that the node have been killed and restarted. if this happens fast enough so that other mechanics don't have the time to react. this will ensure that the cluster sees the node as a new node.

MemberLeftEvent

This fires when there is no trace of this node in the cluster provider anymore.
That is, if using Consul as a cluster provider, once this node is no longer in consul, it will raise this event.

MemberUnavailableEvent

This fires when a node is still part of the cluster, but no longer responsive.

MemberAvailableEvent

This fires when a node that was previously unresponsive becomes responsive again.

Will this work with a similar functionality as Akka cluster

No, more similar to the Microsoft Orleans model.
You can however chose to use either normal Akka like actors or Orleans style Grains, or mix the two.

What about notifications and communications between nodes ?

All nodes knows about all other nodes, and actors on different nodes can talk to eachother.
You can also use the "virtual actor" feature to have the concept of "always existing actors".
e.g. pid := cluster.Get("MyActor","User")
Will give you a handle to an actor named MyActor, of the type "User" (this is a named Props and not a Go or C# type name)

HTH

from protoactor-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.