21 ms·
Honestly, we originally did microservices because it sounded like a fun idea and because it would look really cool in our marketing materials. At the time, this
by bob1029 5y ago
Honestly, we originally did microservices because it sounded like a fun idea and because it would look really cool in our marketing materials. At the time, this was a very shiny new word that even our non-tech customers were dazzled by.
As oxidation and reality set in, we realized the shiny thing was actually a horrific distraction from our underlying business needs. We lost 2 important customers because we were playing type checking games across JSON wire protocols instead of doing actual work. Why spend all that money for an expensive workstation if you are going to do all the basic bullshit in your own brain?
We are now back into a monolithic software stack. We also use a monorepo, which is an obvious pairing with this grain. Some days we joke as a team about the days where we'd have to go check for issues or API contract mismatches on 9+ repositories. Now, when someone says "Issue/PR #12842" or provides a commit hash, we know precisely what that means and where to go to deal with it.
Monolithic software is better in literally every way if you can figure out how to work together as a team on a shared codebase. Absolutely no software product should start as a distributed cloud special. You wait until it becomes essential to the business and even then, only consider it with intense disdain as a technology expert.
- ejb999 5y agoCouldn't agree more - just like NoSQL vs regular old SQL - don't assume you need a NoSQL solution, until you actually prove you need it. probably 90-97% of solutions will be better off with a relational database; boring yes, but they 'just work'. Choose NoSQL only when you need them, choose micro services the same way. If you 'think' you need NoSQL or a MicroService architecture - chances are you don't.
- malandrew 5y ago> don't assume you need a NoSQL solution Likewise, people who only know relational DBs shouldn't assume they need an SQL solution. It's remarkably rare that you encounter engineers with real thoughtful experience with both and they have the experience to know which tool to pick up for different problems.
- travisgriggs 5y agoI don’t think I need NoSQL. It’s just that I hate having to map my structured data into tables and rows and joins and schemas and primary keys. A document|object|key-value store just usually maps better to the data I’m trying to model than a trumped up spreadsheet that requires me to speak a foreign language to it. Other’s mileage may vary of course. Just been my experience in the domains I’ve worked in. (Ironically, I agree very much with your general sentiment, just not the example of illustration you chose)
- AndrewDucker 5y agoYou can do those in most SQL databases too, with the option of structured data if some of your data fits it
- projct 5y ago> having to map my structured data into tables and rows and joins and schemas and primary keys You don't have to. You can just use JSONB.
- deepfriedrice 5y agoI wish I could justify using SQL more. It's just way too easy to use Dynamo. Unless my data is complicated enough to warrant a relational model, it's going in Dynamo.
- ejb999 5y agoI don't disagree, it is so easy to build solutions on tp of dynamodb - and then I regret it when the access patterns change and the solution falls apart -thats when I wish I had stuck with tried-and-true relational. That is kind of the problem, DynamoDB - and other NoSQL database - allow you to just start building your app, without any real thought about what data you will need and how it will be used - but you are often shooting yourself in the foot to not map this stuff properly out in advance.
- ris 5y agoThe problem is that there are so many developers now who have never had any experience of anything that isn't some botched attempt at microservices. The idea that it's possible to encapsulate code and separate concerns in any other way is foreign to them, and an "API" to them is 100% synonymous with a rest/grpc interface. So there's nothing for them to revert to and they are doomed to repeat this pattern, clearly with the impression that this is what app development is. Meanwhile a lot of the industry is trying to tell them that their problem is they haven't separated things enough and should be using lambdas for everything.
- bob1029 5y ago> So there's nothing for them to revert to and they are doomed to repeat this pattern, clearly with the impression that this is what app development is The only practical solution I have found for this: Carefully select a Padawan and guide them gently away from the forces of evil until they have gained enough situational awareness to spot these patterns and defend themselves. Not everyone can be saved, and at this point I fear that it is a majority. If someone goes too far into cloud insanity, there is (in my experience) very little you can do to bring them back down to reality. At least, not on time frames the business owners seemed interested in when looking at new hires. I have had a much easier time taking in someone totally green and getting them happy/productive on monolithic software than I have with uService/AWS-certified 'experts' (et. al.).
- dhzhzjsbevs 5y agoI tried that for a while but now my reviews are basically: "No, stop, don't." https://youtu.be/uVdDXeYM4ss https://youtu.be/uVdDXeYM4ss It's like I'm talking to children, they think I'm just old and stuck in my ways and that I just don't understand. Eventually my prediction comes true but none of them have ever said anything, they just go implement what I suggested and act like they solved the world's greatest mystery. I guess it's easy to forget my comments from months earlier, it's almost as if I've seen their code before and know how it ends.
- stavros 5y ago
- lupire 5y agoYour problem was using JSON instead of a typed language like Protocol Buffers or even Java RPCs, and that you were using separate repos for everything. Microservices don't even have to run in separate binaries, let along separate machines.
- lolinder 5y ago> Microservices don't even have to run in separate binaries, let along separate machines. If you're not running separate binaries, what you have is a monolith with well-defined module boundaries, not a set of microservices.
- jayd16 5y agoI guess a binary is pretty vague. They could mean they deploy a single container image or something.
- lolinder 5y agoIf you have a single deployment unit, you have a monolith, regardless of how that deployment unit is structured on the inside. There's a lot of fuzziness about what "microservices" means, but some degree of independent deployability is pretty non-negotiable.
- akvadrako 5y agoYou can have of course have a single binary deployed with different versions for different services. More commonly the binaries would differ but share a lot of code in a library of the monorepo.
- kyriakos 5y agoWhich is actually much better than a distributed monolith (random microservices thrown together just because it ticks some boxes on managements resumes)
- 5y ago
- thundergolfer 5y agoOver the past 10 years dev tools (eg. git, IDEs, laptops) have also become more performant by some small constant factor, 2-3x, which isn't massive in comparison to Moore's law stuff, but means that a larger fraction of new software projects can start monolithic and stay monolithic for longer. Unless you're handling millions of lines of code and 1000s of developers, you won't need to abandon a monorepo or commit to expensive custom dev-platform investments.
- bob1029 5y ago> Unless you're handling millions of lines of code When including our vendor's WSDL generated reference sources, we are well in excess of 1mm lines of code. I think even omitting that we are very close. I cannot imagine us ever getting too big in those terms. Our full checkout is ~400 megs right now. If some day github says we are too big and need to break shit up, Ill move us to perforce or something even more ridiculous. Our main product does a full re-build in ~45 seconds on a powerful developer machine. Incrementals for more likely work areas are closer to 8 seconds. Full monorepo checkbuild takes about 5 minutes. For reference, we do use .NET so JIT is an ally here.
- sk5t 5y ago> full re-build in ~45 seconds That's cute. How about the test suites?
- aryehof 5y agoI think one mistake is using the term “monolithic” in comparison to “microservices”. To a whole new generation of programmers (and a fair proportion of older ones also) it has a negative meaning somewhere approaching “a huge and growing mess of smelly unstructured, non-modular code”. It is a negative term invented to compare against the glory that be “microservices”. I prefer to use the term “Local Modular Application” in lieu of anything better?
- zirobi 5y agoWhat about just "service" or "web service"?
- lolinder 5y agoTo some extent I think "monolith" is actually changing connotation as people realize that microservices are not a silver bullet. For example, Shopify calls their system a "modular monolith": https://shopify.engineering/deconstructing-monolith-designing-software-maximizes-developer-productivity https://shopify.engineering/deconstructing-monolith-designin...
- packetlost 5y agoI was fortunate to have a similar experience early on. That being said, I still firmly believe there are cases where "microservices" are appropriate, such as when you married to a specialized framework that only supports Python 3.5 but you want to use modern tooling for everything else as much as possible :)
- bob1029 5y agoI think this is a fair point. If your reasoning for developing multiple services is to shim legacy services, that is perfectly acceptable in my view. It's when you intend to start from zero with these things that the problems begin. I would say if you begin a journey to shim legacy, it should also be a journey to entirely deprecate it. You can gradually consume an old monolith with a new one over time if you are deliberate enough.
- kissgyorgy 5y agoYes obviously there are use cases where microservices is a better architecture, but the point is it's very rare and most teams/companies never need it, because it would complicate their life unnecessarily.
- azth 5y agoI go back and forth on this. Having a single service is definitely much easier. However, consider the following scenario: you want an application that asynchronously ingests data from different sources (whether they are files, streams, database stores, etc.), perform some computations and aggregations, store them to a local DB, then allow the user to display the result. Would it make sense to separate out the ingestion code into its own service, that calls out to another service that is responsible for storing to the local DB? The rationale is that writing to the DB is now controlled through one service (almost like a queue, where connections could be controlled), and the ingestion could be scaled up/down independently of the DB write service. Thoughts?