skip to content

Structural Styles

How a system is partitioned and deployed: monolith, modular monolith, layered, client-server, peer-to-peer, space-based, microkernel and dataflow pipelines. These are the shapes that determine what a deployment unit is before any distribution question comes up.

part ofSoftware design & architectureoverview, primer and where to startread it →
on this pageshow

questions

page 2 of 2

What does it mean to organize a module's code as 'vertical slices' by feature instead of by technical layer, and what specific problem does that solve compared to a controller/service/repository package split?

level: middleimportance: should knowfreq 50%

basics

~10 s

Instead of grouping all controllers together, all services together, all repositories together, you group everything one feature needs into a single place, so changing that feature means touching one folder, not five.

open as a page

Name and briefly contrast how OSGi, an IDE plug-in system like Eclipse's, and a rule engine each implement the core/plug-in split — what does 'core' and 'plug-in' concretely mean in each?

level: seniorimportance: should knowfreq 45%

basics

~20 s

OSGi is a Java framework where 'bundles' are the plug-ins and a service registry is the core. Eclipse's IDE core is the workbench/editor shell, and plug-ins add languages, tools, and views. A rule engine's core evaluates rules against facts, and each rule is the swappable unit.

open as a page

Pipes and Filters shows up in ETL jobs, streaming systems, and CLI toolchains, but it's a poor fit for some problems. What kind of problem should make you reach for a different architectural style instead?

level: seniorimportance: should knowfreq 50%

basics

~20 s

Pipes and Filters is great when work is a straight-line sequence of transformations on a stream of data. It's a bad fit when steps need to talk back and forth, share complex state, or when the order of work depends on business rules that don't map to a simple chain.

open as a page

How does REST, as an architectural style layered on HTTP, encode client-server request-response mechanics plus its statelessness constraint, and what does that constraint forbid a server from doing between requests?

level: seniorimportance: should knowfreq 65%

basics

~20 s

HTTP is built as a request-response protocol: a browser or app (client) sends an HTTP request to a URL, and a web server responds with data or a status. REST is a set of design rules on top of HTTP saying, among other things, each request must be self-contained (stateless) and resources should be handled through a uniform set of methods like GET/POST/PUT/DELETE.

open as a page

What is the 'sinkhole' anti-pattern in a strictly layered architecture, and what does it signal about how the layering was applied?

level: seniorimportance: should knowfreq 40%

basics

~20 s

A sinkhole is when a layer just passes a call straight through to the layer below without adding anything - no logic, no transformation, just forwarding. Lots of sinkholes mean the layering is adding busywork without adding value.

open as a page

A 6-person startup is deciding whether to build their new product as a monolith or as a set of independently deployed services from day one. What concrete reasons would favor starting as a monolith, and what signals would later tell them it's time to reconsider?

level: seniorimportance: should knowfreq 60%

basics

~20 s

With a small team and an unproven product, a monolith is faster to build, deploy, and change, and there's no clear reason yet to split it up. You'd reconsider once specific parts need different scaling, release cadence, or separate teams.

open as a page

Peer-to-peer networks experience high 'churn' -- peers constantly joining and leaving without warning. How does this affect a structured overlay's routing tables and stored data's availability, and what mechanisms mitigate it?

level: seniorimportance: should knowfreq 55%

basics

~20 s

Peers come and go all the time in a P2P network, like people wandering in and out of a crowd. If the network doesn't keep updating its 'who's near whom' info and doesn't keep spare copies of data on multiple peers, searches start failing and data can vanish when the one peer holding it leaves.

open as a page

In Space-Based Architecture, what job does the 'messaging grid' component do, and what synchronization problem does it have to solve when processing units are added or removed dynamically?

level: seniorimportance: should knowfreq 40%

basics

~20 s

The messaging grid is the traffic router — it sends each incoming request to the right processing unit and keeps everyone's data in sync as machines are added or removed on the fly, without stopping the system.

open as a page

