solid / solid

Solid - Re-decentralizing the web (project directory)
https://solidproject.org
MIT License
8.16k stars 377 forks source link

Filtering & Sorting on a container #84

Open ghanemabdo opened 8 years ago

ghanemabdo commented 8 years ago

There should be a way for clients to run sorting/filtering operations (partial Globing) on resources under a container (not using SPARQL). Something similar to WHERE & SORT BY clauses in SQL. I can think of several use cases such as a twitter-like app that should display the recent x posts and gradually loads batches of x posts, displaying a paginated table ... etc

I have two approaches in mind now:

  1. Client reponsibility: the client is responsible for naming resources in a container in a sequential way (timestamp or auto increment index) and maintains these indexes to allow filtering/sorting via normal LDP requests.
  2. Server responsibility: client states the filtering/sorting along with a globing request and the server does the filtering/sorting and responds by the results.

This is what on top of my mind. What do you think ... any suggestions?

bblfish commented 8 years ago

One simple way to do that is to support SEARCH verb on containers. See issue 46: Document Query use cases

melvincarvalho commented 8 years ago

It's an interesting frontier. One way is to place data into a well organized folder structure, which I think can take you a long way.

Query is quite a large implementation burden, and would take time to standardize and roll out.

The operations I think that are common are :

Should we just use full SPARQL here, I wonder? Maybe a lite version could help gain adoption in the interim, but that's a tough one to judge.

melvincarvalho commented 8 years ago

Perhaps possibly solid needs a pagination spec for large containers, something I think LDP was working.

sandhawke commented 8 years ago

Pagination only makes sense when the items are sorted in such an order that clients usually only want the first few, like tweets. We're much better off with a query system.

ebporter commented 8 years ago

Pagination makes sense in lots of cases: