Backend API#

class dataclay.backend.api.BackendAPI(name: str, port: int, kv_host: str, kv_port: int)[source]#
activate_tracing(task_id)[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

deactivate_tracing()[source]#
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

Parameters:
  • 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

flush_all()[source]#
get_object_properties(object_id: UUID) bytes[source]#

Returns the properties of the object with ID provided

Parameters:

object_id – ID of the object

Returns:

The pickled properties of the object.

get_retained_references()[source]#
get_traces()[source]#
is_ready(timeout: float | None = None, pause: float = 0.5)[source]#
make_persistent(serialized_objects: Iterable[bytes])[source]#
move_all_objects()[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).

Parameters:

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

Returns:

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.

Parameters:
  • 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.

Parameters:
  • 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]#
shutdown()[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

Parameters:
  • 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

update_refs(ref_counting)[source]#

forward to SL