A small laboratory for software behavior
Run a request twice.
Inspect the result.
Three browser experiments about retries, event order and stale data. Change a rule, replay a synthetic trace and compare the recorded state.
Start with a lost replyNo account needed. All records and results belong to the toy model.
- ClientSend request-17same intended job
- ServerCreate job-001reply is lost
- ClientRetry request-17inspect server behavior below
A missing reply leaves the client with an unanswered question.
Experiment 01 / request identity
After a lost reply, the job can still exist.
The first delivery creates a background job, then its reply disappears. A retry reaches the same server. Compare a receiver that remembers the request key with one that treats every delivery as new work.
Recorded result
| Step | Observation | Effect |
|---|---|---|
| 1 | Delivery 1: the server receives request-17. | Create job-001; total jobs: 1. |
| 2 | The first reply is lost. The client observes no acknowledgement. | The already-created job remains. A missing reply does not undo the server effect. |
| 3 | Delivery 2: the server receives request-17. | Reuse job-001. No additional background job is created; total jobs: 1. |
Question to carry forward: Which record lets the receiver recognize the same intended operation?
Experiment 02 / arrival order
An older event can arrive last.
One invented job starts in the queued state at version 1. Its producer emits processing at version 2 and completed at version 3. Delivery can reverse their order. Watch what the receiver stores under each rule.
Recorded result
| Step | Observation | Effect |
|---|---|---|
| 1 | The synthetic entity starts queued at version 1. | Stored state: queued version 1. |
| 2 | Arrival: completed version 3. | Accept the update. Stored state: completed version 3. |
| 3 | Arrival: processing version 2. | Ignore version 2: it is not strictly greater than stored version 3. Stored state remains completed version 3. |
Question to carry forward: What gives two updates a comparable order for this particular record?
Experiment 03 / observation source
Read a value from an older copy.
The authoritative record is completed at version 2. The cached copy may still say queued at version 1. Choose where the reader looks and inspect the version it receives.
Recorded result
| Step | Observation | Effect |
|---|---|---|
| 1 | The authoritative record is completed version 2. | Primary state in this model: completed version 2. |
| 2 | The cache contains queued version 1. | The cached version lags the authoritative record. |
| 3 | Read from the selected source: cache. | Return queued version 1. This selected read is stale relative to primary version 2. |
Question to carry forward: Which source and version produced the value on the screen?
What the experiments separate
Attach the conclusion to its evidence.
- Delivery
- A request can reach a receiver more than once.
- Operation
- The receiver's contract determines which deliveries create new work.
- Version
- For the stated event model, a later arrival can carry an older version.
- Read
- A displayed value belongs to the source and version that supplied it.
These topics also appear in the custom software development work at Pharos Production, particularly where application architecture and integrations meet. The exercises here use synthetic job records and make no claims about a client implementation.
Read the assumptions behind the models