syncproto Package

syncproto Package

base Module

class sts.syncproto.base.SyncIODelegate(io_master, socket)[source]

Bases: object

__init__(io_master, socket)[source]
close()[source]
get_on_message_received()[source]
on_message_received
send(msg)[source]
set_on_message_received(f)[source]
wait_for_message(timeout=None)[source]
class sts.syncproto.base.SyncMessage[source]

Bases: sts.syncproto.base.SyncMessage

value object that models a message in the STS sync protocol

class sts.syncproto.base.SyncProtocolListener(handlers, io_delegate, collect_stats=True, delay_threshold_ms=3.0)[source]

Bases: object

Speaker delegates to this class to wait on messages

__init__(handlers, io_delegate, collect_stats=True, delay_threshold_ms=3.0)[source]
on_message_received(msg_hash)[source]
wait_for_xaction(message, timeout=None)[source]
class sts.syncproto.base.SyncProtocolSpeaker(handlers, io_delegate, collect_stats=True)[source]

Bases: object

speaks the sts sync protocol

__init__(handlers, io_delegate, collect_stats=True)[source]
ack_sync_notification(messageClass, xid)[source]
async_notification(messageClass, fingerPrint, value)[source]
message_with_xid(message)[source]
send(message)[source]

Send a message you don’t expect a response from

sync_notification(messageClass, fingerPrint, value)[source]
sync_request(messageClass, name, timeout=None)[source]

Send a message you expect a response from. Note: Blocks this thread until a response is received!

class sts.syncproto.base.SyncTime[source]

Bases: sts.syncproto.base.SyncTime

ValueObject that models the microsecond timestamps used in STS Sync Messages

as_float()[source]
static now()[source]
sts.syncproto.base.unpatched_time()[source]

pox_syncer Module

class sts.syncproto.pox_syncer.POXIOMaster[source]

Bases: sts.util.io_master.IOMaster, pox.lib.recoco.recoco.Task

horrible clutch of a hack that is both a regular select loop and a POX task yielding select (so it can be run by the recoco scheduler)

__init__()[source]
run()[source]
class sts.syncproto.pox_syncer.POXNomSnapshotter[source]

Bases: object

__init__()[source]
get_snapshot()[source]
class sts.syncproto.pox_syncer.POXSyncConnection(io_master, sync_uri)[source]

Bases: object

__init__(io_master, sync_uri)[source]
async_notification(messageClass, fingerPrint, value)[source]
listen()[source]
request(messageClass, name)[source]
sync_notification(messageClass, fingerPrint, value)[source]
wait_for_connect()[source]
class sts.syncproto.pox_syncer.POXSyncMaster(io_master, blocking=True)[source]

Bases: object

__init__(io_master, blocking=True)[source]
get_time()[source]

Hack alert: python logging use time.time(). That means that log statements in the determinism protocols are going to invoke get_time again. Solve by returning the real time if we (get_time) are in the stacktrace

handle_UpEvent(_)[source]
patch_functions()[source]
start(sync_uri)[source]
state_change(msg, *args)[source]

Notify sts that we’re about to make a state change (log msg)

class sts.syncproto.pox_syncer.POXSyncProtocolSpeaker(io_delegate=None)[source]

Bases: sts.syncproto.base.SyncProtocolSpeaker

__init__(io_delegate=None)[source]
sts.syncproto.pox_syncer.launch(blocking=False)[source]

sts_syncer Module

class sts.syncproto.sts_syncer.STSSyncCallback[source]

Bases: object

override with your favorite functionality

get_deterministic_value(controller, name)[source]
state_change(type, controller, time, fingerprint, name, value)[source]
class sts.syncproto.sts_syncer.STSSyncConnection(controller, state_master, sync_uri)[source]

Bases: object

A connection to a controller with the sts sync protocol

__init__(controller, state_master, sync_uri)[source]
ack_sync_notification(messageClass, xid)[source]
close()[source]
connect(io_master)[source]
disconnect()[source]
get_nom_snapshot()[source]
on_disconnect(func)[source]
send_deterministic_value(xid, value)[source]
class sts.syncproto.sts_syncer.STSSyncConnectionManager(io_master, state_master)[source]

Bases: object

the connection manager for the STS sync protocols. TODO: finish

__init__(io_master, state_master)[source]
connect(controller, sync_uri)[source]
remove_connection(connection)[source]
class sts.syncproto.sts_syncer.STSSyncProtocolSpeaker(controller, state_master, io_delegate)[source]

Bases: sts.syncproto.base.SyncProtocolSpeaker

__init__(controller, state_master, io_delegate)[source]

Table Of Contents

Previous topic

input_traces Package

Next topic

util Package

This Page