Architecture Weekly #147 - 2nd October 2023
Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.
Welcome to the new week!
Strategy pattern is quite often shown as the ultimate solution for coupling and impedance mismatch. What's impedance mismatch? It's when different parts of the same code change at a different pace. It's one of the overlooked factors.
In the latest article, I analysed in detail the thought and decision-making process for reducing coupling and increasing cohesion. As a basketball fan, I used NBA player's trades as a business use case.
I tried to show when strategy is a real solution and when it is not. I also explained patterns like Proxy and Chain Of Responsibility. Read more:
Tackling coupling is hard to explain; some call it art, some call it gut feeling, I prefer not to call it engineering. Why? We’re in the alchemy evolution phase compared to the other engineering disciplines. We’re seeing issues; we have some heuristics that we call patterns, but they’re hard to codify and make the solution more than less repeatable.
Take, for instance, the Microservices vs Monoliths debate. How long does it last? How long will it? It looks more like a discussion between fans than engineers.
It’s nice to get back to older videos and see how others like Eric Evans were predicting their usage:
And compare with the current state of the art and lessons learned we have, for instance, with a decent summary by Tomas Ekeli:
The other old but still confusing topic is immutable data. Why use it? When to use it and how? Is it a fad or a new real deal? It’s always good to think for yourself and question authority, especially those more focused on influencing than teaching. I have always liked Mauro Servienti's works; they have a lot of pragmatism and real experience, like in the recent article about append-only models.
And just in case you (somehow) haven’t seen it yet, check his must-watch talk:
I’m not a big fan of Facebook and Meta, yet it’s undeniable that they’re doing interesting things, and their tech blog is actually pretty good. Last month, they presented a case study on how they scaled the Instagram Explore recommendations system.
They described how they used various Machine Learning algorithms to make his biggest recommendation engine more flexible and scalable. They constituted a four-step ranking process: Retrieval, First-stage ranking, Second-stage ranking, and Final reranking.
That allowed them to use different algorithms and techniques for each ranking process (e.g. the more correct algorithms are slower, and the other way round). The article shows a general approach but can be a good inspiration for tackling a complex ranking system.
Speaking about tackling. The big dark clouds have started to hang over big players like Google, Apple and Amazon. The U.S. government sued all of them for monopoly practices:
Federate Trade Commision - FTC Sues Amazon for Illegally Maintaining Monopoly Power
CNBC - Apple exec Eddy Cue set to testify in Google trial about $19 billion search deal
It’s not the first time, and not the last one. In the past, Microsoft was forced to split into smaller companies; Google also had some repercussions that formed Alphabet. Those sues are nothing new. They were coming, and U.S. departments were working on them for years.
Adding the fact that the European Union is also fighting the Privacy breaches of the tech giants, we may see interesting battles in the next years. They will take time, and and tech giants won’t easily back off their position, but the industry will surely be impacted by that outcome. Next will be the AI companies that are currently in the wild, wild west mode.
Java 21 was released recently, and it came with new stuff. As always, the best resource is Piotr Przybył, with his continuous effort to explain what’s new, along with his commentary and practical examples. Catch it till it’s fresh!
In parallel, Oracle works on GraalVM to make Java slimmer, more performant and better suited for the native code. Now, they released GraalOS, which is the next step for the native Java runtime:
It’s still a way to go, but thanks to that, Java code may finally make serverless use cases a possible scenario on a bigger scale.
Not Java, but JavaScript also gets more options to run Node.js applications. One of the recent runtimes is Bun. Check an in-depth case study by Yan Cui on how AWS serverless can benefit (or not) from using it:
One of my so far favourite use cases for generative AI like ChatGPT is pair coding or challenging one's own thoughts. DeepLearning.ai, together with Google, released a free online course that can give you some hints on how to approach that:
Check also other links!
Oskar
p.s. I invite you to join the paid version of Architecture Weekly. It already contains the exclusive Discord channel for subscribers (and my GitHub sponsors), monthly webinars, etc. It is a vibrant space for knowledge sharing. Don’t wait to be a part of it!
p.s.2. Ukraine is still under brutal Russian invasion. A lot of Ukrainian people are hurt, without shelter and need help. You can help in various ways, for instance, directly helping refugees, spreading awareness, and putting pressure on your local government or companies. You can also support Ukraine by donating, e.g. to the Ukraine humanitarian organisation, Ambulances for Ukraine or Red Cross.
Architecture
Oskar Dudycz - Is the Strategy Pattern an ultimate solution for low coupling?
Engineering at Meta - Scaling the Instagram Explore recommendations system
Eric Evans - DDD and Microservices: At Last, Some Boundaries!
Mauro Servienti - Append-only models: The why, the when, and the how
DevOps
AI
AWS
Yan Cui - Is Bun the Next Big Thing for AWS Lambda? A Thorough Investigation
AWS - Give Your Graph Workload a Cost-Performance Boost with Neo4j and AWS Graviton
Azure
Java
.NET
Tools
Coding Life
Management
Product Design
Industry
Federate Trade Commision - FTC Sues Amazon for Illegally Maintaining Monopoly Power
CNBC - Apple exec Eddy Cue set to testify in Google trial about $19 billion search deal
CNBC - Cloud stocks falter as Datadog trims 2023 revenue expectations