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 reply

No account needed. All records and results belong to the toy model.

One possible request trace
  1. ClientSend request-17same intended job
  2. ServerCreate job-001reply is lost
  3. 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.

Receiver behavior

Both deliveries carry request-17. The example assumes a single atomic record for the key and the created job.

Recorded result

Two deliveries of request-17 create 1 background job in this synthetic model. The server reuses the job recorded for this request identity.
Request delivery trace
StepObservationEffect
1Delivery 1: the server receives request-17.Create job-001; total jobs: 1.
2The first reply is lost. The client observes no acknowledgement.The already-created job remains. A missing reply does not undo the server effect.
3Delivery 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.

Delivery and update rules

Both versions describe the same job. A single producer assigns increasing version numbers.

Recorded result

Final synthetic state: completed version 3. Ignored updates: 1. The version guard accepts only strictly greater versions.
Event application trace
StepObservationEffect
1The synthetic entity starts queued at version 1.Stored state: queued version 1.
2Arrival: completed version 3.Accept the update. Stored state: completed version 3.
3Arrival: 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.

Read source

The authoritative record stays at version 2 in this experiment. Changing the cache selector does not change that record.

Recorded result

The selected cache returns queued version 1. This read is stale relative to the authoritative completed version 2 record. No network latency is measured.
Read observation trace
StepObservationEffect
1The authoritative record is completed version 2.Primary state in this model: completed version 2.
2The cache contains queued version 1.The cached version lags the authoritative record.
3Read 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