Hacker News new | ask | show | jobs
by crdoconnor 4028 days ago
>Adding an agreed upon layer that aligns with clean architecture[0)

Creating new boilerplate never aligns with clean architecture. Clean architecture means solving your problem in the least amount of code possible, not the the most.

>monolithic systems where there is a sincere lack of data and state guarantees.

If anything you get fewer guarantees about your library if you expose it over a REST api instead of putting it directly on your call stack. Your library can actually go down and you have to prepare yourself for this eventuality and write a ton of code to deal with that.

>It's the same amount of monitoring.

25 services require 25 checks. 4 services require 4 checks, with all of the attendant graphs, notification systems, etc. There is simply no way to wriggle out of that one, no matter how great you think this architectural model is.

> This also allows you the ability to change or create circuit breakers to fail over when issues targeting specific are found. (see slides 134-150 of Sam Newman's principles of microservices [1])

This is a fix for a self-created problem. If I create a library to add two numbers together and create an API endpoint for it, I need a circuit breaker for it. If I instead just call it directly, I don't.

>They should have been "ironed out"

Of course they should be "ironed out" if you follow a microservices architecture! You have to do all of this self created work or your app becomes massively unreliable. The point is that you can avoid these problems altogether if you KISS and don't follow a microservices architecture.

>What it sounds like you're saying is:

>"Building a monolithic app

Firstly, there is nothing intrinsically monolithic about running two libraries on the same computer, in the same service. Loose coupling has nothing to do with whether you are running two different bits of software in the same service. It simply means that the amount of work you have to do to swap out a component is low.

I currently work on a "microservices" system and it is tightly coupled as hell and a monolith.

I've built non-microservices apps that are extremely loosely coupled.

This intentional conflation of the word 'monolith' and "non-microservices" is disingenuous as hell.

>allows you to crutch bad behavior and poor design without having to understand the realities of software.

If "not doing microservices is a crutch", strong typing is also a crutch.

As it happens, I don't need the "crutch" of creating rest API endpoints between my libraries to make them loosely coupled. I do it anyhow. If I were to work with somebody who doesn't write loosely coupled code, though, I certainly wouldn't want to magnify the explosions caused by their bad code by making it tightly coupled over a series of interconnecting, networked services.

>You can ignore scalability, clean architecture, concurrency, data modeling and graceful failures."

I prefer to make scalability, clean architecture, concurrency, data modeling and graceful failure easier to handle, not harder. I can do that by using a (where possible) stateless, non-microservices architecture.