The core module and dispatcher's architecture is below:
[image: image.png]
1. core module will generate the DQ sql according to the different engine‘s
syntax features,and wrapped in the submit request.
2. dispatcher provided the restful api to accept the request from the core
server.
3. after received the request info, dispatcher will submit the query to the
specified engine(presto, spark, hive, flink)
4. dispatcher need provided a method to the core module, named "execute" is
nice, and in the method, it will continue to get job status from
dispatcher,when the job is finished, then fetch the result from dispatcher,
then return the response to the core module.
The below is the sequence diagram.
[image: image.png]
[image: griffinDispatcher1.png]
[image: image.png]
Thanks for you review.

On Wed, Oct 12, 2022 at 5:09 PM jianhua guo <[email protected]> wrote:

> Most looks good to me. Just one confusion, the "RecordResponse" only
> return long value result?
>
> On Wed, Oct 12, 2022 at 1:22 PM William Guo <[email protected]> wrote:
>
>> hi all,
>>
>> The following message from Warden, we can discuss interaction between core
>> and dispatcher module here.
>> ====================
>> I have drafted the communication messages between core and dispatcher as
>> below,
>>
>>
>> // submit sql
>> execute(RecordRequest) return RecordResponse;
>>
>> RecordRequest {
>>  String recordSql;
>>  Enum engine;  // Spark,Hive,Presto,etc.
>>  String owner;
>>  Integer maxRetryCount;
>> }
>>
>> RecordResponse {
>>  Integer code;
>>  Long value;
>>  Enum errorCode; // if code != 200, please tell us what happened:
>>      //    1、 recordSql syntax error
>>      //    2、 internal error, dispatcher self is crashed
>>      //    3、 external error, target engine is crashed when dispatcher
>> call,etc
>>  Exception ex;   // error detail info
>> }
>>
>> // validate sql syntax
>> validateSQL(CheckRequest) return CheckResponse;
>>
>> ValidateSQLRequest {
>>  String recordSql;
>>  Enum engine;  // Spark,Hive,Presto,etc.
>> }
>>
>> ValidateSQLResponse {
>>  Integer code;
>>  Enum errorCode; // if code != 200, please tell us what happened:
>>      //    1、 recordSql syntax error
>>      //    2、 internal error, dispatcher self is crashed
>>      //    3、 external error, target engine is crashed when dispatcher
>> call,etc
>>  Exception ex;   // error detail info
>> }
>>
>>
>>
>> Could you please review it? Give us your feedback.
>>
>> ==================
>>
>

Reply via email to