Skip to content

refactor: Clean up internal storage - #936

Merged
jvherweg merged 1 commit into
versions/2.0.0from
refactor/storage
Sep 8, 2021
Merged

jvherweg merged 1 commit into
versions/2.0.0from
refactor/storage

Conversation

@jvherweg

@jvherweg jvherweg commented Aug 31, 2021 •

Copy link
Copy Markdown
Member

Each IDP class using storage now has a different storage. This way those classes don't have to worry about clashing keys anymore.

All internal storage is now in the /internal/ container, thereby making it easier to take the location of the internal data into account: only 1 path needs to be blocked and a regex router handling internal data differently only has to match 1 path as well.

This also makes it less invasive to add a new storage somewhere in the future.

Might also help with #892

@jvherweg jvherweg added the semver.major Requires a major version bump label Aug 31, 2021

@RubenVerborgh RubenVerborgh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super, what an improvement!

Would name it .internal though, to emphasize its special nature. We could treat all dot folders in a special way then later on.

"source": { "@id": "urn:solid-server:default:ResourceStore_Backend" },
"baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
"container": "/locks/"
"container": "/internal/locks/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps

Suggested change
"container": "/internal/locks/"
"container": "/.internal/locks/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and idem throughout

Each IDP class using storage now has a different storage.
This way those classes don't have to worry about clashing keys anymore.

All internal storage is now in the /.internal/ container,
thereby making it easier to take the location of the internal data into account:
only 1 path needs to be blocked and a regex router handling internal data
differently only has to match 1 path as well.
@jvherweg
jvherweg merged commit 1e1edd5 into versions/2.0.0 Sep 8, 2021
@jvherweg
jvherweg deleted the refactor/storage branch September 8, 2021 08:01
@jvherweg jvherweg added this to the v2.0.0 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver.major Requires a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants