Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
1.1
-
None
-
Unknown
-
Description
We could improve the way we persist data for the following usecases:
- UC1: filter data based on who can see them
- UC2: filter data based on who owned them
- UC3: filter collections with pagination.
First proposal for doing that:
re UC1:
- introduce a new field "target" with the resolved list of targeted actors (based on to/cc/bto/bcc): this list needs to be resolved, since the list of followers could evolve with time.
So if a message was targeting Foo/followers containing in past only Bar, it means Baz does not necessarily have rights to see it even if now he also follows Foo.
re UC2:
- introduce a new field "attributedTo" with the actor who created the object: it would allow to perform queries by filtering quickly on who created something
re UC3:
- create dedicated Solr type for list of Strings (could be useful for UC1 too)
- introduce a new field "collection"
- don't serialize collections AP object in content when persisting them, but only store the list of IDs of element they contain in the new field "collection"
- introduce Solr filters on this fields, to allow retrieve a subset of this list (so offset and limit filters at least)
- use those parameters to retrieve paginated results directly from the storage