Readit News logoReadit News
aabhay · 4 years ago
The amount of vitriol in this comments section is astonishing. Can we not share fun projects without the professional Kubernetes experts thumbing their noses? At the very least, it does seem now like the complexity of K8s’s code base is a point of very thin skin for the community.
thomasbacklund · 4 years ago
Thank you aabhay for a nice comment.

Seems like my click-baity title brought out some strong feelings :)

I do actually like Kubernetes. I recommend it to clients, I assess candidates who are to work with it, but I do really think it is a Beast. Because it is.

Kubernetes is like C++, extremely useful but it just keeps growing and nobody really knows all of it.

While Simplenetes is like... Lua, batteries not included, your boss will not approve, it doesnt't hit the buzzspot, but some people will secretely use it and be happy about it.

runawaybottle · 4 years ago
You just described every other software project. ‘It keeps growing and nobody really knows it all’, story of my life.

Deleted Comment

Skhalar · 4 years ago
I read vitriol as virtio and was throughly confused for a few minutes.

I was thinking why are people talking about virtio so much.

nix23 · 4 years ago
The peoples who criticize that project should be remained why Unix even came to life.
danpalmer · 4 years ago
This is ~17k lines of shell scripting and claims to be "simple". Kuberentes is probably ~1m lines of Go. I'm not entirely convinced that this is less complex (simpler) than Kubernetes.

There are many factors in complexity, but a big one for me is what I have to hold in my head – global state. From any given point, what do I need to understand to know what's actually going on.

For Go, this is actually comparatively little. Between a fairly straightforward language, static binaries, and the focus on ease of distribution, there's not a whole lot outside of a codebase itself to think about.

However for a shell like Bash there's a relatively large amount to consider. You're very exposed to the underlying OS, to libraries and system packages, to various tools, to configurations users may have specified, to things being redefined underneath you. There's a lot of global state to consider for a Bash script.

I suspect it is simpler than Kubernetes, but I don't think it's a clear cut case.

jozvolskyef · 4 years ago
To be fair Kubernetes itself probably has 17k lines of bash, and it is a good thing. It is the first go-to project that I use as a reference for bash scripting best practices.

edit: wc reports 47023 lines in *.sh[1], out of which 23836 are unique[2].

[1]: find . -name '*.sh' | xargs cat | wc -l

[2]: find . -name '*.sh' | xargs cat | sort | uniq | wc -l

oddlama · 4 years ago
You might enjoy having a look at https://github.com/AlDanial/cloc

It can distinguish between actual lines of code, comments and empty lines for a lot of different languages.

nexthash · 4 years ago
I can't believe you are being serious - why are you comparing a shell script to a million-line piece of production software? Apples to oranges. This was written as a joke to make fun of a common gripe against Kubernetes - its complexity. Seems like the Kubernetes community has a bit of a thin skin.
goblin89 · 4 years ago
If it is a joke, the README does a poor job of conveying that. It is a bit funny at first but then gets relatively serious and recommends the project for use with up to 20 containers, with the beta caveat.

