You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional --lws-mode flag to support W3C Linked Web Storage (LWS) protocol semantics alongside the current Solid Protocol/LDP implementation.
Status: 📋 Draft/Exploratory - LWS spec is in early stages (PR #37 just merged Jan 2026) Priority: Low (monitor ecosystem first) Related:w3c/lws-protocol#37
Background
What is LWS?
The W3C Linked Web Storage protocol suite defines CRUD operations with different conventions than Solid/LDP:
POST for creation (server-assigned URIs with Slug hints)
PUT for updates only (not creation)
Link headers for metadata (removes slash semantics for containers)
Mandatory ETag concurrency control
JSON Merge Patch for metadata updates (via separate linkset resources)
Current State: LDP/Solid
JSS implements Solid Protocol conventions based on LDP:
✅ PUT creates or updates resources
✅ Trailing slash indicates containers
✅ POST to containers with Slug support
✅ ETag-based If-Match/If-None-Match
✅ N3 Patch and SPARQL Update for RDF modifications
exportasyncfunctionhandlePut(request,reply){constlwsMode=request.lwsMode||false;if(lwsMode){// LWS: PUT only for updatesconststats=awaitstorage.stat(storagePath);if(\!stats){returnreply.code(404).send({error: 'Use POST to create resources in LWS mode'});}}else{// LDP: PUT creates or updates (current)constexisted=stats \!==null;}}
2. Container Detection Toggle (src/utils/url.js)
Effort: 4 hours
exportfunctionisContainer(urlPath,request){if(request?.lwsMode){// LWS: Check Link header for Container typeconstlinkHeader=request?.headers?.link||'';returnlinkHeader.includes('ldp#Container');}else{// LDP: Trailing slashreturnurlPath.endsWith('/');}}
Summary
Add optional
--lws-modeflag to support W3C Linked Web Storage (LWS) protocol semantics alongside the current Solid Protocol/LDP implementation.Status: 📋 Draft/Exploratory - LWS spec is in early stages (PR #37 just merged Jan 2026)
Priority: Low (monitor ecosystem first)
Related: w3c/lws-protocol#37
Background
What is LWS?
The W3C Linked Web Storage protocol suite defines CRUD operations with different conventions than Solid/LDP:
Current State: LDP/Solid
JSS implements Solid Protocol conventions based on LDP:
Key Differences
/alice/)rel="type"/)Proposed Implementation
Configuration Flag
Code Changes Required
1. PUT Handler Split (src/handlers/resource.js)
Effort: 3 hours
2. Container Detection Toggle (src/utils/url.js)
Effort: 4 hours
Files affected: src/utils/url.js, src/handlers/resource.js, src/handlers/container.js, src/ldp/headers.js
3. Linkset Metadata Endpoints (new)
Effort: 8 hours
New file:
src/handlers/linkset.jsGET /resource;linkset- Return metadata as JSONPATCH /resource;linkset- JSON Merge Patch for user-managed metadata4. Config Infrastructure
Effort: 2 hours
Add
--lws-modeflag to CLI and config system.5. Testing Matrix
Effort: 12 hours
Duplicate all CRUD tests for LWS mode (223 tests × 2 modes = 446 tests total).
Complexity Assessment
Trade-offs
Pros ✅
Cons ❌
Decision Criteria
Do NOT implement until:
Monitor These Signals
Alternative: Plugin Architecture
Instead of core branching, design protocol adapters:
Benefits:
Current LWS Ecosystem (Jan 2026)
Recommendation
Priority: Low - Monitor but don't implement
Timeline:
Keep focus on:
References