timothy65535 opened a new issue #918:
URL: https://github.com/apache/incubator-kyuubi/issues/918


   ## Description
   
   From the ha discovery design of engine service in codebase, there're some 
area that can be improved.
   
   ### 1. EngineRef is exposed to the KyuubiSessionImpl
   
   When client connect to kyuubi server, the backendservice will open 
KyuubiSession. KyuubiSessionImpl use `EngineRef` and `ServiceDiscovery` at the 
same time in the codebase. 
   
   The responsibility of `EngineRef` is to maintain the startup of the engine, 
it's better to move `EngineRef` to `EngineServiceDiscovery`. 
   
![image](https://user-images.githubusercontent.com/86483005/128994238-f1f6856b-9c41-4f6c-b844-829ad7052ee8.png)
   
   ### 2. The mechanism for determining whether engine started successfully is 
flawed
   
   EngineRef use exists znode to determine whether engine started successfully 
or not(use the last znode), there are inconsistencies in this.
   So, take an idea to improve the detection mechanism by adding the started 
sessionid to the contents of the znone when engine started, then check the 
sessionid.
   
![image](https://user-images.githubusercontent.com/86483005/128994276-5c9c7839-0a21-4253-8989-110b88ac0e74.png)
   
   ### 3. Missing support multiple engines under `USER` share level
   
   Kyuubi supports `CONNECTION`, `USER`, `SERVER` share levels, we want to use 
kyuubi as hiveserver which can support multiple servers under same zookeeper 
namespace to share load pressure, client can pick hiveserver randomly. However, 
due to the influence of the second point above, kyuubi can not create other new 
engine under same user. Thes is also a little redundant to `subDomain`.
   
![image](https://user-images.githubusercontent.com/86483005/128994314-c978bf61-6a8f-4d95-9ea6-9fb96ca786cc.png)
   
   ### 4. Additional context
   
   The first and second points can be optimized step by step, the third point 
requires more thought, welcome to discuss. 
   


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