Acosix / alfresco-simple-content-stores

Addon to provide a set of common content store implementations and easy-to-use configuration (no Spring config)
Apache License 2.0
44 stars 19 forks source link

Investigate options to ensure (physical-)store-unique content URLs #1

Closed AFaust closed 8 years ago

AFaust commented 8 years ago

While implementing the "Selector Property" store it has come to my attention that there are some serious restrictions to orphan cleanup / cleanup on migration rollback when using this store (as well as the Enterprise equivalent of it).

Somehow we need to ensure that every distinct store that handles physically stored content produces a unique content URL that differentiates it from other stores. On the other hand we still need to have a semi-transferable identity element to the content URL that allows i.e. checking if the same content exists in a different store (what the "Selector Property" store must do to avoid creating duplicates).

AFaust commented 8 years ago

This module defines an abstract "wildcard" store protocol that any physical store in this module must support. This protocol can be used to define a semi-transferable identity (content URL) to use in checking content existence and pre-defining content URLs of new content items. A physical store must replace the protocol with its concrete value during internal operations and expose a final, concrete content URL for new content items. A client is thus completely isolated from any assumption about a content store and its internal protocol. By configuring custom store protocols for physical stores we can now support proper orphan handling e.g. for routing stores. When a content is actually moved / copied to another physical store with a different protocol, the old content may be orphaned if no other node references the same URL.