5 ms·
Can anyone recommend good examples of monoliths in open source? Preferably in Go? I inherited a bunch of micro services at my current job with a fairly small t
by red_hare 8y ago
Can anyone recommend good examples of monoliths in open source? Preferably in Go?
I inherited a bunch of micro services at my current job with a fairly small team. My feelings have been that the code had been prematurely micro-serviced considering the team is so small and every service was mainly just CRUD in front of then same Postgres instance.
I’ve slowly been demonstrating the benefit of modularlized “sub-apps” in a single monolith over lots of microservices that all reinvent the wheel. And I think I’ve convinced them that this is easier going forward. But I’m at a loss sometimes about what boundaries I should be putting in place such that we don’t end up with a ball of mud in two years.
- sarabande 8y agoKubernetes is a pretty large open-source Go project: https://github.com/kubernetes/kubernetes https://github.com/kubernetes/kubernetes Docker is, too: https://github.com/docker/docker-ce https://github.com/docker/docker-ce
- ben_jones 8y agoKubernetes always gets brought up but I would argue that while it is large it is not simple and was not architected to be understood by novices to monolith projects. The goal of kubernetes is to be kubernetes, not to be a pristine learning example - and though you can learn from studying it it is probably not the best place to start learning.
- threeseed 8y agoIs Kubernetes really a monolith ? It isn't one codebase and when deployed there are multiple daemons running.
- snail_98 8y agoPeople confuse monolith and monorepo all the time. If you have a monolith where each independent module communicate via queue, like described in the article, you are so close to having a monorepo of horizontally scalable micro-services.
- deleted 8y ago[deleted]
- shurcooL 8y agoUpspin is a monolith, I think? https://github.com/upspin/upspin https://github.com/upspin/upspin Also, my personal site is a medium-sized monolith: https://github.com/shurcooL/home https://github.com/shurcooL/home
- the_arun 8y agoLinux source is a monolith as I understand. I dont know about Go monoliths
- threeseed 8y agoMonolith is usually described in the context of a single binary application. Linux isn't a monolith. And it isn't a monorepo either since Linux comprises far more than just the kernel.
- taeric 8y agoLinux is famously a monolithic kernel.
- TallGuyShort 8y agoIf one wants to get technical, Linux is only the kernel, which is why Richard Stallman pushes people to refer to most of the complete operating systems that use it as GNU/Linux [1]. And Linus Torvalds and Andrew Tanenbaum had a very famous flame war [2] over the issue of monolithic kernels vs. microkernels, in which Linux was the monolith, and there are a lot of parallels between this article and the design considerations at stake. Not all of the advice here applies well to kernels, IMO. But one can certainly say that from a practical standpoint, Linus Torvalds has a few reasons to feel that he and his monolithic kernel won that particular debate. [1] https://en.wikipedia.org/wiki/GNU/Linux_naming_controversy https://en.wikipedia.org/wiki/GNU/Linux_naming_controversy [2] https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_deb...
- Ace17 8y agoLinux is the kernel, and is different from GNU, as Linus thimself puts it: "I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. " ( https://en.wikiquote.org/wiki/Linus_Torvalds#1991-94 https://en.wikiquote.org/wiki/Linus_Torvalds#1991-94 )
- lucidone 8y agoNot in Go, but Discourse is a monolithic rails app on Github which I've used as an example for my own employment's code base in the past. Another example is Gitlab's code base (also Rails).
- artursapek 8y agoEvery Rails app is a monolithic Rails app
- debaserab2 8y agoNot at all true - plenty of rails app's are just a REST API for a service
- batiste 8y agoI think what he meant is that Rails as a Framework doesn't push you to implement modularity internally. The convention chosen to organize your files pretty much guarantee a monolith.
- lucidone 8y agoNot necessarily, but generally (99%) yes. It's both an advantage and disadvantage of the framework. Use the right tool for the job :).
- scarejunba 8y agoSQLite? https://www.sqlite.org/src/doc/trunk/README.md https://www.sqlite.org/src/doc/trunk/README.md
- nicolaslem 8y agoI recommend you to have a look at Django and Rails for inspiration. People love to hate them, but they get the scalable monolith just right in my opinion. Speaking about Django, the framework provide core features (HTTP handling, database connections, ORM, templating...) that apps (what you call "sub-apps") can leverage. A Django project is just a collection of apps, either yours or third-party.
- sho 8y ago> look at Django and Rails for inspiration. People love to hate them You'll always get some portion of the community hating whatever's on top. Even in 2018, if your startup isn't using one of these two, you'd better have a damn good reason. Rails, and to a lesser extent Django, are the absolutely boring but productive as fuck workhorses of any startup. Bypass them at your peril when your project passes in front of competent due diligence.