News for hackers. Stuff that matters.
Re:Why we're sticking with Ruby on Rails by quickthrower2 on Friday July 08, 2022 @08:10AM (#32026115)
Do you need services though to achieve this? How about libraries?
Re:Why we're sticking with Ruby on Rails by adra on Friday July 08, 2022 @04:44PM (#32026761)
Libraries are great, but you can't deploy new versions of library without needing to step on toes. If your dev teams are just "shove this at ops" and done, then it may not make a difference, but if you need to be responsible for the code running in the real world, just library segregation doesn't cut it.
Re:Why we're sticking with Ruby on Rails by magicalhippo on Friday July 08, 2022 @06:28PM (#32028427)
I'm being dense it seems, because I don't see what microservices brings to this. What's the fundamental difference in this regard between shipping an executable with a bunch of dynamic libraries, and deploying a bunch of microservices?
Re:Why we're sticking with Ruby on Rails by olalonde on Friday July 08, 2022 @11:26PM (#32031282)
It's mostly about data. Each micro services is responsible for their own data, data migrations, data store, etc. Think of it as a mini web app with an API. In theory, you could use a library in that way but I have never seen such use in practice. You would also run into the problem of having to always keep all library users on the latest version as to avoid having two versions which expect different database schemas. It also largely forces you to stick to a single programming language.
Re:Why we're sticking with Ruby on Rails by quickthrower2 on Saturday July 09, 2022 @03:13AM (#32032660)
Conversely though, if you can make do with a single data store and data layer (orm or just simple queries) the libraries can use that.

The schema and generated classes could be a shared common library that different teams can work on (maybe with some architecture obersight)

Or if using schema-less each library “knows” it’s own json formats

Then you get nice things like atomic transactions across multiple “services”. You also have no network concerns.

You can pull out microservices for things that need special attention. Such as a spikey-load service that might need to run as a lambda.

Version management is a solved problem. Use your languages package manager and semantic versions.

I concede you need to stick to one language. Ish. You have C FFIs. A .NET app could reference a dll written in C++ or Rust. But yeah not as flexible as services. Although there are inbetween things like RPC.

Re:Why we're sticking with Ruby on Rails by quickthrower2 on Friday July 08, 2022 @05:09PM (#32027122)
I can’t get my head around that though.

I agree to split into services where “you’r have to do that anyway”.

But adding services where part A of the monolith needs to use part B where a library would do the job seems odd.

If you are trying to solve a specific scaling issue, then sure, but this is rare.