Reusing battle-tested tooling for WATER #7
Replies: 1 comment 4 replies
|
@thedevyashsaini at the earliest version of WATER (as we are literally an empty repository right now), we could make safe assumptions to ensure our project remains within the 350 hours of coding period. Surely there will be firewalls in healthcare networks. We might find ways to handle this, perhaps making the healthcare networks to communicate first. But we may not need to handle all of those by this summer. Just to be aware: this execution might be decentralized (no administratively centralized), rather than just being distributed. Something to be aware of when we make an architecture such as a Kubernetes-based deployment. As a new project, we are open to alternative approaches and there is no solid right or wrong approaches as long as it works. |
Uh oh!
There was an error while loading. Please reload this page.
Hey mentors, I was hoping to give my 2 cents regarding the discussions and the alternate approach I had in mind.
After getting clarification from a previous discussion (referring to this comment: #2 (reply in thread))
At a high level, WATER seems to be something like this REGARDLESS of how different people and their proposals phrase it:
If we implemented the whole thing FROM SCRATCH in the most straightforward way, this is roughly what we would end up building.
Basically, it’s a pretty straightforward distributed orchestration setup - edge nodes register themselves, send telemetry via heartbeats, workflows get ingested at the controller, an allocation engine decides where they should run, and the dispatcher triggers execution on the selected node.
But looking at it more carefully, this clearly introduces a lot of moving parts. And the more I thought about it, the more it felt like we would basically be reinventing something very close to Kubernetes, just for a slightly different use case.
Considering that this is meant to support HEALTHCARE infrastructure, I feel that prioritizing battle-tested architecture over the “more straightforward” approach is important, since ignoring an edge case in distributed infrastructure can easily cause SERIOUS issues.
That led me to a second approach that seemed more stable and realistic -- building WATER as a control layer on top of k8s rather than implementing everything from scratch.
In that model-
Edge or cloud nodes join a WATER k8s cluster
Nodes can be separated via namespaces to represent privacy levels (for example hospital nodes = high privacy, cloud nodes = lower privacy)
node-exporter and dcgm-exporter can expose CPU / memory / disk / GPU telemetry
WATER ingests workflows, parses the requirements, and then schedules workloads using k8s primitives like -
namespaces
node selectors
affinity / anti-affinity rules
In other words, Kubernetes would handle the actual scheduling, while WATER acts more like an allocation middleware / control layer that translates workflows into k8s jobs.
This way we avoid reinventing a lot of infrastructure that k8s already handles very well.
If we needed some additional functionality on the nodes, we could potentially ship a small sidecar and wrap the join process in a CLI script that -
kubeadm joinso a single command prepares the node and joins it to the WATER cluster.
However, this introduces the first potential issue.
Hospital machines (edge nodes) may be behind NAT or firewalls that block inbound connections. Even if we solve connectivity using something like VPC peering, there are still a few structural issues with running a standard k8s control plane across distant edge nodes -
These issues could make a vanilla Kubernetes deployment difficult for this use case.
Because of that, I started looking into KubeEdge, which seems designed specifically for this kind of setup.
KubeEdge extends Kubernetes with CloudCore and EdgeCore, where edge nodes connect to the control plane via outbound connections (WebSocket / MQTT), which helps bypass firewall restrictions and network boundaries.
It also allows edge nodes to continue operating locally using a local database and MQTT even if the connection to the control plane drops.
So the architecture in that case becomes something like:
WATER controller layer → Kubernetes → KubeEdge (CloudCore + EdgeCore)
This seems to solve the network boundary problem quite nicely.
The remaining issue I see is this -
If some cloud nodes are already part of existing k8s clusters (for example CPU nodes in one cluster and GPU nodes in another), then joining them into a new WATER cluster is not straightforward.
kubeletandedgecorecannot coexist, and a kubelet cannot be configured to belong to two clusters simultaneously without obv some duct-tape solution.So while KubeEdge + a WATER control layer currently seems like the most robust architecture to me, it relies on the assumption that the nodes we want to use are not already bound to existing clusters.
My current thinking is that even if they are, migrating them into a unified WATER cluster might still be a reasonable trade-off, because building a custom orchestration layer from scratch would mean re-solving a lot of reliability problems that systems like Kubernetes have already handled over many years.
So I mainly wanted clarification on two assumptions before going further with this direction -
This isn’t a proposal draft or anything like that - I mainly wanted to clarify these architectural constraints before going deeper into a specific implementation direction.
Any feedback or corrections on the assumptions above would be really helpful.
All reactions