nodeSolidServer / nodeSolidServer/node-solid-server
Globbing, sorting and paging
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.8k
- Fork
- 308
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Issue không nêu tên tệp, bài kiểm thử hoặc điểm vào nào. Hãy bắt đầu bằng cách lần theo cách các yêu cầu globbing như /items/* được xử lý và các tham số truy vấn được phân tích; sau đó xác định cách đặc tả và kiểm thử việc sắp xếp theo predicate của một subject và phân trang bằng offset/count.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100