sodafoundation / api

SODA Terra Project API module : is an open source implementation of SODA API connecting storage to platforms like Kubernetes, OpenStack, and VMware
Apache License 2.0
828 stars 316 forks source link

Can we develop an API manager or API server that can perform all data manipulations and reside between the backend and the API consumers (dashboard or other) #910

Open anvithks opened 5 years ago

anvithks commented 5 years ago

FEATURE REQUEST:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

Use Case and problem

The OpenSDS dashboard consumes the OpenSDS APIs directly. Some of the API responses are not particularly in a format that is suitable for direct consumption by the Dashboard. There could be a requirement for a customer to integrate the APIs in their own dashboard and they may need to manipulate the data responses. With the current API server we cannot make those modifications specifically as the APIs are consumed by different consumers (CLI, Dashboard, Third-party dashboard).

Proposed Solution

We can develop a RESTful API manager (or API server, nomenclature can be discussed) which will add a layer of abstraction over the current API server(s). This API manager will accept the requests from the API consumer, process them, make any changes necessary for the OpenSDS API and pass it on to the appropriate endpoint. Similarly the response from the OpenSDS enpoints can be communicated back to the API manager, which will process it suitably for the consumer and send the response back.
There could be adaptors developed for different consumers(or generic adaptors which serve majority of the consumers).

Additional Comments

A good starting point to the architecture I have in mind is this blog post written by Pablo Bermejo.

anvithks commented 5 years ago

@skdwriting Please review and add to backlog.

anvithks commented 5 years ago

After reading some more seems like there was another article which kind of says there may be a different approach that is better (here).