nodeSolidServer / nodeSolidServer/node-solid-server
Globbing, sorting and paging
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.8k
- 分支
- 308
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
該 issue 沒有指出任何檔案、測試或進入點。先追蹤 /items/* 之類的 globbing 請求如何處理,以及查詢參數如何解析;然後確定應如何規範和測試依 subject 的 predicate 排序以及使用 offset/count 的分頁。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, node.js
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100