proxystore.store.dim.margo
MargoStore implementation.
MargoStoreKey ¶
Bases: NamedTuple
Key to objects in a MargoStore.
MargoStore ¶
MargoStore(
name: str,
*,
interface: str,
port: int,
protocol: Protocol = Protocol.OFI_VERBS,
cache_size: int = 16,
stats: bool = False
) -> None
Bases: Store[MargoStoreKey]
MargoStore implementation for intrasite communication.
This client will initialize a local Margo server (Peer service) that it will store data to.
Parameters:
-
name
(
str
) –Name of the store instance.
-
interface
(
str
) –The network interface to use.
-
port
(
int
) –The desired port for the Margo server.
-
protocol
(
Protocol
) –The communication protocol to use.
-
cache_size
(
int
) –Size of LRU cache (in # of objects). If 0, the cache is disabled. The cache is local to the Python process.
-
stats
(
bool
) –Collect stats on store operations.
Source code in proxystore/store/dim/margo.py
server_started ¶
Loop until server has started.
Source code in proxystore/store/dim/margo.py
close ¶
Terminate Peer server process.
Source code in proxystore/store/dim/margo.py
call_rpc_on
staticmethod
¶
call_rpc_on(
engine: Engine,
addr: str,
rpc: RemoteFunction,
array_str: Bulk,
key: str,
size: int,
) -> Status
Initiate the desired RPC call on the specified provider.
Parameters:
-
engine
(
Engine
) –The client-side engine.
-
addr
(
str
) –The address of Margo provider to access (e.g. tcp://172.21.2.203:6367).
-
rpc
(
RemoteFunction
) –The rpc to issue to the server.
-
array_str
(
Bulk
) –The serialized data/buffer to send to the server.
-
key
(
str
) –The identifier of the data stored on the server.
-
size
(
int
) –The size of the the data.
Returns:
-
Status
–A string denoting whether the communication was successful
Source code in proxystore/store/dim/margo.py
MargoServer ¶
MargoServer implementation.
Parameters:
-
engine
(
Engine
) –The server engine created at the specified network address.
Source code in proxystore/store/dim/margo.py
set ¶
Obtain data from the client and store it in local dictionary.
Parameters:
-
handle
(
Handle
) –The client handle.
-
bulk_str
(
Bulk
) –The buffer containing the data to be shared.
-
bulk_size
(
int
) –The size of the data being transferred.
-
key
(
str
) –The data key.
Source code in proxystore/store/dim/margo.py
get ¶
Return data at a given key back to the client.
Parameters:
-
handle
(
Handle
) –The client handle.
-
bulk_str
(
Bulk
) –The buffer that will store shared data.
-
bulk_size
(
int
) –The size of the data to be received.
-
key
(
str
) –The data's key.
Source code in proxystore/store/dim/margo.py
evict ¶
Remove key from local dictionary.
Parameters:
-
handle
(
Handle
) –The client handle.
-
bulk_str
(
str
) –The buffer that will store shared data.
-
bulk_size
(
int
) –The size of the data to be received.
-
key
(
str
) –The data's key.
Source code in proxystore/store/dim/margo.py
exists ¶
Check if key exists within local dictionary.
Parameters:
-
handle
(
Handle
) –The client handle.
-
bulk_str
(
str
) –The buffer that will store shared data.
-
bulk_size
(
int
) –The size of the data to be received.
-
key
(
str
) –The data's key.