kit icon indicating copy to clipboard operation
kit copied to clipboard

Initial docs

Open goxiaoy opened this issue 4 years ago • 2 comments

goxiaoy avatar Feb 23 '22 04:02 goxiaoy

What is the purpose of remote folder in user service?

ppusapati avatar Jun 16 '22 15:06 ppusapati

@ppusapati remote is merged into api now

[Previous design]: remote folder is to explictly separate different calls from self or other services. for example:

in session refresh flow

if this happens in service user

graph TD
    A[User] --> B[User-RefreshTokenProvider: AuthServiceServer < local function call>]  -->C[User: AuthService] -->E[User: Set Cookie]

if this happens in gateway

graph TD
    A[Gateway] --> B[Gateway-RemoteRefreshTokenProvider: AuthServiceClient  < grpccall user>] -->C[User: AuthService]  -->E[Gateway: Set Cookie]

(This behavior can be observed by tracing)

Most of codes should be reusable for maintaining

[Current design]: with the protoc-gen-go-grpc-proxy

the second call is replaced with

graph TD
    A[Gateway] --> B[Gateway-RefreshTokenProvider: AuthServiceServer < proxy AuthServiceClient as AuthServiceServer>]-->C[User: AuthService] -->E[Gateway: Set Cookie]

goxiaoy avatar Jun 18 '22 07:06 goxiaoy