Welcome to the new week!
Let’s try to go faster than usual through the links, not because they’re less interesting, but because I’m on Santorini island trying to get some short sightseeing time. That’s not precisely resting, as it means waking up really early and walking around. Those Greek villages are beautiful, but not extremely accessible for doing that with a 4-year-old daughter. Nevertheless, to the point!
Last week, we discussed an overused but applicable pattern: in-memory bus. This time, we’ll continue with the leitmotif and talk about mocking. No, I won’t mock you; I will mock TypeScript code.
Node.js in version 18th added its own native Test Runner. Why did they do it? Jest looks like abandonware even after transferring to OpenJs Foundation, issues are not getting closed, and it’s slow. Vitest is a decent new alternative, but...
Native Test Runner is also young but nicely integrated directly into Node.js and maintained by the core team. It’s lightweight, thanks to Thiago Valentim Martins’ suggestion and contribution. I started using it in Emmett. So far, so good; it’s really fast (each test file spawns as a Node.js subprocess); sometimes configuring it with TypeScript adds a bit of a headache, but which tool doesn’t?
In my latest article, I explained how to write a simple wrapper to make mocking and verification easier. As always, I also used it to show some TypeScript tips and tricks
And nay, I don't like mocks; I think that they are overused and too often harmful. Still, it’s undeniably useful to sometimes mock the implementation of the real object or verify whether we actually called it. One way or another. Thanks to that, we can test our code or application without calling external services, doing a lot of IO operations, etc. Or ensure that dependency was called.
Btw. I’m in Santorini, because I was in Athens, at Devoxx Greece, where I gave a workshop and talked at the DDD Greece meetup. I extended my stay a bit, but I promised you to get to the point.
So, being on Devoxx Greece, I attended the workshop run by Giannis Papadakis about the introduction to load testing with K6. I enjoyed it, as it showed how to start and do even a few advanced stuff on load testing our backends and frontend and how to apply that to our end-to-end development process. You can also do it on your own:
I think load testing is an underappreciated aspect of our process. We’re too often asking the passive-aggressive question, “…but will it scale?” without backing it up with real metrics. We should gather and verify the real needs of the business and the real load. Tools like K6 can help technically do that.
If you’d like to also look at alternatives, check the article by Tim Deschryver:
Check also those tools that can help you meet the defined SLO and use the cloud in a more predictable and cost-effective way:
And read the article by Piotr Stapp, who checked how Azure Container Apps compare their usability against the Kubernetes services:
I recently found that Adidas also has a decent engineering blog. You can check their 3 article series explaining how they deal with their container platform. The first part is here:
Jumping from the DevOps world to new things in Databases.
You probably already know that I’m a PostgreSQL fanboy. It’s a rock-solid database capable of many things and a true shapeshifter. Check more in Dylan Paulus article on how you can use it as a graph database:
Speaking about graph databases. ISO published a standard for Graph Query Language. It’s a big deal, as for now, we have multiple languages provided by different vendors, and it was hard to transition between them. Now, there’s a chance that we’ll get some unification. Neo4J wrote a story based on their perspective. Read more:
Snowflake announced the public preview of Snowflake Copilot. They called it a breakthrough; I call it a nice feature enhancing the accessibility of the tool. Still, it’s worth watching advancement in this space:
What’s even more interesting to watch is the slowly changing view of responsibility in our industry. For many years, most of us have been just doing a line of business applications, but as our industry is touching more and more aspects of human life, we’ll have more and more dilemmas.
Recently, nine employees were arrested for occupying Google’s offices in protest of Project Nimbus, an Israeli military contract. What’s more, 28 were fired after that.
Not that it’s extremely new, as computers, almost since the beginning, have been widely used in the military, but we should be more careful and embrace that what we do may not only be for good but also may actually hurt people. It doesn’t need to be even military; the British Post Office scandal or Boeing crashes are other examples. Choose wisely.
Ok, I promised to be quick, but it appeared to be a bit longer! Yet, I see some signs of sunlight and less wind, so it sounds like I better be done!
Check also other links!
Cheers
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
Indu Alagarsamy - Application and Architecture Modernization - Where do we Start?
Fred Hebert - Embrace Complexity; Tighten Your Feedback Loops
Marc Brooker - Formal Methods: Just Good Engineering Practice?
📺 Michiel Overeem - How We Write Better Software with Low-Code
📺 Tomasz Lelek and Mark Rendle - Software Mistakes and Tradeoffs
📺 Valentina Jemuović - Hexagonal Architecture in Monoliths and Microservices
DevOps
Adidas Engineering - How we are managing a container platform: a tale about the past
Giannis Papadakis - Evaluate Performance at Massive Scale workshop
Karpenter - Kubernetes Node Autoscaler built for flexibility, performance, and simplicity
Databases
Dylan Paulus - Postgres: The Graph Database You Didn't Know You Had
Neo4j - ISO GQL: A Defining Moment in the History of Database Innovation
AI
Azure
AWS
Java
.NET
Chisel - Remove unwanted dependencies from your dotnet projects
Oleksii Nikiforov - Building pipelines with System.Threading.Channels
Node.js
Industry
The Verge - Microsoft starts testing ads in the Windows 11 Start menu
The Verge - Nine Google employees arrested after eight-hour sit-in protest