Architecture Anti-Patterns : The DARK side of the Architect
Amid the realm of logic and structured thought, architects, much like the mythical creatures of old, harbor a shadowy underside. Like the ancient legends where heroes have their flaws and palaces their haunted chambers, architectural designs, no matter how splendid, possess pitfalls and lurking dangers. The illustrious facades of our software edifices can sometimes obscure the eerie passages and cobwebbed corners inherent within. Like everybody, architects have a dark side, a realm where patterns and practices, if not wielded with caution, can spiral into chilling tales of system horrors. In this paper, we shall venture into this enigmatic domain, shedding light on the specters that haunt our architectural decisions and understanding how to exorcise the demons that threaten our digital sanctuaries.
Multi-tenant: The Haunted Mansion
The Overcrowded Ghost Party
Not separating tenant data appropriately can lead to data leaks between tenants, potentially violating data protection laws.
Frankenstein’s Maintenance
Customizations for specific tenants can make the codebase messy and hard to maintain, especially if they’re not modularized properly.
BFF (Backend For Frontend): The Phantom Layer
The Poltergeist Payload
Without optimization, BFF can result in over-fetching or under-fetching of data.
The Duplication Demon
Business logic can get duplicated across multiple BFFs serving different frontends.
Outbox Pattern: The Ghostly Deliverer
Lost in the Phantom Zone
If the event publisher fails, messages might be stuck in the outbox.
Zombie Messages
Without proper deduplication mechanisms, consumers can process the same message multiple times.
CQRS (Command Query Responsibility Segregation): The Split Soul
Eventual Horror
Eventual consistency can surprise developers not accustomed to it, leading to unpredictable system states.
The Two-Faced Monster
Having separate models for read and write can increase the complexity, requiring sync mechanisms.
API Gateway: The Haunted Portal
The Bottleneck Banshee
If not properly scaled or optimized, it can become a performance bottleneck.
The Hexed Transformation
Over-reliance on the gateway for transformations can lead to monolithic configurations that are hard to manage.
Circuit Breaker: The Ghostly Protector
Premature Haunting
Misconfigured thresholds can cause the circuit to open too often, denying service even when the downstream service is healthy.
Ghoul’s Delay
If the reset interval is not optimized, it can result in extended outages.
Eternal Night’s Lock
In some ill-configured or neglected systems, a circuit breaker can remain open indefinitely. This can occur due to the absence of auto-reset mechanisms or continuous failures each time the circuit tries to close. As a result, the system remains in a permanent failure state, like a door that’s been haunted shut, preventing healthy operations even if the downstream service has recovered.
Conclusion
The Witch’s Brew Every architectural pattern, like a potion in a witch’s brew, has its ingredients and potential side effects. It’s the architect’s task to know the spells (patterns) well, be cautious of the dark corners, and apply them judiciously. Even the most powerful spells can backfire if not cast correctly. So, this Halloween, let’s respect the magic and mystery of our trade and watch out for those architectural ghouls and ghosts!
I am the CTO and Head of an architectural unit in a digital company. I participate in the development of technological strategy, design solutions, and lead R&D projects.
Thank you for reading! If you enjoyed this article, please feel free to 👏 and help others find it. Please do not hesitate to share your thoughts in the comments section below.
Scub Lab
Thank you for being a part of our community! Before you go:
- Be sure to clap and follow the writer! 👏
- You can find even more content at lab.scub.net 🚀
- Sign up for our free weekly newsletter. 🗞️
- Follow us on Twitter(X), LinkedIn, and our site web.