JasonThon / lightflus

A Lightweight, Cloud-Native Stateful Distributed Dataflow Engine
Apache License 2.0
99 stars 9 forks source link

[feat-LIG-57]: use rpc gateway to replace directly call the rpc client #21

Closed JasonThon closed 1 year ago

JasonThon commented 1 year ago

Description

In previous version, TaskWorker and Coordinator use gRPC client ugly. We refactor the way to call TaskWorkerApi and CoordinatorApi to make it easier and painless

  1. Add SafeTaskWorkerRpcGateway which wrap TaskWorkerApiClient and control the client-side concurrency request;
  2. Add SafeCoordinatorRpcGateway which wrap `CoordinatorApiClient and control the client-side concurrency request;
  3. Use SafeTaskWorkerRpcGateway to replace TaskWorkerApiClient in worker;

Impact Scope

  1. coordinator call worker's rpc

Test Suggestions

  1. SafeTaskWorkerRpcGateway will successfully call TaskWorkerApiClient