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]#
- 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
- 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.
- 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
- 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
- Parameters:
session_id – id of session
object_id – id of the object
external_execution_env_id – external ee
recursive – also unfederates sub-objects