hexafluoride / Chordette

Simplified implementation of the Chord DHT model for learning purposes
MIT License
4 stars 3 forks source link

Dockerize Peer Nodes + Deploy Load-Balanced Kubernetes Swarm #4

Closed Bonifatius94 closed 4 years ago

Bonifatius94 commented 4 years ago

Hi hexafluoride,

great work! But wouldn't it be nice to deploy your peers as docker microservice containers? I've seen that your code already uses the localhost network interface, so communication between real nodes via ethernet should already be possible.

The solution is not too hard, as Microsoft offers official docker images with pre-installed dotnet core on DockerHub, so the Dockerfile for creating images is pretty simple by implementing following commands (see https://docs.docker.com/engine/examples/dotnetcore/): 1) copy the source code into the image 2) build the source code, do some unit tests and package the build output 3) copy the binary files to the runtime image 4) create an entrypoint that starts a daemon process serving a chord protocol endpoint

Starting real peer tests could be done by some kubernetes files, starting a load-balanced swarm of peers that can then be triggered from outside to perform some key lookups as test.

I don't know the focus of this project, but I could help you with the dockerization if you're interested.

Best wishes Marco

hexafluoride commented 4 years ago

Sorry, bit of a late comment, but hexafluoride/Harmony is actually designed to be run in a k8s swarm (and I have for months in the past). Not sure if you're interested in the project itself, but check that out if you are. I'd post the Dockerfile/pod description I used but I seem to have lost it. 😢

Bonifatius94 commented 4 years ago

Hey Hexafluoride :)

Oh that other repo looks great :) One thing I'm confused about though is the fact that I thought Harmony is a bit different from the Chord protocol afaik from my university class, but anyways ... Lots of well-known cloud dbms (like e.g. Apache Cassandra) use Harmony, so that skills seem to be worth learning.

To be honest, I haven't tried Kubernetes a lot, but I would like to. And this lost Dockerfile should be easy to recover as well if you didn't require any fancy stuff to be done there :)

I've tried to understand your source code, but I didn't get the network protocols you are planning to use there. I saw Owin HTTP, ASP.NET REST API like stuff and just bare UDP for node sync etc. Could you explain the infrastructure plan including communication protocols to me? It's really hard to understand :(

Best wishes Marco

PS: You can write me also emails at marco-troester@live.de for simplification :)