Spartan: A distributed array language.
Spartan expressions and optimizations are defined in the spartan.expr package. The RPC and serialization library are defined in spartan.rpc.
A Spartan execution environment consists of a master process and one or more workers; these are defined in the spartan.master and spartan.worker modules respectively.
Workers communicate with each other and the master via RPC; the RPC protocol is based on ZeroMQ and is located in the spartan.rpc package. RPC messages used in Spartan are defined in spartan.core.
For convenience, all array operations are routed through a “context”; this tracks ownership (which worker stores each part of an array) and simplifies sending out RPC messages to many workers at once. This context, is for historical reasons located in spartan.blob_ctx.
The BlobCtx manages the state of a Spartan execution: it stores the location of tiles and other workers in the system, and contains methods for fetching and updating array data, creating and removing tiles and running user-defined kernel functions on tile data.
Bases: object
Create a new context.
Parameters: |
|
---|
Create a new tile to hold data.
Parameters: |
|
---|
Fetch a region of a tile.
Parameters: |
|
---|
Send a heartbeat request to the master.
Parameters: |
|
---|
Run mapper_fn on all tiles in tile_ids.
Parameters: |
|
---|---|
Returns: | dict – mapping from (source_tile, result of mapper_fn) |
Create a new tile id. Does not create a new tile, or any data.
Returns: | `TileId` – Id of created tile. |
---|
Update region of tile_id with data.
data is combined with existing tile data using reducer.
Parameters: |
|
---|
Definitions for RPC messages.
These are used for sending and receiving array data (UpdateReq, GetReq and GetResp), running a function on array data (KernelReq, ResultResp), registering and initializing workers (RegisterReq, InitializeReq).
Bases: spartan.core.Message
Bases: spartan.core.Message
Bases: spartan.core.Message
Destroy any tiles listed in ids.
Bases: spartan.core.Message
Bases: spartan.core.Message
Fetch a region from a tile.
Bases: spartan.core.Message
The result of a fetch operation: the tile fetched from and the resulting data.
Bases: spartan.core.Message
Bases: spartan.core.Message
Sent from the master to a worker after all workers have registered.
Contains the workers unique identifier and a list of all other workers in the execution.
Bases: spartan.core.Message
The local result returned from a kernel invocation.
LocalKernelResult.result is returned to the master. LocalKernelResult.futures may be None, or a list of futures that must be waited for before returning the result of this kernel.
Bases: object
Base class for all RPC messages.
Bases: spartan.core.Message
Sent by worker to master when registering during startup.
Bases: spartan.core.Message
Run mapper_fn on the list of tiles tiles.
For efficiency (since Python serialization is slow), the same message is sent to all workers.
Bases: spartan.core.Message
The result returned from running a kernel function.
This is typically a map from Extent to TileId.
Bases: object
A TileId uniquely identifies a tile in a Spartan execution.
Currently, TileId instances consist of a worker index and a blob index for that worker.
x.__eq__(y) <==> x==y
x.__ge__(y) <==> x>=y
x.__gt__(y) <==> x>y
x.__hash__() <==> hash(x)
x.__le__(y) <==> x<=y
x.__lt__(y) <==> x<y
x.__ne__(y) <==> x!=y
x.__repr__() <==> repr(x)
Bases: spartan.core.Message
Bases: spartan.core.Message
Update region (a slice, or None) of tile with id id .
data should be a Numpy or sparse array. data is combined with existing tile data using the supplied reducer function.
Bases: object
Status information sent to the master in a heartbeat message.
x.__repr__() <==> repr(x)
Functions for managing a cluster of machines.
Spartan currently supports running workers as either threads in the current process, or by using ssh to connect to one or more machines.
A Spartan “worker” is a single process; more than one worker can be run on a machine; typically one worker is run per core.
Bases: spartan.config.Flag
Bases: spartan.config.Flag
Start a cluster with num_workers workers.
If use_cluster_workers is True, then use the remote workers defined in spartan.config. Otherwise, workers are all spawned on the localhost.
Parameters: |
|
---|
Configuration options and flags.
Options may be specified on the command line, or via a configuration file. Configuration files should be placed in $HOME/.config/spartan.ini
To facilitate changing options when running with nosetests, flag values are also parsed out from the SPARTAN_OPTS environment variable.
SPARTAN_OPTS='--profile_master=1 ...' nosetests
Bases: spartan.config.Flag
Boolean flag.
Accepts ‘0’ or ‘false’ for false values, ‘1’ or ‘true’ for true values.
Bases: object
Base object for a representing a command line flag.
Subclasses must implement the set operation to parse a flag value from a command line string.
Bases: spartan.config.Flag
Bases: spartan.config.Flag
Bases: argparse.HelpFormatter
Bases: spartan.config.Flag
Master process definition.
Spartan computations consist of a master and one or more workers.
The master tracks the location of array data, manages worker health, and runs user operations on workers.
Bases: object
RPC method.
Called by worker processes periodically.
Parameters: |
|
---|
Returns: EmptyMessage
Helper for constructing trees of objects.
Provides pretty printing, equality testing, hashing and keyword initialization.
Bases: object
Assertion helper functions.
a = 'foo'
b = 'bar'
Assert.eq(a, b)
# equivalent to:
# assert a == b, 'a == b failed (%s vs %s)' % (a, b)
Bases: object
Lazy timer.
Prints elapsed time when destroyed.
Bases: threading.Thread
Watchdog for a file (typically sys.stdin or sys.stdout).
When the file closes, terminate the process. (This occurs when an ssh connection is terminated, for example.)
Parameters: |
|
---|
Decorator.
Copy the docstring from source_function to this function.
Decorator: count calls to fn and print after each 100. :param fn:
Read /proc/cpuinfo and return a dictionary mapping from:
processor_id -> (package, core)
Return True if fn is a lambda expression.
For some reason testing against LambdaType does not work correctly.
Decorator.
Cache outputs of f; repeated calls with the same arguments will be served from the cache.
Function decorator to check return type.
Usage:
@rtype_check(int)
def fn(x, y, z):
return x + y
Decorator: execution of this function is serialized by an threading.RLock. :param fn:
Run f and return (time_taken, result).
Parameters: |
|
---|
This module defines the Worker class and related helper functions.
Workers in Spartan manage array data and computation; methods are available for creating, updating, reading and deleting tiles of arrays. Workers can also run a user-specified function on a set of tiles.
Workers periodically send a heartbeat message to the master; if the master cannot be contacted for a sufficiently long interval, workers shut themselves down.
Bases: object
Spartan workers generally correspond to one core of a machine.
Workers manage the storage of array data and running of kernel functions.
The unique identifier for this worker
Mapping from worker id to RPC client
Mapping from tile id to tile.
Create a new tile.
Parameters: |
|
---|
Delete zero or more blobs.
Parameters: |
|
---|
Fetch a portion of a tile.
Parameters: |
|
---|
Initialize worker.
Assigns this worker a unique identifier and sets up connections to all other workers in the process.
Parameters: |
|
---|
Run a kernel on tiles local to this worker.
Parameters: |
|
---|
Shutdown this worker.
Shutdown is deferred to another thread to ensure the RPC reply is sent before the poll loop is killed.
Parameters: |
|
---|
Bases: spartan.array.distarray.DistArray
Mimics the behavior of Numpy broadcasting.
Takes an input of shape (x, y) and a desired output shape (x, y, z), the broadcast object reports shape=(x,y,z) and overrides __getitem__ to return the appropriate values.
Bases: object
The interface required for distributed arrays.
A distributed array should support:
- fetch(ex) to fetch data
- update(ex, data) to combine an update with existing data
- foreach_tile(fn, kw)
Fetch the region specified by extent from this array.
Parameters: | ex (Extent) – Region to fetch |
---|---|
Returns: | np.ndarray – Data from region. |
Bases: spartan.array.distarray.DistArray
Destroy this array.
NB: Destruction is actually deferred until the next usage of the blob_ctx. __del__ can be called at anytime, including the invocation of a RPC call, which leads to odd/bad behavior.
Bases: spartan.array.distarray.DistArray
Provide the DistArray interface for local data.
Bases: spartan.array.distarray.DistArray
Represents a Numpy multi-dimensional slice on a base DistArray.
Slices in Spartan do not result in a copy. A Slice object is returned instead. Slice objects support mapping (foreach_tile) and fetch operations.
Convert data to behave like a DistArray.
If data is already a DistArray, it is returned unchanged. Otherwise, data is wrapped to have a DistArray interface.
Parameters: | data – An input array or array-like value. |
---|
Return the table shard with the best locality for extent ex. :param table: :param ex:
Convert the list of arrays in args to have the same shape.
Extra dimensions are added as necessary, and dimensions of size 1 are repeated to match the size of other arrays.
Parameters: | args – List of DistArray |
---|
Split an array of shape shape into Extent`s. Each extent contains roughly `TILE_SIZE elements if num_shards is -1.
Parameters: |
|
---|---|
Returns: | list – list of Extent |
Based on tile_hint to compute splits for each dimension of the array of shape shape
Parameters: |
|
---|---|
Returns: | list – splits for each dimension. |
Make a new, empty DistArray
Construct a distarray from an existing table. Keys must be of type Extent, values of type Tile.
Shape is computed as the maximum range of all extents.
Dtype is taken from the dtype of the tiles.
Parameters: | table – |
---|
Compute a tile_shape (tile_hint) for the array.
Parameters: | shape – tuple. the array’s shape. |
---|---|
Returns: | list – tile_shape for the array |
Bases: object
A rectangular tile of a distributed array.
These correspond (roughly) to a slice taken from an array (without any step component).
Arrays are indexed from the upper-left; for an array of shape (sx, sy, sz): (0,0...) is the upper-left corner of an array, and (sx,sy,sz...) the lower-right.
Extents are represented by an upper-left corner (inclusive) and a lower right corner (exclusive): [ul, lr). In addition, they carry the shape of the array they are a part of; this is used to compute global position information.
x.__eq__(y) <==> x==y
x.__ge__(y) <==> x>=y
x.__getitem__(y) <==> x[y]
x.__gt__(y) <==> x>y
x.__hash__() <==> hash(x)
x.__le__(y) <==> x<=y
x.__lt__(y) <==> x<y
x.__ne__(y) <==> x!=y
x.__repr__() <==> repr(x)
Convert idx from a local offset in this tile to a global offset.
Return a new TileExtent representing base[idx]
Parameters: |
|
---|
Create a new extent with the given coordinates and array shape.
Parameters: |
|
---|
Return the extents that overlap with region.
Parameters: |
|
---|
Return a new (ravellled_ul, ravelled_lr) to make a rectangle for shape. If (ravelled_ul, ravelled_lr) already forms a rectangle, just return it.
Parameters: |
|
---|
Given a list of extents, return the shape of the array necessary to fit all of them. :param extents:
Construct a TileExtent from a slice or tuple of slices.
Parameters: |
|
---|---|
Return type: | TileExtent corresponding to idx. |
Return type: | The intersection of the 2 extents as a TileExtent, or None if the intersection is empty. |
---|
Returns true if slices is a complete covering of shape; that is:
array[slices] == array
Parameters: |
|
---|---|
Return type: | boolean |
Parameters: |
|
---|---|
Return type: | A new extent using this extent as a basis, instead of (0,0,0...) |
Parameters: |
|
---|---|
Return type: | A slice representing the local offsets of other into this tile. |
Return the shape for the result of applying a reduction along axis to an input of shape input_shape. :param input_shape: :param axis:
Return true if the shape of data matches the extent offset. :param offset: :param data:
Bases: object
Tiles have 4 modes:
Empty – no data or mask Masked – data + mask Sparse – hashmap of positions (implicit mask) Dense – all data values have been set, mask is cleared.
Definitions of expressions and optimizations.
In Spartan, operations are not performed immediately. Instead, they are represented using a graph of Expr nodes. Expression graphs can be evaluated using the Expr.evaluate or Expr.force methods.
The base module contains the definition of Expr, the base class for all types of expressions. It also defines subclasses for wrapping common Python values: lists (ListExpr), dicts (DictExpr) and tuples ((TupleExpr).
Operations are built up using a few high-level operations – these all live in their own modules:
Optimizations on DAGs live in spartan.expr.optimize.
Defines the base class of all expressions (Expr), as well as common subclasses for collections.
Bases: spartan.expr.base.Expr
Promote a value to be array-like.
This should be wrapped around most user-inputs that may be used in an array context, e.g. (1 + x => map((as_array(1), as_array(x)), +))
Bases: spartan.expr.base.Expr
CollectionExpr subclasses wrap normal tuples, lists and dicts with Expr semantics.
CollectionExpr.visit and CollectionExpr.evaluate will visit or evaluate all of the tuple, list or dictionary elements in this expression.
Bases: spartan.expr.base.CollectionExpr
Bases: object
Expressions can be copied around and changed during optimization or due to user actions; we want to ensure that a cache entry can be found using any of the equivalent expression nodes.
To that end, expressions are identfied by an expression id; when an expression is copied, the expression ID remains the same.
The cache tracks results based on expression ID’s. Since this is no longer directly linked to an expressions lifetime, we have to manually track reference counts here, and clear items from the cache when the reference count hits zero.
Bases: object
Base class for all expressions.
Expr objects capture user operations.
An expression can have one or more dependencies, which must be evaluated before the expression itself.
Expressions may be evaluated (using Expr.force), the result of evaluating an expression is cached until the expression itself is reclaimed.
Compute argmax over axis.
See numpy.ndarray.argmax.
Parameters: |
|
---|
Compute argmin over axis.
See numpy.ndarray.argmin.
Parameters: |
|
---|
Convert x to a new dtype.
See numpy.ndarray.astype.
Parameters: |
|
---|
Return a cached value for this Expr.
If a cached value is not available, or the cached array is invalid (missing tiles), returns None.
Compute the shape of this expression.
If the shape is not available (data dependent), raises NotShapeable.
Returns: | tuple – Shape of this expression. |
---|
Evaluate an Expr.
Dependencies are evaluated prior to evaluating the expression. The result of the evaluation is stored in the expression cache, future calls to evaluate will return the cached value.
Returns: | DistArray |
---|
Evaluate this expression and convert the resulting distributed array into a Numpy array.
Return type: | np.ndarray |
---|
Compute the mean of x over axis.
See numpy.ndarray.mean.
Parameters: |
|
---|
“Ravel” v to a one-dimensional array of shape (size(v),).
See numpy.ndarray.ravel. :param v: Expr or DistArray
Return a new array with shape``new_shape``, and data from this array.
Parameters: | new_shape – tuple with same total size as original shape. |
---|
Try to compute the shape of this expression.
If the value has been computed already this always succeeds.
Return type: | tuple |
---|
Sum x over axis.
Parameters: |
|
---|
Bases: object
Captures the stack trace for an expression.
Lazy evaluation and optimization can result in stack traces that are very far from the actual source of an error. To combat this, expressions track their original creation point, which is logged when an error occurs.
Multiple stack traces can be tracked, as certain optimizations will combine multiple expressions together.
Bases: spartan.expr.base.CollectionExpr
Bases: exceptions.Exception
Thrown when the shape for an expression cannot be computed without first evaluating the expression.
Bases: spartan.expr.base.CollectionExpr
Bases: spartan.expr.base.Expr
Convert an existing value to an expression.
Apply visitor to all children of this node, returning a new Expr of the same type.
Parameters: | visitor – OptimizePass |
---|
Convert a numpy value or scalar into an Expr.
Parameters: | v – Expr, numpy value or scalar. |
---|
Eagerly evaluate node and convert the result back into an Expr.
Parameters: | node – Expr to evaluate. |
---|
Construct a new expression like expr.
The new expression has the same id, but is initialized using kw
Evaluate this expression and return the result as a numpy.ndarray.
Basic numpy style operations on arrays.
These include –
An extended version of np.arange.
Returns a new array of the given shape and dtype. Values of the array are equivalent to running: np.arange(np.prod(shape)).ravel(shape).
Parameters: |
|
---|---|
Return type: | Expr |
Compute argmax over axis.
See numpy.ndarray.argmax.
Parameters: |
|
---|
Compute argmin over axis.
See numpy.ndarray.argmin.
Parameters: |
|
---|
Convert x to a new dtype.
See numpy.ndarray.astype.
Parameters: |
|
---|
Return the number of nonzero values in the axis of the array.
Parameters: |
|
---|---|
Return type: | np.int64 |
Return the number of zero values in the axis of the array.
Parameters: |
|
---|---|
Return type: | np.int64 |
Create a diagonal array with the given data on the diagonal the shape should be array.shape[0] * array.shape[0]
Parameters: | array – the given data which need to be filled on the diagonal |
---|
Compute the mean of x over axis.
See numpy.ndarray.mean.
Parameters: |
|
---|
Normalize the values of array over axis. After normalization sum(array, axis) will be equal to 1.
Parameters: |
|
---|---|
Returns: | `Expr` – Normalized array. |
Create a distributed array over the given shape and dtype, filled with ones.
Parameters: |
|
---|---|
Return type: | Expr |
Return a random array sampled from the uniform distribution on [0, 1).
Parameters: | tile_hint – A tuple indicating the desired tile shape for this array. |
---|
Return a random array sampled from the standard normal distribution.
Parameters: | tile_hint – A tuple indicating the desired tile shape for this array. |
---|
“Ravel” v to a one-dimensional array of shape (size(v),).
See numpy.ndarray.ravel. :param v: Expr or DistArray
Scan array over axis.
Parameters: |
|
---|
Return the size (product of the size of all axes) of x.
See numpy.ndarray.size.
Parameters: | x – Expr to compute the size of. |
---|
Return an empty sparse array of the given shape.
Parameters: |
|
---|
Make a distributed sparse random array.
Random values are chosen from the uniform distribution on [0, 1).
Parameters: |
|
---|---|
Returns: | Expr |
Sum x over axis.
Parameters: |
|
---|
Bases: spartan.expr.base.Expr
Make a checkpoint for x
Parameters: |
|
---|---|
Return type: | Expr |
Dot expr.
Bases: spartan.expr.base.Expr
Compute the dot product (matrix multiplication) of 2 arrays.
Parameters: |
|
---|---|
Return type: | Expr |
File I/O for spartan
These include –
load/save
The format is based on npy format, see https://github.com/numpy/numpy/blob/master/doc/neps/npy-format.txt for the detail.
If the prefix for files is “foo”, a file, foo_distarray.spf is used to represent the distarray-wise information including array_shape, tiles. For each tile, spartan uses one format-modifed npy file to represent it, foo_$ul_$lr.spf. If the tile is a sparse tile, one additional npz file, foo_$ul_$lr.npz, is used to represent the data (as coo_matrix). All files are in the prefix directory.
Spartan adds several extra key in dictionary field of npy to record the information of tile. If the tile is sparse, the data field contains nothing since all data is represented by the other npz file.
pickle/unpickle
Just use cPickle to dump/load to/from files. These functions don’t have format compatible issues.
Load prefix to a new array.
This expr is lazy and return expr Returns a new array with extents/tiles from prefix
Parameters: |
|
---|
Load some tiles from prefix to some workers.
This expr is not lazy and return tile_id(s).
Parameters: |
|
---|---|
Return type: | A dictionary which contains extents->tile_id |
Unpickle some tiles from prefix to some workers.
This expr is not lazy and return tile_id(s).
Parameters: |
|
---|---|
Return type: | A dictionary which contains extents->tile_ids |
Save array to prefix_xxx. Use cPickle.
This expr is not lazy and return True if success. Returns the number of saved files.
Parameters: |
|
---|
Save array to prefix_xxx.
This expr is not lazy and return True if success. Returns number of saved files (not including _dist.spf)
Parameters: |
|
---|
Return the path to write a save file to, based on the input parameters.
Load prefix_xxx to a new array. Use cPickle.
This expr is lazy and return expr Returns a new array with extents/tiles from fn
Parameters: |
|
---|
Indeaxing expressions (slicing and filtering).
These are generated by a __getitem__ call to an Expr (e.g. x[0:10, 20:30] returns an IndexExpr).
Theoretically we could determine at whether something is a slice (indexing by a tuple) versus a boolean/index array at the call site, but for the moment these are both managed by the IndexExpr.
Bases: spartan.expr.base.Expr
Represents an indexing operation.
Expr to index into
Local expressions.
Briefly: global expressions are over arrays, and local expressions are over tiles.
`LocalExpr`s have dependencies and can be chained together; this allows us to construct local DAG’s when optimizing, which can then be executed or converted to parakeet code.
Bases: spartan.expr.local.LocalExpr
Evaluate a function call.
Dependencies that are variable should be specified via the deps attribute, and will be evaluated and supplied to the function when called.
Constants (axis of a reduction, datatype, etc), can be supplied via the kw argument.
Bases: object
Bases: object
Represents an internal operation to be performed in the context of a tile.
Bases: spartan.expr.local.LocalExpr
An externally supplied input.
Bases: spartan.expr.local.FnCallExpr
Bases: spartan.expr.local.FnCallExpr
Implementation of the map operation.
Maps encompass most of the common Numpy arithmetic operators and element-wise operations. For instance a + b is translated to:
map((a, b), lambda x, y: x + y)
Inputs to a map are broadcast up to have the same shape (this is the same behavior as Numpy broadcasting).
Bases: spartan.expr.base.Expr
Represents mapping an operator over one or more inputs.
Variables: |
|
---|
MapTiles retains the shape of inputs.
Broadcasting results in a map taking the shape of the largest input.
Evaluate fn over each tile of the input.
Parameters: |
|
---|---|
Returns: | MapExpr – An expression node representing mapping fn over inputs. |
Optimizations over an expression graph.
Bases: spartan.expr.optimize.OptimizePass
Replace expressions which have already been evaluated with a simple value expression.
This results in simpler local expressions when evaluating iterative programs.
Bases: spartan.expr.optimize.OptimizePass
Fold sequences of Map operations together.
map(f, map(g, map(h, x))) -> map(f . g . h, x)
Bases: spartan.expr.optimize.OptimizePass
Replace local map/reduce operations with an equivalent parakeet function definition.
Bases: spartan.expr.optimize.OptimizePass
Fuse reduce(f, map(g, X)) -> reduce(f . g, X)
Given a local operation, generate an equivalent parakeet function definition.
Disables parakeet optimization for this function.
Implementation of the reduction expression.
This supports generic reduce operations such as sum, argmin, argmax, min and max.
Bases: spartan.expr.base.Expr
Reduce v over axis axis.
The resulting array should have a datatype given by dtype_fn(input).
For each tile of the input local_reduce_fn is called with arguments: (tiledata, axis, extent).
The output is combined using accumulate_fn.
Parameters: |
|
---|---|
Return type: | Expr |
Reshape operation and expr.
Bases: spartan.array.distarray.DistArray
Reshape the underlying array base.
Reshape does not create a copy of the base array. Instead the fetch method is overridden: 1. Caculate the underlying extent containing the requested extent. 2. Fetch the underlying extent. 3. Trim the fetched tile and reshape to the requested tile.
To support foreach_tile() and tile_shape() (used by dot), Reshape needs an blob_id-to-extent map and extents shape. Therefore, Reshape creates a distarray (shape_array), but Reshape doesn’t initialize its content.
Bases: spartan.expr.base.Expr
Kernel function invoked during shuffle.
Runs map_fn over a single tile of the source array.
Parameters: |
|
---|---|
Returns: | LocalKernelResult – List of (new_extent, new_tile_id). |
Evaluate fn over each extent of v.
Parameters: |
|
---|---|
Returns: | ShuffleExpr |
Kernel function invoked during shuffle.
Runs map_fn over a single tile of the source array.
Parameters: |
|
---|---|
Returns: | LocalKernelResult – No result data (all output is written to target). |
Transpose operation and expr.
Bases: spartan.array.distarray.DistArray
Transpose the underlying array base.
Transpose does not create a copy of the base array. Instead the fetch method is overridden: the dimensions for the requested extent are reversed and the “transposed” request is sent to the underlying base array.
Transpose supports tile_shape() by returing reversed base.tile_shape(). To support foreach_tile(), Transpose reports base’s tiles and reverses extents’ shape in _tile_mapper()
Operations for updating slices of arrays.
To preserve the non-mutation semantics required for optimizations to be correct, writing to an array should not actually mutate the original array, but should instead create a new array with the appropriate region updated. This code currently mutates arrays in place, and therefore should be used with care.
Bases: spartan.expr.base.Expr
Make a distarray from a file. Currently support npy/npz.
Parameters: | fn – file name |
---|---|
Return type: | Expr |
Make a distarray from a numpy array
Parameters: | npa – numpy.ndarray |
---|---|
Return type: | Expr |
Simple RPC library.
The Client and Server classes here work with sockets which should implement the Socket interface.
Bases: object
Chain fn to the given future.
self.wait() return fn(future.wait()).
Bases: object
An outstanding RPC request on the server.
Call done(result) when finished to send result back to client.
Bases: object
Helper class: indicates that this message has already been pickled, and should be sent as is, rather than being re-pickled.
Bases: object
Bases: exceptions.Exception
Wrap a uncaught remote exception.
Bases: exceptions.Exception
Wrap a timeout exception.
ZeroMQ socket implementation.
Bases: spartan.rpc.zeromq.Socket
Bases: spartan.rpc.common.SocketBase
Bases: spartan.rpc.common.SocketBase
Handles a single read from a client
Bases: threading.Thread