diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/webid-oidc.texi | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/webid-oidc.texi b/doc/webid-oidc.texi index fb8bf63..66b9c6d 100644 --- a/doc/webid-oidc.texi +++ b/doc/webid-oidc.texi @@ -441,6 +441,7 @@ the seed. @menu * Running webid-oidc-reverse-proxy:: * The authenticator:: +* Resources stored on the server:: @end menu A Solid server is the server that manages your data. It needs to check @@ -516,6 +517,55 @@ the subject of the access token. If an error happens, it is thrown; the function always returns a valid URI. @end deffn +@node Resources stored on the server +@section Resources stored on the server + +To store and serve resources, the server has two distinct +mechanisms. A @dfn{content} is a read-only possible value for a +resource, indexed by etags, and a @dfn{path} is a mutable value that +indicates the etag of the resource, and of the auxiliary resources +(description and ACL). With this separation, it is possible to +atomically delete a resource and all associated auxiliary resources, +by unlinking the corresponding @emph{path}. It is also possible to +mutate separately the ACL and the resource itself without writing a +copy for both. + +The @emph{content} API is contained in the +@code{(webid-oidc server resource content)} module. + +@deffn function with-session @var{f} [@var{#:dir}] +Call @var{f} with 5 arguments: +@itemize +@item +a function to get the content-type of a given etag; +@item +a function to list the paths contained within the resource; +@item +a function to load the content of a given etag; +@item +a function to create a new content; +@item +a function to remove a content from the file system. It is still +possible to query it with the first 3 functions, but new sessions will +not see it. +@end itemize + +Since the contents are read-only, it is possible to cache the value of +the content in memory. This is why @var{f} should run within a session +with memoization. + +Resources only store @emph{static} content, because the membership +triples for containers is considered dynamic and not included in the +representation. + +The first 3 functions as well as the last one are called with an etag, +and the function to create a content is called with the content-type, +list of contained paths, and (static) content. + +By default, the contents are stored within @var{XDG_DATA_HOME}, but it +can be overriden by @var{#:dir}. +@end deffn + @node Running a client @chapter Running a client |