Architecture Weekly #96 - 10th October 2022
Welcome to the new week!
I’ve heard a few times that Event Sourcing is hard to test. I’m not sure where this myth comes from; maybe from mixing it with event streaming. Event Sourcing logic is pretty straightforward. We’re getting the list of events recorded for a specific entity (e.g. bank account), building the current state from them and running business logic based on it. As a result, we’re getting either a new event or a list of events. We can think about business logic as a pure function and just verify if, for the defined inputs (state + command) we’re getting the expected result (event or error). In my last article, I explained in detail how to do that:
Check new goodies to my small testing library Ogooreck, in which I added helpers to cut the boilerplate of testing business logic (not only event-sourced one).
Tests are great, but nowadays, not all we can verify before production. I wrote once that I tested on production and am not ashamed of it. In the distributed world, we can be certain about one thing: there will always be something that’s not working. We need to embrace that and make our systems resilient to failure. Check more in:
That’s also why I like the Event-Driven approach, as it helps with that. It won’t help us to avoid failure, but it will enable us to manage it and be prepared for the worst. Of course, it may also introduce accidental complexity, so it’s always worth questioning what we read. InfoQ released a new eMag about the streaming pipelines:
Check also the new Kafka release notes. The Kafka team is pushing for the removal of Zookeeper. On a bigger scale, everything is custom. Kafka provided their implementation of the Raft protocol, called KRaft and aimed to remove the dependency for Zookeeper. It served them well, but they decided they wanted to have more control, fewer moving pieces and make it more fine-tuned to their needs. Read:
Speaking of the design. Most of the architects I know come from the backend or operations. We tend to ignore the UI and UX as something that’s maybe nice but not so important. That too often leads to building the iceberg, where we’re trying to hide too much underwater instead of delivering more to users. Check the nice summary about the UI and UX in:
From the industry news, read more about the not-great time for NFTs and Metaverse. I’ve heard that “future is now”. It seems that not quite yet.
Bloomberg - NFT Trading Volumes Collapse 97% From January Peak
CoinDesk - It's Lonely in the Metaverse: Decentraland’s 38 Daily Active Users in a $1.3B Ecosystem
Have you thought about watching Star Wars on the terminal? I bet you did. See it:
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 Red Cross, the Ukraine humanitarian organisation. You may also consider joining Tech for Ukraine initiative.
Architecture
Distributed Systems
DevOps
Serverless DNS - The RethinkDNS resolver that deploys to Cloudflare Workers, Deno Deploy, and Fly.io
FrontEnd
qwik - The HTML-first framework. Instant apps of any size with ~ 1kb JS
DaisyUI - The most popular, free and open-source Tailwind CSS component library
Testing
Mobile
Java
Brian Vermeer - Best Practices for Managing Java Dependencies
ArchUnit - A Java architecture test library, to specify and assert architecture rules in plain Java
.NET
Oskar Dudycz - Testing business logic in Event Sourcing, and beyond!
Patrick Smacchia - .NET Build Improvement: Stop Wasting Resources
Python
Management
Industry
Lisa Harvey-Smith - More women are studying STEM, but there are still stubborn workplace barriers
Bloomberg - NFT Trading Volumes Collapse 97% From January Peak
CoinDesk - It's Lonely in the Metaverse: Decentraland’s 38 Daily Active Users in a $1.3B Ecosystem