class Movie::Remote::RemoteActorRef(T)

Overview

RemoteActorRef provides a type-safe reference to an actor in a remote system. Messages sent through this reference are serialized and transmitted over TCP. Uses striped connection pools for parallel sending while preserving per-actor ordering.

Defined in:

movie/remote/remote_actor_ref.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Instance methods inherited from class Movie::ActorRefBase

id : Int32 id, path : ActorPath | Nil path, path=(path : ActorPath | Nil) path=, remote_peer_address : Address | Nil remote_peer_address, remote_peer_node_uid : String | Nil remote_peer_node_uid, send_system(message : SystemMessage) send_system

Constructor methods inherited from class Movie::ActorRefBase

new(id : Int32, path : ActorPath | Nil = nil) new

Constructor Detail

def self.new(system : Movie::AbstractActorSystem, pool : StripedConnectionPool, target_path : ActorPath, path_registry : Movie::PathRegistry) #

[View source]

Instance Method Detail

def <<(message : T) #

Sends a message to the remote actor (fire-and-forget).


[View source]
def ==(other : Movie::ActorRefBase) : Bool #

[View source]
def ask(message : T, response_type : R.class, timeout : Time::Span = 30.seconds) : Movie::Future(R) forall R #

Performs an ask (request-reply) to the remote actor. Returns a Future that will be completed with the response.


[View source]
def ask_serializable(message : T, timeout : Time::Span = 30.seconds) : Movie::Future(JSON::Serializable) #

Internal dynamic ask used by protocol coordinators that must relay a registered response without knowing its concrete type at compile time.


[View source]
def connection : Connection #

Returns the connection being used for this actor ref.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


[View source]
def send_system(message : Movie::SystemMessage) #

Sends a system message to the remote actor.


[View source]
def target_path : ActorPath #

[View source]
def tell_from(sender : Movie::ActorRefBase | Nil, message : T) #

Sends a message to the remote actor with sender information.


[View source]
def tell_unordered(message : T) #

Sends a message without ordering guarantee (uses round-robin for load balancing).


[View source]