Back to the catalogue Courses

Information system architecture

Map an IS, choose between monolith and services, make data reliable, document decisions and prepare operations.

MDJAD Intermediate 13 min read

Objectives and prerequisites

By the end of this course, you will be able to describe an information system, map what exists, arbitrate an application split, define integrations and data, then document decisions. The common thread is Mdjad’s IS: catalogue, orders, support and editorial content, operated by a small team.

Prerequisites: know the basics of relational databases, a web framework and deployment (courses F04 and F08). Examples use textual diagrams, SQL, YAML and JSON events. No proprietary tool is required.

Path: chapters 1 to 3 establish the IS, mapping and requirements; chapters 4 to 6 cover splitting, integration and data; chapters 7 to 9 cover security, operations and documentation; chapter 10 assembles the architecture dossier.

Convention: an architecture is judged on the decisions it makes possible and those it makes expensive. Each chapter contrasts a simple option with a distributed one and its costs. Diagrams are deliberately small; an unreadable diagram often hides an undecided choice.

1. What an information system is

An information system connects data, processes, actors and applications to deliver a service. It is not limited to software: procedures, responsibilities and informal exchanges are part of it. An application is only one component of a larger whole.

Actors       : visitors, customers, Mdjad team, support
Processes    : publish content, place an order, handle a request
Data         : catalogue, accounts, orders, messages, consents
Applications : public site, back office, API, email, invoicing
Infrastructure : hosting, database, storage, backups, monitoring

The IS has a purpose: make work possible and measurable. A catalogue without an update process becomes wrong; an order without tracking becomes a complaint. The useful question is not “which application should we add?” but “which process do we want to make reliable?”.

Urbanisation is the discipline that organises this whole over time. It targets coherence, readability and evolvability, not novelty. An IS map shows applications, their responsibilities and their flows. Without a map, every new need adds another connection.

Mdjad’s IS is deliberately small: a Symfony site, a MariaDB database, emails, a back office, a catalogue API and versioned content. The difficulty is not volume but coherence between these parts and the ability to evolve them without hidden debt.

Finally, distinguish the internal IS from the exposed IS. Internal tools can be less polished; public interfaces must be stable, accessible and documented. The boundary between the two is an architecture decision, not a deployment detail.

2. Mapping what exists

Mapping starts with a factual inventory: applications, databases, flows, owners, criticality and costs. It is verified in the field, not in organisation charts. An “official” application may be unused while a spreadsheet does the real work.

Application    | Responsibility             | Master data        | Criticality
Public site    | Showcase, content, contact | Content            | Medium
Back office    | Administration, support    | Accounts, orders   | High
Catalogue API  | Read products, stock       | Products, stock    | High
Email          | Notifications, support     | Messages           | High
Invoicing      | Quotes, invoices           | Customers, amounts | High

For each flow, note direction, frequency, format and owner. A daily CSV file does not have the same constraints as a real-time call. A flow without an owner is an orphan flow: nobody fixes it when it breaks.

Criticality is measured by the impact of unavailability, not by technology. The public site can be down for an hour; order taking or invoicing cannot. This distinction guides backups, tests and investment.

Also map personal data: where it is collected, where it is stored, who accesses it and how long it is kept. An application inventory without a data inventory cannot answer a GDPR request.

Finally, date the map and name its owner. A map that is not maintained becomes fiction. A quarterly review, even a short one, is better than a perfect document that is out of date.

3. Requirements, constraints and qualities

A functional requirement describes behaviour: “a customer can track their order”. A non-functional requirement describes a quality: performance, availability, security, maintainability, cost. The latter are often forgotten even though they determine architecture.

Availability   : 99.5 % during business hours, 99.0 % at night
Performance    : catalogue page < 500 ms at the 95th percentile
Security       : MFA for administration, least privilege
Backup         : RPO 15 min, RTO 4 h for orders
Accessibility  : WCAG 2.2 AA on public journeys
Maintainability: one developer ships a fix in one day

Each requirement must be measurable and paired with a verification method. “Fast” is not a requirement. A service level objective (SLO) is measured over a window and translated into an error budget. Without measurement, quality becomes an opinion.

Constraints limit options: budget, skills, hosting, regulation, deadlines. An accepted constraint is better than a denied one. If the team has two people, splitting into ten autonomous services is a constraint disguised as ambition.

Rank requirements by risk. A security or data-retention requirement is not negotiated like an interface preference. Involve stakeholders early: support, legal, operations and end users see constraints developers ignore.

Finally, accept explicit trade-offs. An architecture that claims to satisfy everything often satisfies nothing. Write down what you sacrifice: for example, strong consistency between services is abandoned for availability, with documented reconciliation.

4. Splitting: modular monolith or services

Splitting targets cohesion: group what changes together and separate what changes for different reasons. A modular monolith offers clear internal boundaries, a single deployment and local transactions. It is often the right choice for a small team.

<?php
// Explicit module boundary: the Orders module does not depend on the web interface.
namespace App\Orders;

final readonly class PlaceOrder
{
    public function __construct(private OrderRepository $orders, private Clock $clock)
    {
    }

    public function __invoke(int $customerId, array $lines): Order
    {
        return Order::place($customerId, $lines, $this->clock->now());
    }
}

Microservices add network boundaries, independent deployments and team autonomy. They also add latency, partial failures, data duplication, distributed observability and versioning complexity. That cost is justified by a real need for scale or autonomy, rarely by principle.

A “distributed monolith” combines the drawbacks: tightly coupled services, coordinated deployments and distributed transactions. If two services must always change together, they are probably one module. The boundary should follow the business, not the temporary organisation chart.

Domain-driven design bounded contexts help name boundaries: the word “product” does not mean the same thing in catalogue, invoicing and support. A single model shared across all contexts becomes ambiguous. Each context should have its own language and model.

Finally, start with a modular monolith and extract a service only when a measurable pressure justifies it: load, delivery cadence, failure isolation or compliance. The reverse extraction is far more expensive than waiting.

5. Integrating: calls, events and consistency

A synchronous integration calls a service and waits for its response. It is simple to understand and suited to immediate reads. It propagates failures and creates dependency chains: if invoicing slows down, ordering slows down.

{
  "event_id": "evt_20261023_0001",
  "type": "order.placed",
  "occurred_at": "2026-10-23T10:15:00+03:00",
  "aggregate_id": "order-1234",
  "payload": {"customer_id": 42, "total_cents": 700, "currency": "EUR"}
}

An asynchronous integration publishes an event and does not wait. It decouples in time, absorbs peaks and enables independent consumers. It requires idempotent events, a defined order, failure handling and a trace of what has been processed.

The outbox pattern solves the double-write problem: the event is written in the same transaction as the business data, then published by a relay. Without outbox, a failure between the database and the queue loses or duplicates events. The outbox table is small but decisive.

For distributed transactions, avoid heavy protocols when a saga is enough. A saga chains local steps and compensations. It must define what happens if a compensation fails: alert, manual intervention or retry queue.

Finally, choose the integration contract: an immutable fact event or an explicit command. An event describes what happened; a command requests an action. Mixing the two makes consumers fragile and replays ambiguous.

6. Data: source of truth and consistency

Each piece of data must have a source of truth: the place where it is created and corrected. Copies are projections, not origins. Without this rule, two applications correct the same customer and silently diverge.

-- The order keeps the applied price, even if the catalogue changes later.
CREATE TABLE order_line (
    id            BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    order_id      BIGINT UNSIGNED NOT NULL,
    product_id    BIGINT UNSIGNED NOT NULL,
    product_name  VARCHAR(255) NOT NULL,
    unit_cents    INT UNSIGNED NOT NULL,
    quantity      SMALLINT UNSIGNED NOT NULL,
    CONSTRAINT fk_order_line_order FOREIGN KEY (order_id) REFERENCES orders (id)
);

An order is a historical fact: it must keep the price, name and VAT applied at purchase time. Reading the current catalogue price to display an old order produces accounting discrepancies. Copying data is legitimate when the copy is an accepted snapshot.

Strong consistency is easy in a single database and expensive between services. Eventual consistency accepts a delay and requires reconciliation: a job compares projections, reports discrepancies and allows replay. Without reconciliation, eventual consistency becomes tolerated inconsistency.

