iodone commented on issue #32:
URL: https://github.com/apache/incubator-kyuubi/issues/32#issuecomment-893964613


   @yanghua Very good proposal with a few questions.
   
   Who is the Rest API service target?
   If it's for normal users, this API is actually an HTTP implementation of 
ThriftCLIInterface, and it would be very complicated for users to call Submit a 
query steps:
   1. createSession
   2. create various operations based on session
   3. get the current state based on operationHandler
   4. until success, and then get the results
   5. first get the metadata, and then get the results again until all get 
completed
   6. release resources (close operation and session)
   
   Submitting a query to get the results requires more than 6 HTTP API calls, 
and does not include the case of call exceptions. If the user forgets to call 
the release resource API, what should be done?
   
   Later will be based on Rest API to provide Client SDK, like the Hive JDBC 
SDK?
   But see there is already a new Kyuubi Hive JDBC under development, can 
completely cover the Rest API capabilities
   
   HTTP stateless protocol completely to imitate the RPC calls, the user side 
will be more complex to use. Is it possible to simplify the HTTP API from the 
user's point of view instead of simply copying the Thrift RPC call?
   
   Referring to Presto/Trino's Rest API, there are only 3 core APIs.
   1. postStatement (POST /v1/statement)
   2. getStatus (GET /v1/statement/queued/{queryId}/{slug}/{token})
   3. getQueryResults (GET /v1/statement/executing/{queryId}/{slug}/{token})
   
   The API for session and operation management is very well designed, and the 
target users are administrators and operators. But for ordinary users to submit 
SQL, I feel it is slightly complicated


-- 
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]


Reply via email to