Browsing shared projects » History » Version 2
Tom Clegg, 03/06/2019 05:34 PM
| 1 | 1 | Tom Clegg | h1. Browsing shared projects |
|---|---|---|---|
| 2 | |||
| 3 | It is desirable to have a "projects shared with me" virtual directory in FUSE and WebDAV. There is an API endpoint for this, but it's not obvious how to present it as a filesystem because the entries' names are not unique. |
||
| 4 | |||
| 5 | Any solution would need to support the following behavior: |
||
| 6 | # A project P1, named "new project", is created by user U1 and shared with user U2. |
||
| 7 | # User U2 opens the "shared projects" virtual directory in WebDAV or FUSE, finds "new project" directory in the listing, and opens it. |
||
| 8 | # A second project P2, also called "new project", is shared with user U2. |
||
| 9 | # User U2 saves a new collection C1 in the directory they opened in step 2. |
||
| 10 | # The new collection C1 is in project P1 -- not P2. |
||
| 11 | # User U2 opens the "shared projects" virtual directory and discovers that there are now two shared projects named "new project". |
||
| 12 | # User U2 opens the P2 directory. |
||
| 13 | # User U1 renames P1 to "project formerly known as new project". |
||
| 14 | # User U2 saves a new collection C2 in the directory they opened in step 7. |
||
| 15 | # The new collection C2 is in project P2 -- not P1. |
||
| 16 | |||
| 17 | 2 | Tom Clegg | Proposal: Include project UUID in every entry. |
| 18 | * Project P1 appears in "shared projects" with the name "new project--zzzzz-j7d0g-pppppppppp11111" |
||
| 19 | 1 | Tom Clegg | * Behavior is very predictable |
| 20 | * Directory listings and file paths are ugly |
||
| 21 | 2 | Tom Clegg | * "name--uuid" has a slight advantage that it doesn't require shell quoting except when the original name already requires shell quoting (unlike "name (uuid)") |
| 22 | 1 | Tom Clegg | |
| 23 | 2 | Tom Clegg | Rejected alternatives: |
| 24 | |||
| 25 | Include project UUID only when name conflicts exist. |
||
| 26 | 1 | Tom Clegg | * Project P1 appears as "new project" at first |
| 27 | * After step 3, P1 changes its name to "new project (zzzzz-j7d0g-pppppppppp11111)" |
||
| 28 | * In step 4, U2's "save" operation fails because the "new project" directory no longer exists |
||
| 29 | |||
| 30 | 2 | Tom Clegg | Include project UUID only when name conflicts exist, and even then, not for the oldest project |
| 31 | 1 | Tom Clegg | * step 4 fails depending on whether P2 happened to exist before step 1 |
| 32 | |||
| 33 | 2 | Tom Clegg | Include project UUID only when name conflicts exist, and even then, not for the project that first became visible to U1 |
| 34 | 1 | Tom Clegg | * Expensive to compute |
| 35 | * Feels unpredictable for users |
||
| 36 | * P2 changes its name in the listing during step 8, and step 9 fails. |