yanghua commented on issue #32:
URL: https://github.com/apache/incubator-kyuubi/issues/32#issuecomment-895027701
Hi @iodone Sorry for the late reply. Thanks for chime in and share your
thoughts.
Answer your question:
> who are these RESTful APIs target users?
I did not make assumptions about it. The original intention was to expose
Kyuubi's capabilities through the HTTP protocol. Its target users can be
administrators or some regular users who submit queries. It can be used
directly or indirectly (for example, after building a Kyuubi UI based on it,
use it step by step).
Thank you for your feedback, yes. This API format is very inconvenient for
users who use it directly.
Because it relies on the design context of these APIs based on resources.
From a resource point of view, it should be to create the Session first, and
then create the Operation, which seems to have no sense of contradiction. But
it brings complexity and higher cost of understanding to direct users, and even
lower performance.
If we don't make assumptions about the target users of these APIs (I
personally suggest). Otherwise, this matter will become more complicated in the
future.
Then we look forward to bringing in your suggestions. Like:
> Referring to Presto/Trino's Rest API, there are only 3 core APIs.
> postStatement (POST /v1/statement)
> getStatus (GET /v1/statement/queued/{queryId}/{slug}/{token})
> getQueryResults (GET /v1/statement/executing/{queryId}/{slug}/{token})
We can introduce a resource with a "statement" as the first-level resource.
So that it can provide convenience for some users. It may be a little bit
against the context of resources in HS2, but we should not always stick to the
rules.
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]