For what kinds of systems is a classic layered/N-tier architecture a poor fit, and what would you reach for instead?

level: principalimportance: should knowfreq 35%

basics

~20 s

Layered architecture struggles when a system needs very low latency (extra layers add delay), or when features naturally cut across many capabilities rather than through one tech stack. In those cases, teams often use event-driven, microservices, or feature-sliced designs instead.

open as a page

For a platform with 30+ engineers and a domain that is still not well understood, what makes a modular monolith the wrong default choice, and what long-term organizational failure mode most often erodes a modular monolith's boundaries even after they were enforced correctly at launch?

level: principalimportance: should knowfreq 42%

basics

~20 s

It's the wrong pick mainly when a domain is still changing shape fast, so boundaries would be guessed wrong and redrawn constantly, or when different parts genuinely need very different scaling/tech - and even a well-built one can rot years later if governance around the enforcement rules quietly weakens.

open as a page

For which kinds of workloads would you advise against adopting Space-Based Architecture, even though it scales well under bursty load, and why?

level: principalimportance: should knowfreq 35%

basics

~20 s

It's a bad fit when data is too big to fit affordably in memory, when you need strict, immediate correctness guarantees everywhere (like banking transfers), or when your load is steady rather than bursty — you'd be paying a lot of complexity and memory cost for a benefit you don't actually need.

open as a page

Beyond the general isolation-vs-overhead trade-off, what specific production failure modes have you seen or would you expect in mature microkernel/plug-in systems, and when would you actively steer a team away from this pattern?

level: principalimportance: nice to knowfreq 35%

basics

~20 s

Plug-in systems can fail in tricky ways: a plug-in crashing the whole app if isolation is weak, version conflicts between plug-ins, and slow startup as plug-ins pile up. Skip this pattern if you don't actually have many independent, optional features.

open as a page

In a multi-stage batch pipeline (e.g. extract -> validate -> transform -> load), a crash happens partway through processing a large batch after some records have already reached the load stage. What are the main strategies for making the pipeline recoverable, and what does each guarantee?

level: principalimportance: nice to knowfreq 35%

basics

~20 s

You need a way to know exactly where the pipeline got to when it crashed, so you can restart safely instead of redoing everything (which can duplicate data) or skipping ahead blindly (which can lose data). The main tools are checkpoints, making each step safe to repeat, and hiding half-finished batches from readers.

open as a page

You're designing a system where thousands of IoT sensors at a remote site must keep functioning and buffering data during hours-long internet outages, then sync when connectivity returns. Why is a naive client-server design a poor fit here, and what architectural adjustments address it?

level: principalimportance: nice to knowfreq 35%

basics

~20 s

Plain client-server needs the client to reach the server for almost everything, so if the network is down for hours, a naive client-server design just stops working. The fix is to let the client keep a local copy of data and logic so it can operate offline, then sync with the server once the connection comes back.

open as a page

Companies like Shopify and Stack Overflow ran large parts of their production systems as a single monolithic codebase (Ruby and C# respectively) at very high traffic rather than splitting into many independently deployed services. What scaling techniques let a single-deployable-unit application handle very high load, and what limits does that approach eventually run into that a monolith alone can't solve?

level: principalimportance: nice to knowfreq 40%

basics

~20 s

Run many identical copies of the app behind a load balancer, plus a stronger or split-up database. This works until the shared database, or one hot feature, can't keep up no matter how many copies you run.

open as a page

What is a Sybil attack against a peer-to-peer network's discovery/routing layer, and why is it particularly damaging to a structured overlay like Kademlia compared to simply degrading service?

level: principalimportance: nice to knowfreq 30%

basics

~20 s

A Sybil attack is when one person pretends to be hundreds or thousands of different peers using fake identities. If enough fake peers surround the part of the network responsible for a specific piece of data, the attacker can quietly control access to that data or hide it, since new peers only trust who the network tells them to trust.

open as a page

showing 31–46 of 46