Skip to main content
Cyber Defense StudioIoT Security and PrivacyExperimentsWorkspaces
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
BLOCKCHAIN FOR IoT · BC-M03
Blockchain for IoT

Decentralization, replication and CAP

Dr. Mohammad Alja’afreh · Princess Sumaya University for Technology

Replica APartitionReplica B
Design experiment & verify evidence →
BC-M03 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice

← Lecture-aligned module experiments · All blockchain labs · Setup wizard

Introduction

Decentralization · partition and replica state

Eight-node ring with opposite links removed; two four-node components
Eight-node ring with opposite links removed; two four-node components

Scientific architecture · Decentralized topology, CAP and DHT routing

Replicated peers and network partition — Replica A / value 10; Replica B / value 10; Partition / links fail; Write / policy chooses availability or consistency; Heal / reconcile according to policy
Scientific concept map: Peers — Distributed topology; Replication — Independent copies; Partition — Cut communication; CAP policy — Consistency or availability; Reconciliation — Resolve divergence.

Scientific foundations and analytical reasoning

Graph reachability depends on topology and failures. Under a partition, consistency-first behavior may reject writes while availability-first behavior permits divergent replicas.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

BC-M03 · Academic orientation

Scope and objectives

Scope of the experiment

Compare a consistency-first replicated store against an availability-first store during a network partition. Explore disintermediation, replication and the CAP trade-off.

The focus of this experiment is to compare replication, decentralization and consistency assumptions. Students then trace partition scenarios under the stated CAP model, and justify availability and consistency trade-offs. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Compare replication, decentralization and consistency assumptions.
  • Trace partition scenarios under the stated CAP model.
  • Justify availability and consistency trade-offs.
  • Identify the configured inputs (Network participants; Topology; Network condition; Replication policy; New replica value) and record the corresponding observed outputs with units where applicable.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can compare replication, decentralization and consistency assumptions, trace partition scenarios under the stated CAP model, and justify availability and consistency trade-offs.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing justify availability and consistency trade-offs. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the foundational terminology in Concepts and confirm readiness using the existing setup instructions. After completion, continue to Blockchain domain and membership.

Environment and experimental methodology

The listed browser model and experiment-specific local Python, Solidity or EVM workflow, where provided. Do not treat a model as a deployed ledger.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

Scientific theory · Replication and partition trade-offs

Decentralization distributes control or work among participants; a replicated store maintains multiple copies. Under a partition, CAP's consistency property concerns a single-copy view, while availability requires responses from nonfailed nodes. A consistency-first policy can reject operations rather than permit divergent states. Reconciliation after recovery needs a conflict policy.

Worked example and engineering interpretation

Replicas A and B start at 10. A write of 42 during a partition can be rejected by a consistency-first policy or accepted on A under an availability-first policy, leaving B at 10. The example is a simplified teaching store, not a complete distributed consensus protocol.

Engineering principles · additional worked teaching example

A partition interrupts communication between replicas. Consistency means clients observe the specified coherent state; availability means non-failing nodes respond under the model. During a partition a strong-consistency design may reject writes; an available design may reconcile divergent histories.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

Worked engineering reasoning and boundary conditions

Engineering reference configuration: Network participants = 8; Topology = ring; Network condition = partition; Replication policy = CP; New replica value = 42; DHT content key = sensor-A; DHT owner retained content = true. In the classroom model, Reachable from first live node = 4; Write accepted = No; Replica A = 10; Replica B = 10; Content retrievable = Yes. The model separates network reachability, write availability, replica agreement and content persistence. Two-replica single-writer reconciliation and bounded graph/DHT model; not a distributed consensus or IPFS implementation.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · topology and link dependencies

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

Decentralization, replication and CAP: topology and link dependenciesN0N1N2N3N4N5N6N7

Step 1 of 6 · Connection 1

Connection 1

Link 1
0 → 1 · link

Teaching example only; inspect live calculations or real practical evidence separately.

How to investigate Decentralization, replication and CAP

Compare a consistency-first replicated store against an availability-first store during a network partition. Explore disintermediation, replication and the CAP trade-off.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Compare a consistency-first replicated store against an availability-first store during a network partition. Explore disintermediation, replication and the CAP trade-off.

  1. Use ring, eight nodes and partition. Inspect edges, connected components and the two replica values. CP rejects a write of 42 while partitioned.
  2. Switch only policy to AP. Observe A=42 and B=10 before recovery; after recovery the model propagates the single accepted write.
  3. Restore healthy connectivity and compare CP and AP writes.
  4. Choose star and fail hub, then choose mesh under the same failed node. Compute reachable live nodes for each topology.

Reference check: CP blocks the isolated write; AP accepts it locally and replicas temporarily differ. Recovery restores agreement under the stated policy.

Model boundary: Two-replica teaching abstraction with one writer and explicit last-version reconciliation, not a production distributed database.

Independent task and submission evidence

2. Switch only policy to AP. Observe A=42 and B=10 before recovery; after recovery the model propagates the single accepted write. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Compare a consistency-first replicated store against an availability-first store during a network partition. Explore disintermediation, replication and the CAP trade-off.

Learning goals

  1. Explain the mechanism using the actual intermediate states in this experiment.
  2. Predict and verify the reference and modified conditions described below.
  3. Interpret the acceptance criteria and identify the limits of the model.

Module flashcards · 12 questions

Browse all 12 questions and explanations
What is a network partition?

A communication failure that prevents replicas from exchanging messages.

What does CP sacrifice in this model?

Availability of writes during the partition to preserve consistency.

What does AP sacrifice here?

Immediate consistency between replicas.

Why define a conflict policy?

Recovery requires a deterministic way to reconcile divergent state.

Does CAP mean a system can never have all three properties?

The trade-off is required under a partition; healthy networks can provide both consistency and availability.

What is disintermediation?

Removing an intermediary from a service workflow.

Why is competition not full decentralization?

Selecting among intermediaries can reduce monopoly without removing intermediaries.

Why is the recovery rule deliberately limited?

A single-writer last-version rule does not solve concurrent multi-writer conflict resolution.

With healthy CP and a new value of 42, what do A and B store?

Both store 42.

With partitioned CP, what happens to the write of 42?

It is rejected; both replicas retain 10.

With partitioned AP, what are the values before recovery?

A stores 42 and B retains 10.

After recovery in this experiment, why do replicas agree?

The single-writer last-version reconciliation rule propagates the accepted value.

Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research