Class Nanite::Cluster
In: lib/nanite/cluster.rb
Parent: Object

Methods

Attributes

agent_timeout  [R] 
amq  [R] 
callbacks  [R] 
identity  [R] 
mapper  [R] 
nanites  [R] 
reaper  [R] 
redis  [R] 
serializer  [R] 

Public Class methods

Public Instance methods

adds nanite to nanites map: key is nanite‘s identity and value is a services/status pair implemented as a hash

determine which nanites should receive the given request

Protected Instance methods

returns all nanites that provide given service

forward response back to agent that originally made the request

updates nanite information (last ping timestamps, status) when heartbeat message is received

forward request coming from agent

returns least loaded nanite that provides given service

returns all nanites that provide the given service

selects next nanite that provides given service using round robin rotation

[Validate]