Distributed Dictionary API
C Reference
Description
Dragon Distributed Dictionary supports C/C++ user APIs, allowing C/C++ clients to
interact with the dictionary like a map. The internal design of C client is similar
to Python client, except for the way clients are created. User must create Dragon
Distributed Dictionary through Python API, and create processes to run dictionary C++
client program using dragon.native.Popen
. Each process stands for exactly a single
client, and it should attach to only a single dictionary throughout the program. In
the C++ program, the client uses the the argument serialized dictionary to attatch
to the dictionary created earlier through Python API.
Please note that creating multiple client processes inside a single C/C++ program using
fork()
is not supported in Dragon Distributed Dictionary. You must create client processes
from Python API and attach to the dictionary in the C++ program.
For C++ client, the data written into dictionary must be serializable. Under this
requirement, user must implement the serializable class based on the existing DDictSerializable
interface. The functions serialize
and deserialize
are used while writing and reading
data from the dictionary, while the function create
is used to reconstruct the key when
we request a list of keys from the dictionary. The example below demonstrates implementation
of the interface DDictSerializable
that is defined in dragon/dictionary.hpp
.
1// serializable int
2#include <dragon/dictionary.hpp>
3
4class SerializableInt : public DDictSerializable {
5 public:
6 SerializableInt();
7 SerializableInt(int x);
8 virtual void serialize(dragonDDictRequestDescr_t* req, const timespec_t* timeout);
9 virtual void deserialize(dragonDDictRequestDescr_t* req, const timespec_t* timeout);
10 static SerializableInt* create(size_t num_bytes, uint8_t* data);
11 int getVal() const;
12
13 private:
14 int val=0;
15};
16
17SerializableInt::SerializableInt(): val(0) {}
18SerializableInt::SerializableInt(int x): val(x) {}
19
20SerializableInt* SerializableInt::create(size_t num_bytes, uint8_t* data) {
21 auto val = new SerializableInt((int)*data);
22 free(data);
23 return val;
24}
25
26void SerializableInt::serialize(dragonDDictRequestDescr_t* req, const timespec_t* timeout) {
27 dragonError_t err;
28 err = dragon_ddict_write_bytes(req, sizeof(int), (uint8_t*)&val);
29 if (err != DRAGON_SUCCESS)
30 throw DragonError(err, dragon_getlasterrstr());
31}
32
33void SerializableInt::deserialize(dragonDDictRequestDescr_t* req, const timespec_t* timeout) {
34 dragonError_t err = DRAGON_SUCCESS;
35 size_t actual_size;
36 uint8_t * received_val = nullptr;
37 size_t num_val_expected = 1;
38
39
40 err = dragon_ddict_read_bytes(req, sizeof(int), &actual_size, &received_val);
41 if (err != DRAGON_SUCCESS)
42 throw DragonError(err, dragon_getlasterrstr());
43
44 if (actual_size != sizeof(int))
45 throw DragonError(DRAGON_INVALID_ARGUMENT, "The size of the integer was not correct.");
46
47 val = *reinterpret_cast<int*>(received_val);
48
49 free(received_val);
50
51 err = dragon_ddict_read_bytes(req, sizeof(int), &actual_size, &received_val);
52
53 if (err != DRAGON_EOT) {
54 fprintf(stderr, "Did not received expected EOT, ec: %s\ntraceback: %s\n", dragon_get_rc_string(err), dragon_getlasterrstr());
55 fflush(stderr);
56 }
57}
58
59int SerializableInt::getVal() const {return val;}
60
61// begin user program
62int main(int argc, char* argv[]) {
63 const char* ddict_ser = argv[1]; // serialized dictionary
64 SerializableInt x(6); // key
65 SerializableInt y(42); // value
66
67 // attach current process to the dictionary
68 DDict<SerializableInt, SerializableInt> dd(ddict_ser, &TIMEOUT);
69 // write
70 dd[x] = y
71 // read
72 SerializableInt received_val = dd[x];
73 assert received_val.getVal() == y.getVal();
74 // get list of keys
75 auto dd_keys = dd.keys();
76 assert(dd.size() == 1);
77 for (int i=0; i<dd_keys.size() ; i++)
78 int val = dd_keys[i]->getVal();
79}
Under certain conditions where sharing data across processes is necessary, FLI
(i.e. File Like Interfaces) serves as a mean of communication
among processes. Each FLI is created from stream channels. To create a FLI from C/C++
dictionary client, the user can create channels using API dragon_create_process_local_channel
from dragon/channels.h
. You can then create FLI using the API dragon_fli_create
from
dragon/fli.h
and retrieve the serialized FLI by calling dragon_fli_serialize
. By doing this,
any process can send or receive content after deserializing and attaching to the serialized FLIs.
Structures
-
struct dragonDDictKey_t
- #include <ddict.h>
A Key Structure.
When retrieving keys from a dictionary, this structure is used to provide a pointer to the serialized data and its length.
-
struct dragonDDictDescr_t
- #include <ddict.h>
An opaque DDict descriptor object.
When a using a distributed dictionary from C, this serves as the handle to the dictionary. Attaching to a distributed dictionary intializes a dragonDDictDescr_t.
-
struct dragonDDictRequestDescr_t
- #include <ddict.h>
An opaque handle to a request object.
This is used when doing any interaction with the distributed dictionary. Operations on the dictionary may involve multiple call, such as a put or a get operation, and this request descriptor helps maintain the state of the request and response to this request.
Lifecycle Management
-
dragonError_t dragon_ddict_serialize(const dragonDDictDescr_t *obj, const char **serial)
Serialize a DDict object for sharing with another process. When sharing a DDict object with another process you may use this function to create a shareable serialized descriptor. This creates an ASCII compliant string that may be shared. This call mallocs the space occupied by the serial pointer that is returned.
NOTE: You must call free to free the serialized descriptor after calling this function to free the space allocated by this function once you are done with the serialized descriptor.
- Parameters:
obj – is a valid DDict descriptor that has previously been created or attached.
serial – is a serialized descriptor that will be initialized with the correct byte count and serialized bytes for so it can be passed to another process.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_attach(const char *serial, dragonDDictDescr_t *obj, timespec_t *timeout)
Attach to a DDict object.
Calling this attaches to a DDict object by using a serialized DDict descriptor that was passed to this process. The serialized DDict descriptor must have been created using the dragon_ddict_serialize function.
- Parameters:
serial – is a pointer to the serialized DDict descriptor.
obj – is a pointer to a DDict descriptor that will be initialized by this call.
timeout – is a timeout in every request and operation.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_detach(dragonDDictDescr_t *obj)
Detach from a DDict object.
All internal, process local resources are freed by making this call.
- Parameters:
obj – is a descriptor and opaque handle to the DDict object.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
Request Management
-
dragonError_t dragon_ddict_create_request(const dragonDDictDescr_t *obj, const dragonDDictRequestDescr_t *req)
Create a request descriptor for making a request to the distributed dictionary.
All internal state of the connection to the distributed dictionary is maintained by this request object. Details of particular operations may be stored in the private data structure for this object but are not accessible directly by the user. The user uses associated API calls that use this object. Not every request requires a request object. Requests that are accomplished by one API call are not dependent on a request object. When a request object is required it will be evident in the API.
- Parameters:
obj – is a valid DDict descriptor that has previously been created or attached.
req – is a pointer to a request object that will be initialized by this call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_finalize_request(const dragonDDictRequestDescr_t *req)
This finalizes a request by completing any operation that was still pending for this request. When a request object is required it will be indicated in the API.
- Parameters:
req – is a valid request object.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
Send/Recv Functions
-
dragonError_t dragon_ddict_write_bytes(const dragonDDictRequestDescr_t *req, size_t num_bytes, uint8_t *bytes)
Writes either key or value data to the distributed dictionary.
The client may call this multiple times to put the parts of a key or value to the distributed dictionary. Internally, all key writes are buffered so the key can then be used to determine where the data is to be placed in the distributed dictionary. All value writes are streamed immediately to the distributed dictionary. All Key writes must come first for a request, followed by value writes. Key writes are terminated by an API call to the actual operation that requires a key as part of its request. Value writes, for a put, follow the API call for the operation until the request is finalized. All clients use the same selection algorithm for data placement so data put by one client can be found by all other clients.
- Parameters:
req – is an initialized request object.
num_bytes – is the number of bytes on this put request. There may be additional bytes sent using this call as well.
bytes – is a pointer to a byte array (continguous bytes) with num_bytes size.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_read_bytes(const dragonDDictRequestDescr_t *req, size_t requested_size, size_t *received_size, uint8_t **bytes)
Waits to receive streamed data from a distributed dictionary manager.
If all data has been read, then DRAGON_EOT will be returned as the return code. This should be called after a get operation has been performed by calling dragon_ddict_get. Note that before calling the get operation, the key should have been written using the dragon_ddict_write_bytes operation.
- Parameters:
req – is a valid request object that has been used to initiate reading data from the distributed dictionary. For example, a key should have been written and dragon_ddict_get should have been called.
requested_size – is the number of requested bytes. The actual size will be equal to or less than the requested_size.
received_size – is a pointer to the number of bytes that have been read on the call (assuming DRAGON_SUCCESS was returned).
bytes – is a pointer pointer that will be initialized to the bytes that were read. The space is malloc’ed and should be freed by the user once the data has been processed.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_read_bytes_into(const dragonDDictRequestDescr_t *req, size_t requested_size, size_t *received_size, uint8_t *bytes)
Receive streamed data.
Calling this waits to receive streamed data from a distributed dictionary manager. If all data has been read, then DRAGON_EOT will be returned as the return code. This should be called after a get operation has been performed by calling dragon_ddict_get. Note that before calling the get operation, the key should have been written using the dragon_ddict_write_bytes operation.
- Parameters:
req – is a valid request object that has been used to initiate reading data from the distributed dictionary. For example, a key should have been written and dragon_ddict_get should have been called.
requested_size – is the number of requested bytes. The actual size will be equal to or less than the requested_size.
received_size – is a pointer to the number of bytes that have been read on the call (assuming DRAGON_SUCCESS was returned).
bytes – is a pointer to valid space where the data should be placed. It must be at least requested_size in size.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_read_mem(const dragonDDictRequestDescr_t *req, dragonMemoryDescr_t *mem)
Receive streamed data.
Calling this waits to receive streamed data from a distributed dictionary manager but instead of copying it into malloced memory, returns the underlying managed memory object to the user. If all data has been read, then DRAGON_EOT will be returned as the return code. This should be called after a get operation has been performed by calling dragon_ddict_get. Note that before calling the get operation, the key should have been written using the dragon_ddict_write_bytes operation.
- Parameters:
req – is a valid request object that has been used to initiate reading data from the distributed dictionary. For example, a key should have been written and dragon_ddict_get should have been called.
mem – is a managed memory allocation containing the packet of streamed data. The size of the memory allocation is available as part of the object and the managed memory API provides a means to get a pointer to the data. The managed memory allocation should be freed using the managed memory API once it is no longer needed.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
Dictionary Operations
-
dragonError_t dragon_ddict_contains(const dragonDDictRequestDescr_t *req)
Calling this tells the ddict client to take the key already written via the dragon_ddict_write_bytes call(s) to be posted to the correct manager and wait for a response.
- Parameters:
req – is a valid created request object. It must have already had a key written to it via the dragon_ddict_write_bytes call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_get(const dragonDDictRequestDescr_t *req)
Calling this tells the ddict client to take the key already written via the dragon_ddict_write_bytes call(s) to be posted to the correct manager and wait for a response.
- Parameters:
req – is a valid created request object. It must have already had a key written to it via the dragon_ddict_write_bytes call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_put(const dragonDDictRequestDescr_t *req)
Calling this tells the ddict client to take the key already written via the dragon_ddict_write_bytes call(s) to be posted to the correct manager. The key must be written before calling put. All writes to this request, following the call to this function are written to the correct manager as the value for the put on the distributed dictionary manager.
- Parameters:
req – is a valid created request object. It must have already had a key written to it via the dragon_ddict_write_bytes call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_pput(const dragonDDictRequestDescr_t *req)
Calling this tells the ddict client to take the key already written via the dragon_ddict_write_bytes call(s) to be posted to the correct manager. The key must be written before calling put. All writes to this request, following the call to this function are written to the correct manager as the value for the put on the distributed dictionary manager.
- Parameters:
req – is a valid created request object. It must have already had a key written to it via the dragon_ddict_write_bytes call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_length(const dragonDDictDescr_t *dd_descr, uint64_t *length)
Calling this retrieves the number of keys in the distributed dictionary.
- Parameters:
dd_descr – is a serialized descriptor of the dictionay.
length – is a pointer to an uint64_t that will hold the number of keys up return from the function call when DRAGON_SUCCESS is returned as the return code. Otherwise, the field will not be initialized.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_clear(const dragonDDictDescr_t *dd_descr)
This removes all key/value pairs from the distributed dictionary.
- Parameters:
dd_descr – is a serialized descriptor of the dictionay.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_pop(const dragonDDictRequestDescr_t *req)
Calling this tells the ddict client to take the key already written via the dragon_ddict_write_bytes call(s) to be posted to the correct manager. The key must be written before calling put. All writes to this request, following the call to this function are written to the correct manager as the value for the put on the distributed dictionary manager.
- Parameters:
req – is a valid created request object. It must have already had a key written to it via the dragon_ddict_write_bytes call.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_keys(const dragonDDictDescr_t *dd_descr, dragonDDictKey_t ***keys, size_t *num_keys)
Calling this tells the ddict client to send request to all managers to get all keys.
- Parameters:
dd_descr – is a serialized descriptor of the dictionay.
keys – is a pointer to an byte array that store an array of keys following the response from managers.
num_keys – is a pointer to the number of keys received.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_stats(const dragonDDictDescr_t *dd_descr)
Calling this to get the stats of all managers.
- Parameters:
dd_descr – is a serialized descriptor of the dictionay.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_checkpoint(const dragonDDictDescr_t *dd_descr)
Calling this to move to the next checkpoint.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_rollback(const dragonDDictDescr_t *dd_descr)
Calling this to rollback to one earlier checkpoint.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_sync_to_newest_checkpoint(const dragonDDictDescr_t *dd_descr)
Calling this to get latest checkpoints from all managers and set current checkpoint to the newest among all managers.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_current_checkpoint_id(const dragonDDictDescr_t *dd_descr, uint64_t *chkpt_id)
Calling this to get client’s current checkpoint ID.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
chkpt_id – is a pointer to the checkpoint ID
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_local_manager(const dragonDDictDescr_t *dd_descr, uint64_t *local_manager_id)
Get client’s local manager if there is one.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
local_manager_id – is a pointer to the local manager ID.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_main_manager(const dragonDDictDescr_t *dd_descr, uint64_t *main_manager)
Get client’s main manager.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
main_manager – is a pointer to the main manager ID.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_manager(const dragonDDictDescr_t *dd_descr, dragonDDictDescr_t *dd_new_descr, uint64_t id)
Create a copy of original client object and assign a chosen manager. The client will only interact with the chosen manager.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
dd_new_descr – is a DDict descriptor that holds a copy of client from dd_descr with the chosen manager.
id – is a pointer to the chosen manager ID.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_empty_managers(const dragonDDictDescr_t *dd_descr, uint64_t **manager_ids, size_t *num_empty_managers)
Return a list of empty managers during restart.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
manager_ids – is the address of an array of empty managers’ IDs.
num_empty_managers – is the number of empty managers.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_local_managers(const dragonDDictDescr_t *dd_descr, uint64_t **local_manager_ids, size_t *num_local_managers)
Return local manager IDs.
- Parameters:
dd_descr – is a valid DDict descriptor that has previously been created or attached.
local_manager_ids – is an array of local manager IDs.
num_local_managers – is the number of local managers.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_local_keys(const dragonDDictDescr_t *dd_descr, dragonDDictKey_t ***local_keys, size_t *num_local_keys)
Return the DDict keys that are located on the same node as the caller.
- Parameters:
dd_descr – is a serialized descriptor of the dictionary.
keys – is a pointer to an byte array that store an array of local keys following the response from local managers.
num_keys – is a pointer to the number of local keys received.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_synchronize(const char **serialized_ddicts, const size_t num_serialized_ddicts, timespec_t *timeout)
Calling this tells the ddict client to synchronize dictionaries.
- Parameters:
serialized_ddicts – is a list of serialized descriptor of the dictionaries to synchronize.
num_serialized_ddicts – is the number of dictionaries to synchronize.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
-
dragonError_t dragon_ddict_clone(const dragonDDictDescr_t *dd_descr, const char **serialized_ddicts, const size_t num_serialized_ddicts)
Calling this tells the ddict client to clone dictionaries.
- Parameters:
dd_descr – is a serialized descriptor of the source dictionary.
serialized_ddicts – is a list of serialized descriptor of the destination dictionaries.
num_serialized_ddicts – is the number of destination dictionaries.
- Returns:
DRAGON_SUCCESS or a return code to indicate what problem occurred.
Messages
DDRandomManager
- type enum
DD_RANDOM_MANAGER
- purpose
Client request a main manager from Orchestrator. This is for off-node bringup for a client.
fields
- response_fli
string
b64 encoded serialized response fli.
- see also
DDRandomManagerResponse, DDRegisterClient, DDConnectToManager
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRandomManagerResponse
- type enum
DD_RANDOM_MANAGER_RESPONSE
- purpose
Orchestrator return fli of a main manager for clients to request connection to other managers.
fields
- mainFLI
string
b64 encoded serialized main fli of the manager.
- see also
DDRandomManager
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRegisterClient
- type enum
DD_REGISTER_CLIENT
- purpose
Obtain unique client id from main manager and register client id to main manager.
fields
- response_fli
string
b64 encoded serialized fli for response.
- buffered_response_fli
string
b64 encoded serialized fli for buffered response.
- see also
DDRegisterClientResponse, DDRegisterClientID
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRegisterClientResponse
type enum
DD_REGISTER_CLIENT_RESPONSE
- purpose
Provide the unique client id and number of managers.
fields
- client_id
uint32
unique for this client.
- num_managers
uint32
number of managers in the dictionary.
- manager_id
uint32
id of of the main manager to the client.
- timeout
uint32
timeout of the dictionary, same as the timeout in the initialization.
- see also
DDRegisterClient
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDRegisterManager
- type enum
DD_REGISTER_MANAGER
- purpose
Manager registers with Orchestrator and get a list of managers from Orchestrator.
fields
- response_fli
string
b64 encoded serialized fli for the response to this request.
- mainFLI
string
b64 encoded serialized fli for the main channel for the manager.
- see also
DDRegisterManagerResponse
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRegisterManagerResponse
- type enum
DD_REGISTER_MANAGER_RESPONSE
- purpose
Provide the acknowledgement that the manager is registered and a list of managers. This serves as a synchronization point for client/manager interaction. Clients can request other manager’s fli from the main manager assigned to them.
fields
- manager_id
uint32
unique for this manager.
- managers
list
a list of b64 encoded serialized flis for the main channels of all managers.
- see also
DDRegisterManager
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDConnectToManager
- type enum
DD_CONNECT_TO_MANAGER
- purpose
Obtain the manager mainFLI from the main manager so a client can attach to the manager.
fields
- client_id
uint32
unique client id assigned by main manager.
- manager_id
uint32
the ID of the manager that client requests to connect to.
- see also
DDConnectToManagerResponse
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDConnectToManagerResponse
- type enum
DD_CONNECT_TO_MANAGER_RESPONSE
- purpose
return the mainFLI of the manager whose ID was provided on the request.
fields
- mainFLI
string
b64 encoded serialized fli for the main channel for the manager.
- see also
DDConnectToManager
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRegisterClientID
- type enum
DD_REGISTER_CLIENT_ID
- purpose
Register the client ID and associated client response fli with a manager so the response fli does not need to be included in future messages and client ID can be used instead.
fields
- client_id
uint32
unique client id assigned by main manager.
- response_fli
string
b64 encoded serialized response fli for client requests.
- buffered_response_fli
string
b64 encoded serialized response fli for client requests.
- see also
DDRegisterClientIDResponse, DDRegisterClient
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDRegisterClientIDResponse
- type enum
DD_REGISTER_CLIENT_ID_RESPONSE
- purpose
Provide the acknowledgement that the client is registered with the manager. This serves as a synchronization point for client/manager interaction.
fields
None other than the err field which will hold a dragon return code.
- see also
DDRegisterClientID, DDRegisterClient
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDDestroy
- type enum
DD_DESTROY
- purpose
Sent by a client to the orchestrator to destroy the distributed dictionary.
fields
- client_id
uint32
The client id of the requesting client.
- response_fli
string
b64 encoded serialized response fli.
- see also
DDDestroyResponse, DDDestroyManager
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDDestroyResponse
- type enum
DD_DESTROY_RESPONSE
- purpose
Provide the acknowledgement that the distributed dictionary destruction has completed.
fields
None other than the err field which will hold a dragon return code.
- see also
DDDestroy
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDDestroyManager
- type enum
DD_DESTROY_MANAGER
- purpose
Sent by the orchestrator to destroy a distributed manager.
fields
- response_fli
string
b64 encoded serialized response fli.
- see also
DDDestroyManagerResponse, DDDestroy
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDDestroyManagerResponse
- type enum
DD_DESTROY_MANAGER_RESPONSE
- purpose
Provide the acknowledgement that the distributed dictionary manager destruction has completed.
fields
None other than the err field which will hold a dragon return code.
- see also
DDDestroyManager
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDPut
- type enum
DD_PUT
- purpose
Sent by a client to put a key/value pair into the distributed dictionary. It is sent to a particular manager which is chosen by pre-hashing the key and dividing modulo the number of managers.
fields
- client_id
uint32
The client id of the requesting client.
- chkpt_id
uint64
The checkpoint identifier for this operation.
- persist
bool
Persistent or non-persisting key.
NOTE The key and value are written separately from the message using the fli api.
- see also
DDPutResponse
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDPutResponse
- type enum
DD_PUT_RESPONSE
- purpose
Provide the acknowledgement that the distributed dictionary manager that the put has completed.
fields
None other than the err field which will hold a dragon return code.
- see also
DDPut
Refer to the cfs section for additional response message fields.
implementation(s):
Python
DDGet
- type enum
DD_GET
- purpose
Sent by a client to a manager to get a value for a key.
fields
- client_id
uint32
The client id of the requesting client.
- chkpt_id
uint64
The checkpoint identifier for this operation.
NOTE The key is written separately from the message using the fli api.
- see also
DDGetResponse
Refer to the cfs section for additional request message fields.
implementation(s):
Python
DDGetResponse
- type enum
DD_GET_RESPONSE
- purpose
Provide the value for the associated key or an error code indicating what happened.
fields
None other than the err field which will hold a dragon return code.
NOTE The value is written separately from the message using the fli api.
- see also
DDGet
Refer to the cfs section for additional response message fields.
implementation(s):
Python