node
Last updated: 2025-11-05 01:14:42.601435 File source: link on GitLab
node
Table of Contents
Specification
proposed Description
proposed DescriptionThis package is responsible for creation of a Node object which is the main actor residing on the machine as long as DMS is running. The Node gets created when the DMS is onboarded.
The Node is responsible for:
Communicating with other actors (nodes and allocations) via messages. This will include sending bid requests, bids, invocations, job status etc
Checking used and free resource before creating allocations
Continuous monitoring of the machine
Structure and Organisation
Here is quick overview of the contents of this pacakge:
README: Current file which is aimed towards developers who wish to use and modify the DMS functionality.
Class Diagram
The class diagram for the node package is shown below.
Source file
Rendered from source file
Functionality
TBD
Note: the functionality of DMS is being currently developed. See the proposed section for the suggested design of interfaces and methods.
Data Types
TBD
Note: the functionality of DMS is being currently developed. See the proposed section for the suggested data types.
Testing
proposed Refer to *_test.go files for unit tests of different functionalities.
Proposed Functionality / Requirements
List of issues
All issues that are related to the implementation of dms package can be found below. These include any proposals for modifications to the package or new functionality needed to cover the requirements of other packages.
Interfaces & Methods
proposed Node_interface
getAllocation method retrieves an Allocation on the machine based on the provided AllocationID.
checkAllocationStatus method will retrieve status of an Allocation.
routeToAllocation method will route a message to the Allocation of the job that is running on the machine.
benchmarkCapability method will perform machine benchmarking
setRegisteredCapability method will record the benchmarked Capability of the machine into a persistent data store for retrieval and usage (mostly in job orchestration functionality)
getRegisteredCapability method will retrieve the benchmarked Capability of the machine from the persistent data store.
setAvailableCapability method changes the available capability of the machine when resources are locked
getAvailableCapability method will return currently available capability of the node
lockCapability method will lock certain amount of resources for a job. This can happen during bid submission. But it must happen once job is accepted and before invocation.
getLockedCapabilities method retrieves the locked capabilities of the machine.
setPreferences method sets the preferences of a node as dms.orchestrator.CapabilityComparator
getPreferences method retrieves the node preferences as dms.orchestrator.CapabilityComparator
getRegisteredBids method retrieves list of bids receieved for a job.
startAllocation method will create an allocation based on the invocation received.
Data types
proposed dms.node.Node
An initial data model for Node is defined below.
proposed dms.node.NodeID
References
Last updated

