Movie::Remote::StripedConnectionPool
StripedConnectionPool maintains multiple parallel connections to a remote system. Actors are deterministically mapped to connections to preserve message ordering while enabling parallel sending across different actors.
Constants
DEFAULT_STRIPE_COUNT = 8
Default number of parallel connections (should match CPU cores)
Log = ::Log.for(self)
Constructors
new(address : Address, path_registry : Movie::PathRegistry, system : Movie::AbstractActorSystem, stripe_count : Int32 = DEFAULT_STRIPE_COUNT, on_message : Proc(WireEnvelope, Nil) | Nil = nil)
SourceInstance methods
address
Sourceconnected?
Sourceconnection_for(actor_path : ActorPath) : Connection
Returns the connection for a specific actor path. Uses consistent hashing to ensure messages to the same actor always go through the same connection (preserving order).
next_connection
Returns the next connection in round-robin order. Use for messages where ordering doesn't matter.
Sends an envelope through the appropriate stripe based on target path.
Sends an envelope through a specific stripe (for load balancing).
stripe_count
Source