-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Split ResourceStore config into 2 parts
- Loading branch information
Showing
36 changed files
with
153 additions
and
220 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
# Storage | ||
Options related to how data and resources are stored. | ||
|
||
## Key-Value | ||
Used by certain classes for internal storage. | ||
* *memory*: Store everything in memory. | ||
* *resource-store*: Store everything in a specific container in the resource store. | ||
|
||
## Resource-Store | ||
The chain of ResourceStores that needs to be passed through before reaching the actual data. | ||
There is much variety possible here so chances are higher that a custom solution is needed here. | ||
Most configs here have the same default setup (Monitoring -> Locking -> Patching -> Converting) | ||
and only differ at the tail. | ||
* *dynamic*: The routing store used at the tail here is needed when using dynamic pod creation. | ||
## Backend | ||
The final part of the ResourceStore chain that handles data access. | ||
* *dynamic*: The routing store used here is needed when using dynamic pod creation. | ||
* *file*: Default setup with a file backend. | ||
* *memory*: Default setup with a memory backend. | ||
* *regex*: Uses a different backend based on the container that is being used. | ||
* *sparql*: Default setup with a SPARQL endpoint backend. | ||
Also updates the converting store so all incoming data is transformed into quads. | ||
|
||
## Key-Value | ||
Used by certain classes for internal storage. | ||
* *memory*: Store everything in memory. | ||
* *resource-store*: Store everything in a specific container in the resource store. | ||
|
||
## Middleware | ||
The chain of utility ResourceStores that needs to be passed through before reaching the backend stores. | ||
The final store in this chain takes the store from the stores/backend config as source. | ||
* *default*: Chains all the utility stores: | ||
Monitoring -> IndexRepresentation -> Locking -> Patching -> Converting |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld", | ||
"import": [ | ||
"files-scs:config/storage/backend/data-accessors/file.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "Setup when using dynamic pods. A router rule will be defined when activating dynamic pods.", | ||
"@id": "urn:solid-server:default:ResourceStore_Backend", | ||
"@type": "RoutingResourceStore", | ||
"rule": { "@id": "urn:solid-server:default:RouterRule" } | ||
}, | ||
{ | ||
"comment": "Which store to use for requests that do not match any pod, e.g. for storage.", | ||
"@id": "urn:solid-server:default:RouterRule", | ||
"BaseUrlRouterRule:_baseStore": { | ||
"@id": "urn:solid-server:default:ResourceStore_DataAccessor", | ||
"@type": "DataAccessorBasedStore", | ||
"identifierStrategy": { "@id": "urn:solid-server:default:IdentifierStrategy" }, | ||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" }, | ||
"accessor": { "@id": "urn:solid-server:default:FileDataAccessor" } | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld", | ||
"import": [ | ||
"files-scs:config/storage/backend/data-accessors/file.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "A default store setup with a file system backend.", | ||
"@id": "urn:solid-server:default:ResourceStore_Backend", | ||
"@type": "DataAccessorBasedStore", | ||
"identifierStrategy": { "@id": "urn:solid-server:default:IdentifierStrategy" }, | ||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" }, | ||
"accessor": { "@id": "urn:solid-server:default:FileDataAccessor" } | ||
} | ||
] | ||
} |
10 changes: 7 additions & 3 deletions
10
.../resource-store/stores/data-accessor.json → config/storage/backend/memory.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld", | ||
"import": [ | ||
"files-scs:config/storage/backend/data-accessors/memory.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "Supports default Solid behaviour on any kind of data accessor.", | ||
"@id": "urn:solid-server:default:ResourceStore_DataAccessor", | ||
"comment": "A default store setup with a memory backend.", | ||
"@id": "urn:solid-server:default:ResourceStore_Backend", | ||
"@type": "DataAccessorBasedStore", | ||
"identifierStrategy": { "@id": "urn:solid-server:default:IdentifierStrategy" }, | ||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" } | ||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" }, | ||
"accessor": { "@id": "urn:solid-server:default:MemoryDataAccessor" } | ||
} | ||
] | ||
} |
30 changes: 6 additions & 24 deletions
30
config/storage/resource-store/regex.json → config/storage/backend/regex.json
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld", | ||
"import": [ | ||
"files-scs:config/storage/backend/data-accessors/sparql-endpoint.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "A default store setup with a memory backend.", | ||
"@id": "urn:solid-server:default:ResourceStore_Backend", | ||
"@type": "DataAccessorBasedStore", | ||
"identifierStrategy": { "@id": "urn:solid-server:default:IdentifierStrategy" }, | ||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" }, | ||
"accessor": { "@id": "urn:solid-server:default:SparqlDataAccessor" } | ||
}, | ||
{ | ||
"comment": "This makes it so all incoming data is converted to quad objects.", | ||
"@id": "urn:solid-server:default:ResourceStore_Converting", | ||
"RepresentationConvertingStore:_options_inConverter": { "@id": "urn:solid-server:default:RepresentationConverter" }, | ||
"RepresentationConvertingStore:_options_inType": "internal/quads" | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld", | ||
"import": [ | ||
"files-scs:config/storage/middleware/stores/converting.json", | ||
"files-scs:config/storage/middleware/stores/locking.json", | ||
"files-scs:config/storage/middleware/stores/patching.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "Sets up a stack of utility stores used by most instances.", | ||
"@id": "urn:solid-server:default:ResourceStore", | ||
"@type": "MonitoringStore", | ||
"MonitoringStore:_source": { "@id": "urn:solid-server:default:ResourceStore_Index" } | ||
}, | ||
{ | ||
"@id": "urn:solid-server:default:ResourceStore_Index", | ||
"IndexRepresentationStore:_source": { "@id": "urn:solid-server:default:ResourceStore_Locking" } | ||
}, | ||
{ | ||
"@id": "urn:solid-server:default:ResourceStore_Locking", | ||
"LockingResourceStore:_source": { "@id": "urn:solid-server:default:ResourceStore_Patching" } | ||
}, | ||
{ | ||
"@id": "urn:solid-server:default:ResourceStore_Patching", | ||
"PatchingStore:_source": { "@id": "urn:solid-server:default:ResourceStore_Converting" } | ||
}, | ||
{ | ||
"@id": "urn:solid-server:default:ResourceStore_Converting", | ||
"RepresentationConvertingStore:_source": { "@id": "urn:solid-server:default:ResourceStore_Backend" } | ||
} | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.