Backend API

class dataclay.backend.api.BackendAPI(name: str, port: int, backend_id: UUID, kv_host: str, kv_port: int)[source]
async call_active_method(object_id: UUID, method_name: str, args: tuple, kwargs: dict) tuple[bytes, bool][source]

Entry point for calling an active method of a DataClayObject

async change_object_id(object_id: UUID, new_object_id: UUID)[source]
async consolidate_object_version(object_id: UUID)[source]

Consolidates the object with ID provided

async del_object_attribute(object_id: UUID, attribute: str) tuple[bytes, bool][source]

Deletes an object attibute with ID provided

federate(session_id, object_id, external_execution_env_id, recursive)[source]

Federate object with id provided to external execution env id specified

  • session_id – id of the session federating objects

  • object_id – id of object to federate

  • external_execution_id – id of dest external execution environment

  • recursive – indicates if federation is recursive

async flush_all()[source]
async get_object_attribute(object_id: UUID, attribute: str) tuple[bytes, bool][source]

Returns value of the object attibute with ID provided :param object_id: ID of the object :param attribute: Name of the attibute


The pickled value of the object attibute. If it’s an exception or not

async get_object_properties(object_id: UUID) bytes[source]

Returns the properties of the object with ID provided


object_id – ID of the object


The pickled properties of the object.

async is_ready(timeout: float | None = None, pause: float = 0.5)[source]
async make_persistent(serialized_objects: Iterable[bytes])[source]
async move_all_objects()[source]
async new_object_replica(object_id: UUID, backend_id: UUID = None, recursive: bool = False, remotes: bool = True)[source]
async new_object_version(object_id: UUID)[source]

Creates a new version of the object with ID provided

This entrypoint for new_version is solely for COMPSs (called from java).


object_id – ID of the object to create a new version from.


The JSON-encoded metadata of the new DataClayObject version.

notify_federation(session_id, objects_to_persist)[source]

This function will deserialize object “parameters” (i.e. object to persist and subobjects if needed) into dataClay memory heap using the same design as for volatile parameters. This function processes objects recieved from federation calls.

  • session_id – ID of session of federation call

  • objects_to_persist – [num_params, imm_objs, lang_objs, vol_params, pers_params]

notify_unfederation(session_id, object_ids)[source]

This function is called when objects are unfederated.

  • session_id – ID of session of federation call

  • object_ids – List of IDs of the objects to unfederate

async proxify_object(object_id: UUID, new_object_id: UUID)[source]

Proxify object with ID provided to new object ID

async register_objects(serialized_objects: Iterable[bytes], make_replica: bool)[source]
async send_objects(object_ids: Iterable[UUID], backend_id: UUID, make_replica: bool, recursive: bool, remotes: bool)[source]
async set_object_attribute(object_id: UUID, attribute: str, serialized_attribute: bytes) tuple[bytes, bool][source]

Updates an object attibute with ID provided

async stop()[source]
synchronize(session_id, object_id, implementation_id, serialized_value, calling_backend_id=None)[source]
unfederate(session_id, object_id, external_execution_env_id, recursive)[source]

Unfederate object in external execution environment specified

  • session_id – id of session

  • object_id – id of the object

  • external_execution_env_id – external ee

  • recursive – also unfederates sub-objects

async update_object_properties(object_id: UUID, serialized_properties: bytes)[source]

Updates an object with ID provided with contents from another object