feat(claims-example): add example app demonstrating the Claims DDS#27573
Open
kian-thompson wants to merge 8 commits into
Open
feat(claims-example): add example app demonstrating the Claims DDS#27573kian-thompson wants to merge 8 commits into
kian-thompson wants to merge 8 commits into
Conversation
Add a new @fluid-example/claims-example app that showcases the Claims DDS running inside a real Fluid container. A custom ResourceManager data object hosts a Claims DDS and uses it to claim ownership of other DDSes by storing their IFluidHandles as claim values, across five scenarios (claim, cross-client read, first-writer-wins, race, compare-and-swap). Each call site handles the Claims API (trySetClaim / compareAndSetClaim and the ClaimResult Pending lifecycle) directly, rather than through a wrapper, so the example reflects real call-site usage patterns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (1183 lines, 20 files), I've queued these reviewers:
How this works
|
…check @fluidframework/test-utils is in the Tests layer (packages/test/). Listing it as a production dependency created an Examples -> Tests layer edge, closing a cycle (Examples -> Tests -> Tools -> Examples) and failing `flub check layers`. Match the convention used by every other example and depend on it as a devDependency instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CI build regenerates PACKAGES.md and fails if it differs from the committed copy. Adding a new package requires regenerating it via `npm run generate:packagesMd`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ms package The claims DDS was renamed from @fluidframework/claims to @fluid-internal/claims and its /internal subpath export was removed. Update the claims-example app's dependency and imports to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ChumpChief
reviewed
Jun 24, 2026
Rework the claims example into a simple UI for claiming free-form string keys. A single root ClaimsDataObject abstracts the Claims DDS behind a trySetClaim method, pairing each key with a handle to a backing SharedDirectory. Uses only trySetClaim (no CAS); on a lost race it switches to the winner's handle. The view reacts to a claimsChanged event to keep the owners table live. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
Contributor
Bundle size comparisonBase commit: Notable changesNo bundles changed by ≥ 500 bytes parsed. Per-bundle deltas
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
@fluid-example/claims-exampleapp that showcases the Claims DDS running inside a real Fluid container. The Claims DDS is currently an internal building block; the intent is for it to eventually live inside everyPureDataObject. Until that API exists, this example wires it up by hand inside a customResourceManagerdata object to show the underlying mechanics.The app runs two independent clients against an in-memory ordering service (
LocalDeltaConnectionServer) — everything else is real (container runtime, ops roundtripping through the service, handle serialization across clients). It claims ownership of resources by binding claim keys to theIFluidHandleof other DDSes, across five scenarios:SharedMapand claims its handle.Each call site handles the Claims API (
trySetClaim/compareAndSetClaimand theClaimResultPendinglifecycle) directly, rather than through a wrapper, so the example reflects what real call-site usage patterns look like.Reviewer Guidance
The review process is outlined on this wiki page.
This is opened as a draft. The Claims DDS has no public consumption path yet, so the example deliberately uses
/internalentry points.AB#74216