Backend API#

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

Consolidates the object with ID provided

detach_object_from_session(object_id, session_id)[source]#
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

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.

is_ready(timeout: float | None = None, pause: float = 0.5)[source]#
make_persistent(serialized_objects: Iterable[bytes])[source]#
new_object_replica(object_id: UUID, backend_id: UUID = None, recursive: bool = False, remotes: bool = True)[source]#
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

proxify_object(object_id: UUID, new_object_id: UUID)[source]#
register_objects(serialized_objects: Iterable[bytes], make_replica: bool)[source]#
send_objects(object_ids: Iterable[UUID], backend_id: UUID, make_replica: bool, recursive: bool, remotes: bool)[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

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

Updates an object with ID provided with contents from another object


forward to SL