I am working with Solid and am looking to see if there is a way to make a sort of transaction system. For instance, one folder is public and full of things with amounts, and other users allowed to read the folder can check things out from it. While this is simple enough for 1 user, I was wondering about concurrent users checking out simultaneously. Is this possible in Solid? If it isn’t, that is okay, but if it is, is there a design pattern or place I should be looking for resources?
Hi, I’m not sure if I fully understand your requirements. In particular, what do you mean with “can check things out”?
If you mean concurrent read access, then sure, that’s possible.
If you mean concurrent write access, then (afaik) there’s no server side logic that prevents inconsistencies and collisions. Maybe some others know more about client side logic for that scenario. I personally only know of headers that prevent overwriting, if the server already has a newer version than the client (see e.g. ETag - HTTP | MDN).
Also maybe of interest, for a project we’re currently using yjs with WebRTC to let multiple people collaborate on the same document without collisions.
So I think it highly depends on the use case, and especially the requirements you have
Thanks for the answer, and yes, sorry if I wasn’t clear - I figured there are no current mechanisms for handling concurrent writes. I was mainly asking since that is not currently available in Solid, what would perhaps be the best way for handling people who wanted to check out things while viewing the same resource to get as up-to-date information as possible. The ETag header looks interesting, I’ll look into it more. Thanks!