Module ractor_cluster::node

source ·
Expand description

Erlang node() host communication for managing remote actor communication in a cluster

§Overview

A NodeServer handles opening the TCP listener and managing incoming and outgoing NodeSession requests. NodeSessions represent a remote server, locally.

Additionally, you can open a session as a “client” by requesting a new session from the NodeServer after initially connecting a TcpStream to the desired endpoint and then attaching the NodeSession to the TcpStream (and linking the actors). See client::connect for client-based connections

§Supervision

The supervision tree is the following

NodeServer supervises 1. The server-socket TCP ractor_cluster::net::listener::Listener 2. All of the individual NodeSessions

Each NodeSession supervises 1. The TCP ractor_cluster::net::session::Session connection 2. All of the remote referenced actors ractor_cluster::remote_actor::RemoteActor. That way if the overall node session closes (due to tcp err for example) will lose connectivity to all of the remote actors

Each actor_cluster::net::session::Session supervises 1. A TCP writer actor (ractor_cluster::net::session::SessionWriter) 2. A TCP reader actor (ractor_cluster::net::session::SessionReader) -> If either child actor closes, then it will terminate the overall ractor_cluster::net::session::Session which in turn will terminate the NodeSession and the NodeServer will de-register the NodeSession from its internal state

Re-exports§

Modules§

  • Define’s a node’s authentication process between peers. Definition can be found in Erlang’s handshake
  • This module contains the logic for initiating client requests to other super::NodeServers
  • A NodeSession is an individual connection between a specific pair of node()s and all of its authentication and communication for that pairing

Structs§

Enums§

Traits§

  • Trait which is utilized to receive Node events (node session startup, shutdown, etc).