kernelci / kernelci/kernelci-api

Consider adding non-primitive API operations

Open
#376 16 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10
Forks
21
PR merge metrics
No merged PRs in 30d

Description

My understanding is that the [current API](https://kernelci-api.eastus.cloudapp.azure.com/latest/docs) contains a set of primitive operations that more or less match 1-to-1 to database queries.

Some typical use cases that could be rather frequent, such as the [kci show results](https://github.com/kernelci/kernelci-core/blob/fb81830485aa2ddd4b83cd786bbe628209fffeb6/kernelci/cli/show.py#L66) tool, perform a potentially large number of individual API queries to extract a whole set of data. Accessing this data directly from the database must be almost instantaneous but doing so through primitive API calls takes a non-practical amount of time.

Suggestion: implement an extended set of non-primitive API operations that can do this kind of complex data retrieval in a single query. Any internal query complexities, data post-processing and formatting can be abstracted in the API.
This has two important benefits: 1) it'll make possible to do certain operations that currently are not practical to do due to the large number of queries required, 2) while these operations will be more computationally expensive, they should greatly reduce the query requests processing overhead. The net result should be favorable to the "single-complex-query" approach.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the current API documentation and kernelci/cli/show.py to understand the primitive calls and the expensive retrieval pattern. The issue needs a concrete operation and scope before implementation; done would mean providing a defined non-primitive API operation that retrieves the required data in a single request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.