News for hackers. Stuff that matters.
Re:The Costs of Microservices by tsss on Monday October 30, 2023 @01:53PM (#38073048)
No one says you can't have all of your microservices use the same language...
Re:The Costs of Microservices by bob1029 on Monday October 30, 2023 @02:08PM (#38073302)
Absolutely. This is how we operated when we were at the peak of our tech showmanship phase. We had ~12 different services, all .NET 4.x the exact same way.

This sounds like it could work, but then you start to wonder about how you'd get common code into those 12 services. Our answer at the time was nugets, but we operate in a sensitive domain with proprietary code, so public nuget services were a no go. So, we stood up our own goddamn nuget server just so we could distribute our own stuff to ourselves in the most complicated way possible.

Even if you are using all the same language and patterns everywhere, it still will not spare you from all of the accidental complexity that otherwise becomes essential if you break the solution into arbitrary piles.

Re:The Costs of Microservices by ValtteriL on Monday October 30, 2023 @04:10PM (#38075036)
Can't you share them via shared libraries in .NET?
Re:The Costs of Microservices by jcmontx on Monday October 30, 2023 @06:21PM (#38076765)
YMMV but I think you can only do that if you have a monorepo with the shared library and all the microservices
Re:The Costs of Microservices by Atotalnoob on Monday October 30, 2023 @06:46PM (#38076995)
You can, but it’s just kind of hinky, you end up relying on a specific path for the shared library
Re:The Costs of Microservices by lmm on Monday October 30, 2023 @08:36PM (#38078165)
Does .net not have a way to run simple private repository like Nexus? Over in JVM-land that's a basic thing that you'd be doing anyway.
Re:The Costs of Microservices by smaudet on Monday October 30, 2023 @09:48PM (#38079082)
It's the difference between drag-dropping a reference between "projects" or whatnot in your monolith project, or coming up with a publish pipeline after which your merged code gets into the repo so that other people can use it, if you have three projects in three checkouts that all have to be coordinated and merged in order so that you don't accidentally break your environment and worry about security and and and....

One is much simpler than the other. Artifact management is surprisingly complex, it only looks like it works great while you aren't managing many versions and acting more like a monolith, just spread across repos/deploy points.

Re:The Costs of Microservices by lmm on Monday October 30, 2023 @10:59PM (#38079712)
> It's the difference between drag-dropping a reference between "projects" or whatnot in your monolith project, or coming up with a publish pipeline after which your merged code gets into the repo so that other people can use it

You already have that pipeline for release/deployment though, don't you? (And it's already hooked up to your SSO or what have you).

> if you have three projects in three checkouts that all have to be coordinated and merged in order so that you don't accidentally break your environment and worry about security and and and....

It's the same as any other library dependency though, which is a completely normal thing to deal with. The cost of separating your pieces enough that you can use different versions of a library in different services is that you can use different versions of a library in different services.

I'm skeptical about microservices as a deployment model, but I'm absolutely convinced that code-level modularisation and independent release cycles for things that deploy independently are worthwhile, at least if your language ecosystem has decent dependency management.

Re:The Costs of Microservices by briHass on Monday October 30, 2023 @11:19PM (#38079864)
The only way package feed complexity works -- and really microservices in general -- is to be absolutely fastidious about backwards compatibility of your packages and as open as possible with transitive dependency versions.

Nuget does provide mechanisms for obsoleting packages, so it's reasonable to enforce that new packages should allow for a few versions worth of backwards compatibility before deprecation and finally pulling the plug.

Re:The Costs of Microservices by ljm on Monday October 30, 2023 @03:46PM (#38074684)
Ideally you would use the same language if it had distributed support. Use Erlang or Elixir for example and you have everything you need for IPC out of the box. Might take a little bit more effort if you're on Kubernetes.

One of my problems with microservices isn't really the services themselves, but the insane amount of tooling that creeps in: GRPC, Kafka, custom JSON APIs, protobufs, etc. etc. and a lot of them exist in some form to communicate between services.

Re:The Costs of Microservices by tsss on Monday October 30, 2023 @04:13PM (#38075093)
If you do so much IPC that you have to design your language around it you're probably doing it wrong. I don't think that moving to a monolith would really cut down that much on other technologies. Maybe you can do without Kafka, but certainly you will need some other kind of persistent message queue. You will still need API docs and E2E integration tests.
Re:The Costs of Microservices by jocaal on Monday October 30, 2023 @04:39PM (#38075460)
> If you do so much IPC that you have to design your language around it you're probably doing it wrong...

I'm gonna have to disagree with this. Often when languages add features to their core, it allows for a very different (and often better) approach to writing code. Think Lisp with first class functions, or Rust with the borrow checker. Why should concurrency be any different? This feels like a Blub moment and I would highly recommend you give erlang or elixir a try, just to see what it is about.

Re:The Costs of Microservices by tsss on Tuesday October 31, 2023 @08:17AM (#38083597)
If you need that much IPC then you aren't doing microservices correctly. Microservices are supposed to be independent, self-contained domains wherever possible. Purely technical boundaries like dedicated caching services that you see in very large companies like Google are more of an exception and should only be used when the non-functional requirements absolutely dictate it. A language that is designed around IPC wants to distribute dynamic parts of one application over multiple interchangeable compute resources (like in an HPC environment). This is a different thing altogether from microservices, which are self-contained applications working independently to each provide a fixed piece of the whole.
Re:The Costs of Microservices by ljm on Tuesday October 31, 2023 @09:32AM (#38084540)
The theory is that microservices are supposed to be independent and self-contained, but such a wonderful implementation of DDD is a theoretical fantasy that rarely plays out in practice. It's not just a technical difficulty but an organisational problem where communication between teams also throws a spanner in the works.

If your typical microservice setup is simply distributing your call stack over a network (and oftentimes that's all it is), then you might as well use a language designed to operate in such a manner and reap the benefits of it. That kind of microservice architecture only really exists as a function of the organisation's structure such that teams can work more autonomously.

Re:The Costs of Microservices by smaudet on Monday October 30, 2023 @09:55PM (#38079155)
"You will still need API docs"

Been free in my IDE since I compiled the code...

"E2E integration tests"

I can mostly run these on my machine, no need to stand up a cluster to get it running (bonus points if you virt multiple machines on one and still don't need the cluster for complex distributed scenarios).

"you will need some other kind of persistent message queue"

var queue = new Queue(); // then sometime later... queue.Save(); // or queue.EmplaceAndSave(); ... queue.Pop();

Trivial and didn't need a server to set it up.

Lots of tech stack stuff simply disappears without server boundaries and the like to get in the way. There is other tech you have to deal with, but at the small scales it mostly doesn't apply. Which, you as a dev are usually only working at small, testing scales, so you don't usually need to support it.

Re:The Costs of Microservices by tsss on Tuesday October 31, 2023 @08:09AM (#38083535)
> var queue = new Queue(); // then sometime later... queue.Save(); // or queue.EmplaceAndSave(); ... queue.Pop();

Yeah, no... you'll lose data for sure, you'll have race conditions or no cooperative queuing between multiple instances of the application. This is exactly the kind of half-assery that people resort to when they say monoliths are so much less complex than microservices. A good monolith still requires all the same hard decisions about modularity, high-availability etc.

Re:The Costs of Microservices by smaudet on Tuesday October 31, 2023 @03:59PM (#38090621)
Eh?

Default queue implementations come with co-operating queuing out of the box. I suppose you could use some hand-rolled queue with no internal locking, but this is disingenuous.

> you'll have race conditions or no cooperative queuing between multiple instances of the application.

You're thinking micro-service again here. There's no need to have multiple "instances" at all. Any concurrency is handled internal to the application itself with use of e.g. fibers, threads, etc. A good argument to why monoliths have drawbacks can't be "well its not a microservice". :)

> A good monolith still requires all the same hard decisions about modularity, high-availability etc.

Never said it didn't. What it doesn't require is all the tech stack to support that over many instances, because there's one instance. A large majority of µServices is just re-implementing what your runtime gives you for free.

Re:The Costs of Microservices by erik_seaberg on Wednesday November 01, 2023 @02:31PM (#38102746)
Sure, but even a monolith should store data on redundant hardware before launch, because commodity hardware isn’t completely reliable and neither are datacenters.
Re:The Costs of Microservices by switch007 on Tuesday October 31, 2023 @04:00AM (#38081489)
You need a CTO with a backbone to say no to the senior people hell bent on padding their resumes and scratching an itch though

Too often devs weaponise micro services and say it’s one of the key reasons for microservices is to allow free language choice !