Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Split the stages of work with the Client #382

Open
cthulhu-rider opened this issue Mar 7, 2022 · 3 comments
Open

Split the stages of work with the Client #382

cthulhu-rider opened this issue Mar 7, 2022 · 3 comments
Labels
enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

In current Client implementation connection is opened once during first Init call. I propose to highlight the working method:

func (x *Client) Dial(PrmDial) error

The method should be called before the work. This method is going to be called during the application start-up stage.

@cthulhu-rider cthulhu-rider added enhancement Improving existing functionality triage labels Mar 7, 2022
@fyrchik
Copy link
Contributor

fyrchik commented Mar 23, 2022

Init already opens the connection, is this task just about changing the name and signature?

@carpawell
Copy link
Member

Init already opens the connection

In the current implementation Init requires specifying a service name and an RPC name to open a stream, so it could not be used as "general initialization". I think that issue requires more deep refactoring.

BTW, I think that issue is quite actual. Currently, SDK client does a really strange thing to open the connection:

  1. It does nothing on dialing errors (are just ignored);
  2. i forget about that call and spent some time figuring out why i am facing strange requests on the server-side with zero version and empty request body.

@roman-khimov
Copy link
Member

It's basically about making createGRPCClient() a Dial(). Which would be a nice enhancement. Luckily current SDK code hides this, so it's not a priority.

@roman-khimov roman-khimov added U4 Nothing urgent S4 Routine I3 Minimal impact labels Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

5 participants