rodario

A simple, redis-backed Python actor framework

Contents:

class rodario.registry.Registry

Actor registry class (singleton wrapper)

static __new__()

Retrieve the singleton instance for Registry.

Return type:rodario.registry._Singleton
class rodario.registry._Singleton

Singleton for actor registry

__init__()

Initialize the registry.

actors()

Retrieve a list of registered actors.

Return type:set
exists(uuid)

Test whether an actor exists in the registry.

Parameters:uuid (str) – UUID of the actor to check for
Return type:bool
get_proxy(uuid)

Return an ActorProxy for the given UUID.

Parameters:uuid (str) – The UUID to return a proxy object for
Return type:rodario.actors.ActorProxy
register(uuid)

Register a new actor.

Parameters:uuid (str) – The UUID of the actor to register
unregister(uuid)

Unregister an existing actor.

Parameters:uuid (str) – The UUID of the actor to unregister
class rodario.actors.Actor(uuid=None)

Base Actor class

__init__(uuid=None)

Initialize the Actor object.

Parameters:uuid (str) – Optionally-provided UUID
is_alive

Return True if this Actor is still alive.

Return type:bool
proxy()

Wrap this Actor in an ActorProxy object.

Return type:rodario.actors.ActorProxy
start()

Fire up the message handler thread.

stop()

Kill the message handler thread.

class rodario.actors.ActorProxy(actor=None, uuid=None)

Proxy object that fires calls to an actor over redis pubsub

__init__(actor=None, uuid=None)

Initialize instance of ActorProxy.

Accepts either an Actor object to clone or a UUID, but not both.

Parameters:

Indices and tables