Globbing, sorting and paging

Offen
#956 12 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, node.js
Bereich
api, backend

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit nachzuverfolgen, wie Globbing-Anfragen wie /items/* verarbeitet werden und wie Query-Parameter geparst werden; ermittle anschließend, wie das Sortieren nach dem Prädikat eines Subjekts und das Paging mit offset/count spezifiziert und getestet werden sollten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

feature

Would it be possible to add query parameters for sorting and paging when requesting a "globbing" resource?

When presenting a list of items (blog comments, chat entries, pets, whatever), it is very common to let the server do paging and sorting to improve efficiency for browsing through large amounts of data (as compared to loading all N-thousand Turtle statements and throw away 99% of them in order to show the top 1%).

It could work as follows:

  • A globbing request like "/items/*" normally returns the Turtle content of all resources stored under "/items". Each of theses resources contains a set of Turtle statements.

  • One URL parameter, like for instance "orderBy", could define a predicate identifier (or multiple) to order the resources by.

  • Other URL parameters, like for instance "count" and "offset" could define which "slice" of the sorted resources to return.

  • As a result, only the content of the first "count" resources, from index "offset", when ordering the resources by the value of the predicates in the resources by "orderBy", would be returned.

Example, get the first 10 items ordered by the value of http://schema.org/name: /items/*?orderBy=https%3A%2F%2Fschema.org%2Fname&offset=0&count=10

The "orderBy" predicate is only evaluated for statements where the subject is identical to the resource URL.

I kind of assume this suggestion is covered in existing work on linked data.

Vorherrschende Sprache
JavaScript
Sterne
1.8k
Forks
308
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nodeSolidServer/node-solid-server

Alle Issues in nodeSolidServer/node-solid-server

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.