Data migrations are risky operations. Proceed in steps: add a column, write in both formats, migrate in batches, verify, then remove the old one. A destructive one-pass migration is hard to roll back and blocks deployments.

Finally, define retention and deletion. Data whose deletion date is unknown is a legal debt. Deletion must propagate to copies, to backups according to policy, and to logs.

7. Security and compliance by design

Security is designed by zones and flows: who talks to whom, with which identity, over which network. The back office must not be exposed like the public site. The database must not be reachable from the Internet. Least privilege applies to humans and services.

Internet → WAF/proxy → public site → internal API → database
Internet → VPN/MFA → back office → administration services
Services → secrets → logs → monitoring (restricted access)

Authenticate people and machines separately. A service uses a dedicated identity, minimal rights and secret rotation. Do not reuse the administrator account for automated tasks. Logs must show who did what without storing secrets.

GDPR compliance translates into technical decisions: minimisation, purpose, retention period, access and erasure rights, processing register, subcontracting agreements. These topics are not added afterwards; they shape data schemas and flows.

Dependency security is part of architecture. An abandoned library, an outdated container image or a secret in a repository are structural vulnerabilities. Automate scanning and treat alerts as incidents.

Finally, prepare the response: retained logs, contacts, notification procedure, tested backups. An architecture without a response plan assumes nothing will happen. A drill, even a simple one, reveals blind spots.

8. Operations, resilience and costs

An architecture exists only if it can be operated. Define service level objectives, dashboards, alerts and on-call. A system without monitoring fails without anyone knowing, or worse, fails and nobody understands why.

service: catalogue-api
slo:
  availability: 99.5
  latency_p95_ms: 500
alerts:
  - name: error_rate_high
    condition: errors_5xx / requests > 0.02
    window: 5m
  - name: db_backup_missing
    condition: last_backup_age_hours > 26

Backups are only worth something if a restore has been tested. Define the RPO — how much data you accept losing — and the RTO — how long you accept downtime. These two numbers guide frequency, storage and cost.

Resilience is built through failure isolation: timeouts, retries with backoff, circuit breakers, dead-letter queues. An unbounded retry worsens the failure. An unmonitored dead-letter queue is a silent loss of messages.

Cost is part of architecture. An oversized service, logs kept indefinitely or unnecessary network calls cost every month. Measure, then optimise what weighs most. Performance and cost do not always oppose each other: avoiding a superfluous call saves both.

Finally, document operations: deployment, rollback, restore and incident procedures. A short, current runbook is better than exhaustive documentation nobody reads during an outage.

9. Documenting and deciding: ADR, C4 and debt

An architecture decision deserves a record: context, options, decision, consequences. The ADR (Architecture Decision Record) format is short and dated. It explains why, not only what. Without ADRs, the same debates restart every year.

ADR-007 — Version the API in the URI
Context: web and mobile clients, small team, compatibility need.
Options: header, media type, /v1 path.
Decision: /v1 path, deprecation announced 6 months ahead.
Consequences: explicit routes; temporary duplication during breaks.

The C4 model describes the system at four levels: context, containers, components and code. The first two are often enough. A context diagram shows actors and neighbouring systems; a container diagram shows applications, databases and queues. Only go down to code if it clarifies a decision.

A shared glossary prevents misunderstandings: “customer”, “account”, “order”, “content” must have a stable definition. Undefined synonyms create divergent models. The glossary is an architecture artefact, not a decorative document.

Technical debt is kept as a register: description, impact, repayment cost, deadline. Not all debt is bad; accepted and dated debt is an investment. Ignored debt becomes an invisible constraint that slows every delivery.

Finally, review architecture at regular intervals and after every major incident. A review without a decision is a ritual; a review that produces ADRs and dated actions changes the system.

10. Summary: Mdjad’s IS architecture dossier

The dossier gathers the IS map, requirements, decisions, diagrams, data flows and risks. It fits in a few useful pages, with links to ADRs and runbooks. Its purpose is to let a newcomer understand and the team decide.

1. Context and actors
2. Functional requirements and measurable qualities
3. Application and flow map
4. Chosen split and boundaries
5. Master data, copies and retention
6. Security, compliance and zones
7. Operations, SLOs, backups and incidents
8. Risks, debt and evolution plan
9. ADRs and glossary

For Mdjad, the chosen option is a modular Symfony monolith, a MariaDB database, a versioned catalogue API and asynchronous integrations limited to notifications. This choice is consistent with team size and delivery requirements. It does not prevent extracting a service later.

The main risks are dependence on one person, lack of fine-grained monitoring, untested backups and content drift. Each has an owner, a measure and an action. The dossier does not claim to remove risks; it makes them visible and manageable.

Overall coherence comes from traceability: each requirement points to a decision, each decision to a component, each component to a runbook. When something changes, you know what to reassess. This chain, more than the beauty of the diagrams, gives the dossier its value.

Finally, the dossier is alive. It is reviewed before every major evolution and updated after every incident. An architecture documented once and forgotten becomes fiction again, with the added illusion of control.

Exercise 1 — Map a flow

Describe the “place an order” flow: actors, applications, data, direction and criticality. Who owns each step?

Solution

The customer submits the order on the site; the site calls the orders API; the API writes the order and the outbox in MariaDB; a relay publishes order.placed; the email service notifies; invoicing consumes the event. The site and API own order taking; email and invoicing are consumers. Criticality is high end to end.

Exercise 2 — Choose a split

A team of three developers hesitates between a modular monolith and five microservices. Which arguments should they keep?

Solution

The modular monolith reduces operational cost, keeps local transactions and simplifies deployment. Microservices bring a benefit only if measurable autonomy or scale justifies it. With three people, five services multiply on-call and network contracts. Start with clear modules and extract later.

Exercise 3 — Outbox and double write

Why write the event in the same transaction as the order? What happens otherwise?

Solution

The same transaction guarantees that the order and the event exist together or not at all. Without outbox, a failure between the database write and the queue publish loses or duplicates the event. The relay reads the outbox and publishes idempotently; it can replay after an incident.

Exercise 4 — Historical data

Why must an order line keep the product name and price? Give a case where reading the current catalogue is wrong.

Solution

The order is a past fact. If the product is renamed or its price changes, reading the current catalogue rewrites history and falsifies the invoice. Keep a snapshot: name, unit price, currency, applied VAT. The catalogue remains the source of truth for future purchases, not past orders.

Exercise 5 — SLO and backup

A service targets 99.5 % availability. How many minutes of downtime per month does that allow? How do you verify the backup?

Solution

99.5 % over 30 days allows about 216 minutes, or 3 h 36. The backup is verified by an actual restore in an isolated environment, at a defined frequency. An unrestored backup is only a hypothesis. Document the RPO and RTO and measure them.

Exercise 6 — ADR

Write a short ADR on versioning the API in the URI. Include a negative consequence.

Solution

Context: web and mobile clients, small team, compatibility required. Options: header, media type, path. Decision: /v1 path, deprecation announced six months ahead. Consequences: readable routes and simple caching; temporary route duplication during breaks and risk of forgetting old versions.

Final project — Architecture dossier

Produce an architecture dossier for a ten-person IS: application and flow map, measurable requirements, split, data model, integrations, security, operations and ADRs. The dossier must fit in ten pages and be defensible before a non-technical manager.

Criteria: actors and processes identified; measurable requirements; justified boundaries; source of truth per data item; integrations with idempotency and failures; security zones; SLOs, backups and RTO; dated risks and debt; ADRs and glossary; no invented personal data.

Common mistakes and diagnosis method

Common mistakes: confusing an application with an IS; mapping without owners; choosing microservices without measurable pressure; sharing a database between services; forgetting the outbox; reading the catalogue for a past order; documenting without a dated decision; believing a backup exists without a tested restore.

Method: start from the process and the data, not the technology. For each flow, ask who owns it, which failure is acceptable and how it is detected. For each decision, write the rejected option and its cost. For each risk, name an owner and a deadline.

Self-assessment

You must be able to explain the difference between an IS and an application, map a flow with its owner, turn a quality into a measurable SLO, justify a split and describe a reliable asynchronous integration.

Self-assessment: I can cite three measurable non-functional requirements; I can explain why a modular monolith is often enough; I can describe the outbox and reconciliation; I can name master data and its retention. To go further, study domain-driven design, sagas and the C4 model.

References