Interface DistributedBackend
- All Superinterfaces:
AlgorithmProvider, Backend, ComputeBackend, DistributedComputingProvider
- All Known Implementing Classes:
MPIDistributedBackend, SparkDistributedBackend
Backend interface for distributed computing systems.
Extends ComputeBackend to bridge the distributed computing subsystem
with the unified backend infrastructure. Also implements
DistributedComputingProvider so that distributed backends are
discoverable via the algorithm provider registry.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExecutionContextDefault implementation ofComputeBackend.createContext().default HardwareAcceleratorReturns the type of hardware accelerator used by this backend.default StringReturns the unique category of the algorithm.intReturns the number of available distributed nodes.default intResolves the diamond-conflict betweenComputeBackend(viaBackend) andDistributedComputingProvider(viaAlgorithmProvider), both of which definegetPriority().default StringgetType()Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").booleanResolves the method conflict betweenandinvalid reference
Backend#isAvailable()AlgorithmProvider.isAvailable().default voidshutdown()Called when the application is shutting down or the backend is being replaced.default booleanChecks if this backend supports parallel operations.Methods inherited from interface AlgorithmProvider
description, getMetadata, getName, scoreMethods inherited from interface Backend
getAlgorithmProviders, getName, getStatusMessage, isExplicitlyDisabledMethods inherited from interface ComputeBackend
createBackend, getDescription, getId, supportsComplexNumbers, supportsFloatingPointMethods inherited from interface DistributedComputingProvider
createDistributedContext
-
Method Details
-
getNodeCount
int getNodeCount()Returns the number of available distributed nodes.- Returns:
- the node count
-
getType
-
supportsParallelOps
default boolean supportsParallelOps()Description copied from interface:ComputeBackendChecks if this backend supports parallel operations.- Specified by:
supportsParallelOpsin interfaceComputeBackend- Returns:
- true if parallel execution is supported
-
getAcceleratorType
Description copied from interface:ComputeBackendReturns the type of hardware accelerator used by this backend.- Specified by:
getAcceleratorTypein interfaceComputeBackend- Returns:
- the accelerator type
-
getAlgorithmType
Description copied from interface:AlgorithmProviderReturns the unique category of the algorithm.- Specified by:
getAlgorithmTypein interfaceAlgorithmProvider
-
getPriority
default int getPriority()Resolves the diamond-conflict betweenComputeBackend(viaBackend) andDistributedComputingProvider(viaAlgorithmProvider), both of which definegetPriority().- Specified by:
getPriorityin interfaceAlgorithmProvider- Specified by:
getPriorityin interfaceBackend
-
isAvailable
boolean isAvailable()Resolves the method conflict betweenandinvalid reference
Backend#isAvailable()AlgorithmProvider.isAvailable().- Specified by:
isAvailablein interfaceAlgorithmProvider- Specified by:
isAvailablein interfaceBackend
-
createContext
Default implementation ofComputeBackend.createContext().Wraps the result of
DistributedComputingProvider.createDistributedContext()in aDistributedExecutionContextadapter.- Specified by:
createContextin interfaceComputeBackend- Returns:
- new execution context
-
shutdown
default void shutdown()Description copied from interface:BackendCalled when the application is shutting down or the backend is being replaced. Use this to release hardware resources, close file handles, or stop background threads.- Specified by:
shutdownin interfaceAlgorithmProvider- Specified by:
shutdownin interfaceBackend
-