You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to expose compute capabilities of a node to DHT (so users can search for them)
Since dht does not support any types of queries, there is no way to perform something like: "any node which has between 10 and 20 cpus with or without gpu"
Another caveat is the DHT content provider only works with hashes.
So, we need to expose the full capabilities in small steps, by exposing hashes of well known json structures.
Example:
By calculating the hash of the below string, we can serve as a provider of 2 CPUS, 1 Gb of RAM
If a host has 12 cpus and 10 gb of RAM, they will announce all combinations:
1 cpu, 1 GB of RAM
2 cpu, 1 GB of RAM
3 cpu, 1 GB of RAM
.....
12 cpu, 1 GB of RAM
1 cpu, 2 GB of RAM
2 cpu, 2 GB of RAM
...
On pseudocode, this will look like:
for arch in SUPPORTED_ARCHS:
for cpu=1 to TOTAL_CPUS in steps of 1:
for ram = 1Gb to TOTAL_RAM in steps of 1GB:
hash=calculate_hash(JSON.stringify({ "arch":arch,"cpus":cpu , "memory": ram})
announce provider for hash
On the client side, the flow will be the following:
get from user the required specs
search DHT and get a list with nodes providing that type of resource
do additional check through status and getComputeEnvs
The text was updated successfully, but these errors were encountered: