Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make content repository/store root configurable on a per content repository basis. #5

Closed
paulcwarren opened this issue Feb 15, 2017 · 4 comments

Comments

@paulcwarren
Copy link
Owner

From @bilak >>>>

From current implementation it looks like when I want new FS content store (CS) then I need to create new entity/spring repository/content repository for it. There could be an option where all contents will be stored in one entity/content store and somehow partitioned. Let's create annotation @FileSystemPartition (or maybe some name which fits better) for entity field which will split contents in partitions on FS (e.g. /filesystemroot/partition1 /filesystemroot/partition2). For this there also need to be some @ContentId generator which will guarantee the correct "sequence" id generation.

interface PartitionContentIdGenerator {
   Object generateIdForPartition(Object partition);
}

Maybe parameter and return type should be of Long type.

@paulcwarren
Copy link
Owner Author

With the new Placement Service/Strategy feature this may now be achievable. Based on @ContentId values that you would provide when creating new instances of your entities you could create a placement strategy to partition content. For example by giving an entity an @ContentId of perhaps "01-1234-5678" you could generate an actual location of /filesystemroot/partition01, given an @ContentID of "02-1234-5678" you could generate an location of /filesystemroot/partition02, etc...

This would achieve this by

  • generating @ContentID's in your code (you would have to figure out how to determine which partition an entity's content should go into) and
  • creating an org.springframework.content.commons.PlacementStrategy bean (probably parameterized to String?)

We may have to implement a precedence/sorting algorithm to ensure that your developer provided placement strategies are tried before SC-provided ones but this is on the backlog anyways.

What do you think? Does this satisfy the requirement. If not, why? etc...love to hear your thoughts.

@paulcwarren
Copy link
Owner Author

Hey @bilak,

Just pinging you to see if this is still relevant. Let me know. If I don't hear anything within 48hrs or so I will close.

@bilak
Copy link

bilak commented May 19, 2017

Hi @paulcwarren. I'm currently busy. If you think it's ok, then close the ticket.

@paulcwarren
Copy link
Owner Author

Closing. If it turns out that this doesn't satisfy the requirement then feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants