Skip to main content
Knowledge mapHow do FS, JSON, KV and DID Space differ?ArcBlock

You are here. See how this question connects to other ideas.

Select a node to open its page · Expand to read within the map

Knowledge mapFollow a connection. Understand a question.
← AFS

One question

How do FS, JSON, KV and DID Space differ?

Common operations preserve differences in location, structure and persistence.

Start with the same report

ProviderUseful mental modelDo not infer
FSAn allowed local filesystem scopeAccess to every host path
JSONAddressable nodes in JSON structureDatabase transactions for every field update
KVValues organized by keysIdentical ordering or transactions across backends
DID SpaceResources in an owned data spacePermission merely from knowing its DID

Reading a report title may use similar AFS operations while the value comes from a parsed file, an object field or a remote space. Applications rely on declared, implemented behavior, not the provider’s name.

Before replacing a backend

List the capabilities consumers actually depend on: persistence, pagination, conditional writes, notifications and error categories. Check both successful and rejected operations after replacement. A single in-memory instance cannot establish cross-process persistence or concurrency correctness.

Exercise: after replacing JSON with KV, which task references should remain stable? Which ordering and update conditions need verification? Answer from the contract rather than assuming automatic compatibility.

Place the report in an actual store

These are four illustrative representations of one business object, not automatically shared provider paths:

  • FS: an allowed directory contains report.json, with title and status in the file.
  • JSON: a document contains a report object with a title field.
  • KV: the key report identifies a value containing title and status. KV means key-value storage.
  • DID Space: the report lives in a data space with identity and access controls. A DID is a decentralized identifier; knowing an identifier does not grant access.

Persistence belongs to the backing implementation. Check disk writes, KV durability and remote availability separately. Keeping /work/report when changing stores requires an explicit mapping contract.

Exercise: replace the JSON report with a KV value. Check the returned structure and any version conditions on updates before treating the replacement as compatible.

Check your understanding

How do FS, JSON, KV and DID Space differ?

Common operations preserve differences in location, structure and persistence.

Continue along a learning path