Standalone conceptStyleChapter II · Styles & patterns · Building block 6 of 11

Peer-to-Peer

Peer-to-peer distributes selected roles among participants that can provide and consume capabilities.

  1. PeerNodes provide and consume capabilities.
  2. NetworkConnections form a topology.
  3. RulesIdentity and conflicts need mechanisms.

Context

Why this is important

Distinguish decentralised peer nodes from a central client-server arrangement and assess their coordination.

A network and collaboration structure; identity, reachability and conflict handling need explicit design.

Shop example · Mapping

Central shop and peer network

The merchant network is hypothetical. The current shop and its seven modules remain centrally operated.

This is how you read the picture

  1. Peer equal role
  2. Network connections
  3. Rules coordination
Central shop and peer network
AspectFormEffect
OfferPlatform publishes.Peers publish independently.
ChangePlatform resolves conflicts.Peers need conflict rules.
The matrix compares exchange and coordination.

Benefits & limitations

Helps if:

  • Participants need to provide and consume services independently.
  • Central mediation would undermine an established decentralisation goal.

Boundaries

  • Availability and consistency are harder under partitions and changing peers.
  • A P2P structure does not automatically solve identity, trust or conflict handling.

In practice

  1. For each use case, identify participating peers, offered information and discovery path. Assign data ownership and access rights for each offer before nodes communicate directly.
  2. Define identity, freshness rules and conflict handling before multiple peers work on the same fact. Specify how updates propagate and competing changes are detected.
  3. Assess network partitions, stale offers and malicious peers using concrete failure cases. Compare retries, fallback and operations with a central platform before choosing decentralisation.
Read the detailed explanation

Peers can switch roles depending on the interaction. A decentralised network still needs rules for membership, identity, discovery and distribution.

Nodes may be intermittently unreachable, hold different data versions and face conflicts. Replication, trust and abuse prevention shape the concrete design.

Peer-to-peer describes network roles; Microservices describe independently deployed services, while the shop runs as a Modular Monolith.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    What is hypothetical in the extension?

    View the solution with justification

    Stock exchange among equal merchant nodes.

  2. ApplyingTransferred to a new situation

    How can a node detect stale stock offers?

    View the solution with justification

    With timestamps, ownership and an explicit freshness rule.

  3. EvaluateWeighing an alternative

    When is peer-to-peer worth the coordination cost?

    View the solution with justification

    When decentralised participation supports an established product value.