Wimmics / solid-start

Projet SOLID Inria - Startin'blox
MIT License
1 stars 0 forks source link

Implement a new SIB component #32

Open balessan opened 6 months ago

balessan commented 6 months ago

As proposed on #3, we go forward on the implementation of a new component which supports our chosen indexing strategy (based on the agent scenario, to be validated after synchro with the INRIA team).

Features:

Attributes dependencies:

Requirements/dependencies:

Technical specifications:

<solid-traversal-search
   fields="skills, first_name, city"
   strategy="distributed" <!-- or centralized -->
   data-src="['https://first-server.com', 'https://second-server.com']"
/> 

Implementation steps:

Not sure about the impact on the store if any, or if it does everything in //

balessan commented 6 months ago

For the demo we also need to generate data including:

On 12 demonstration instances.

balessan commented 5 months ago

First @lecoqlibre :

balessan commented 5 months ago

Next step for the component:

Switch from our stand-alone solid-traversal-search component to something directly integrated to the <solid-display> component:

lecoqlibre commented 5 months ago

To be more generic, could not we use directly SPARQL instead?

The component would take/produce a SPARQL query like SELECT ?user WHERE { ?user a sib:User; sib:hasSkill <skill>. } or SELECT ?user WHERE { ?user a sib:User; sib:hasSkill <skill>; sib:liveIn "Paris". }.

Then a query planner would use the appropriate indexes. It will parse the query, look after indexes, select an appropriate strategy and run it to respond to the query.

We should provide some indexes to the components so they can know where to search like:

<!-- It will show a list of users having the skill RDF -->
<solid-display
   query="SELECT ?user WHERE { ?user a sib:User; sib:hasSkill <https://example.org/skillRDF>. }"
   indexes="https://example.org/typeIndex, https://example.org/skillIndex"
/>
<!-- 
It will display a search form to find users given skill, name or city. 
When the different parameters will be selected, the SPARQL query will be 
recomputed before being passed to the query planner for execution.
-->
<solid-search
   fields="skills, first_name, city"
   indexes="https://example.org/typeIndex, https://example.org/skillIndex, https://example.org/cityIndex"
/>

The provided indexes should be self-described so the query planner will know how to use them. For instance, it will know that the https://example.org/typeIndex is a solid:TypeIndex because of the triple <> a solid:TypeIndex.

balessan commented 5 months ago

To be more generic, could not we use directly SPARQL instead?

@lecoqlibre No because the intended audience of the framework are considered to be at the HTML integrator level, they do not know anything about RDF or sparql, they just know HTML attributes.

We can open advanced features targetting a developer audience but it is not supposed to be the primary target.

lecoqlibre commented 4 months ago

No because the intended audience of the framework are considered to be at the HTML integrator level, they do not know anything about RDF or sparql, they just know HTML attributes.

OK right @balessan, it make sense, we should be nice with integrators :D But this is not a problem, the component could create the SPARQL query behind the scene and pass it to the query planner internally. The HTML integrators will still use fields.

I think we should use SPARQL internally. I could use sparqljs to parse the query and write the query planning logic on top of it. This way, the query planner will be generic and work for many other use cases.