Either way, setting aside the laudable amount of work put into this, talking about the issues of complexity and different forms it takes seems quite on topic. (I don't have a cow in this fight, not using K8s or anything of the sort.)

undefined1 · 4 years ago
the 30 million line problem;

https://caseymuratori.com/blog_0031

intricatedetail · 4 years ago
Go has a lot of boilerplate code - simple things take many lines, so I wouldn't be too serious about 1M
danpalmer · 4 years ago
Yeah that's kinda my point. Boilerplate isn't necessarily "complex" in that way. If you can ignore it that's great.

I'm not sure you can with shell scripting because of all the global system state.

debarshri · 4 years ago
If we take out the argument of OS dependent setup, supporting only stateless services etc.

One of the key benefits of kubernetes are API server and custom resource definitions. If you don't like how kubernetes does stuff. You can change the default behavior and orchestrate the way you want.

theamk · 4 years ago
> simple

> 17k lines of shell script

those two phrases don't belong together... to think about this, "17k lines" and "shell script" should not be used together either.

Also, you are a bit light on tests.. there only seems to be a single trivial one, which seems way too low for a codebase this size.

thomasbacklund · 4 years ago
This is why Simplenetes is built with Space.sh [1], a tool to build shell script applications.

About the tests, can't disagree with you, they will come.

[1] https://github.com/space-sh/space

pcthrowaway · 4 years ago
First time I'm hearing of space also. It looks quite impressive, surprised to see no stars
a-dub · 4 years ago
i dunno. autotools is hairy, but it also solved some incredibly hairy problems over an enormous breadth for a very long time in a very reliable manner.

portability across all the different unices with their weird c compilers and differing libcs that actually worked out of the box every time was a gargantuan task.

scubbo · 4 years ago
> those two phrases don't belong together

I assumed it was tongue-in-cheek?

Deleted Comment

debarshri · 4 years ago
Building a platform to deploy stateless services are the easy part. This might even work nicely at a smaller scale. It is gets super complicated when you want to mount volumes, re-use those volumes. This is like a nice weekend project, contrarian in nature, but it is just not a replacement for kubernetes. This is some bash script orchestration on top of podman.

Bulk of complexity in opensource distro of kubernetes comes from the fact that everything is interface driven and has to work in an generic way. For example, you don't really have to implement cri-o like thing if you are opinionated platform and only supports docker. Similarly, you don't have to build CSI, if you only support ceph or aws' storage. I love the contrarian thought, but matter of the fact is modern orchestration platforms that want to be a general purpose platform is going to be big.

It is a really nice exercise however build something like this when you want to learn about networking, containers, orchestration, storage etc. and how to tied everything together.

thomasbacklund · 4 years ago
Simplenetes does support state, no sweat. But it can't pull a disk out of the cloud for you, there is some traditional Ops involved.
debarshri · 4 years ago
So, it can reschedule container if there is a continuous error state on a particular host it is deployed?
amerine · 4 years ago
This is my kind of tom foolery. Love it. You should come work with me at Heroku: https://www.heroku.com/careers/software-engineer-heroku-runt...
thomasbacklund · 4 years ago
Thanks for sharing, I'll have a peek :) Heroku is ACE
yosito · 4 years ago
Software developers should be required to have a license to use the word "simple".
debarshri · 4 years ago
or kubernetes or cloud-native
wongarsu · 4 years ago
but is it web-scale?
motoboi · 4 years ago
Kubernetes might follow the sad path of spring.

Perfect, complete and too complex.

For big and great applications, spring if the obvious choice. It makes incredible complex and difficult things easy.

But, unfortunately, makes simple and quick applications incredible complex and difficult.

humbleMouse · 4 years ago
The hate against spring on hacker news is so ridiculous. Spring boot is one of the easiest lowest boilerplate ways to build anything, period. Especially if you use a type dynamic language on top, like groovy or kotlin or whatever.
johnnycerberus · 4 years ago
Some people are just masochistic or they just want to distract themselves by solving problems that have already been solved by Spring circa 10 years ago. Most of them don't even use the technology that they preach around here, it's borderline trolling.
karmakaze · 4 years ago
You can't be talking of Spring Framework!? That's a 2000's solution (in particular Hibernate) trying to stay relevant.
artwr · 4 years ago
Asking to learn, but if you were to start a Java application in the following two scenarios: 1) Monolith with some CRUD, API, persistence to a DB + search. 2) Scalable backend with an API, persistence to a DB + some caching

what would you use these days?

mixedCase · 4 years ago
I don't disagree with your conclusion. But your comment communicates no argument against Spring and how the trade-offs it makes make it a poor option for new projects.
motoboi · 4 years ago
Sorry, I meant "was the obvious choice". But the sad path is exactly that. Great solution. Too complex. Oblivion.
keeganpoppen · 4 years ago
i love this, and especially love how there are only a few things in the world that one could reasonably claim to simplify with "17k lines of shell script", and one of those is kubernetes. hilarious! (and i even see the value beyond the mere humor of the project's existence, which for me (and unlike all these salty k8s stan commenters*) would be more than enough justification on its own for creating the project in the first place). it's like both a useful project and performance art!

* for the umpteenth time i daresay that hn needs to grow a sense of humor sometimes...