News for hackers. Stuff that matters.
Re:Modern-Day Architecture Design Patterns for Software Prof... by Cthulhu_ on Wednesday October 14, 2020 @04:20AM (#24774377)
I've worked with two major (well, relatively) microservices architectures and honestly it made things many times more complicated and expensive than they should have.

In the one, I came in after a year and a half and they still had nothing to show for other than some marketing (this was fairly straightforward e-commerce). They tried to bolt Java applications together using Amazon Kinesis (which isn't intended as a service bus) and we quickly ran into issues because the stock / inventory service was separate from the order processing service, so any incoming order would have to do a weird round trip to confirm stock before it could confirm the order to the end-user. To name but one example.

The other was for a shipping company, where every 'model' (users, addresses, shipments, etc) was put in its own microservice. That one started out with NodeJS services before - for some reason, probably political / hiring related) migrating to Scala, only adding to the complexity of what, in essence, was a CRUD application where the heavy lifting was still being done in the legacy back-end / mainframe systems.

I don't get it. Glad I'm working on a project right now where I have full control over things, it's also a CRUD project but I can build it as a straight monolith.

One other anecdote I have is where we built a serverless application. It too was e-commerce, but the heavy lifting was done by as-a-services; we used Commercetools as e-commerce back-end as as service, Contentful as CMS-as-a-service, Adyen for payment processing, and we used a heap (about 30) 'serverless' functions deployed in Netlify as the glue. Seemed to work all right, better than the microservices attempt (because the individual functions didn't have to talk to one another; they responded to either user / client requests, or events generated from one of the services doing the heavy lifting).

Anyway if I had to do ALL of those again (and if I actually had a say in it, lol) I'd just write them as plain old Java monoliths.

The reason that's not being considered an option much is because it's boring, and highly paid software engineers don't want to do boring stuff. Second reason is that if you have boring code, you get mediocre developers. That's why in some projects I've seen them push for Scala instead of plain Java (which would've done just fine), because if you pick Scala you weed out a good 95% or so percentile of developers - that is, the reasoning being that one already has to be a good developer to start to comprehend Scala.

Of course, it backfired because these developers are so 'good' that they're also stubborn and will do things their own way, which may not be the same way as other devs. That may have just been my limited experience though, IDK.

Re:Modern-Day Architecture Design Patterns for Software Prof... by UK-Al05 on Wednesday October 14, 2020 @06:54AM (#24775197)
In most async implementations the final stock check just cancels the order. Which is fairly rare.

An eventually consistent implementation is good enough for displaying to the user.

The extra complexity of displaying consistent and up to date stock inventory to user isn't really worth the cost instead of the fairly rare occurance of having to cancel an order.

Re:Modern-Day Architecture Design Patterns for Software Prof... by csharptwdec19 on Wednesday October 14, 2020 @09:32AM (#24776313)
> They tried to bolt Java applications together using Amazon Kinesis (which isn't intended as a service bus)

In my travels I've learned that 'Using %NOT_ESB% as an ESB' is the first sign you are entering microservice hell.