Architecture Anti-Patterns: The DARK Side of the Architect
Shed light on the specters that haunt our architectural decisions and understand how to exorcise the demons that threaten our digital sanctuaries.
Join the DZone community and get the full member experience.
Join For FreeAmid 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 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. Read more in my post, "Multi-Tenancy With Keycloak, Angular, and SpringBoot."
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. For more, see "Backend For Frontend (BFF) Pattern."
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!
Opinions expressed by DZone contributors are their own.
Comments