Open csarven opened 1 week ago
In principle, I support this request. In practice, this will require substantial engineering, such as writing git implementing middlewares, to implement this request.
I currently use two different solutions: 1) https://github.com/presslabs/gitfs which provides a fuse file system that automatically syncs to a repository 2) A cron job that does git pull, add, commit and push
I previously also tried an incron task to do automatic commits but found it to be unreliable. Directly tapping into server filesystem operations would be ideal.
I have found that I also often want explicit control over commits. The most natural way of doing this seems to be with the memento pattern, where the app (or server) saves an immutable copy in addition to mutating the main resource. I think of this as a patch and post pattern: If patch is successful, post a memento of the document. https://jg10.solidcommunity.net/devlog/version%20control.md
It'd be really useful to different users and workflows to have the possibility to configure the NSS instance so that the storage synchronises with changes to a repository (e.g., git). For example, remote changes can make its way to the storage, and similarly any changes to the "non-sensitive" resources (such as ACLs) can make their way to shared repository.
Something like this would allow Solid applications to make changes to resources as they normally do but there is the added benefit to those automatically being versioned somewhere away and safe. And, if anyone makes changes to the same resources on the repository, they can also be useful.
(I originally proposed this feature in https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1114 , https://web.archive.org/web/20241112192440/https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1114 )