From 8967e0b90d41d7a61f801c5b447535cd7637b33e Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Fri, 9 Dec 2022 14:39:56 +0700 Subject: [PATCH] feat: add https://github.com/storj/drpc --- docs/2022-07-31-experiment-go.html | 2 +- posts/2022-07-31-experiment-go.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/2022-07-31-experiment-go.html b/docs/2022-07-31-experiment-go.html index f8aa0c4..74de9d8 100644 --- a/docs/2022-07-31-experiment-go.html +++ b/docs/2022-07-31-experiment-go.html @@ -26,5 +26,5 @@ type ClientAccount interface { // c is Client c.User.Get() c.Account.Remove() -

The difference is c.GetUser() -> c.User.Get().

For example we have client which connect to bank.
There are many functions like GetUser, GetTransaction, VerifyAccount, ...
So split big client to many children, each child handle single aspect, like user or transaction.

My concert is we replace an interface with a struct which contains multiple interfaces aka children.
I don't know if this is the right call.

This pattern is used by google/go-github.

Find alternative to grpc/grpc-go

Why?
See for yourself.
Also read A new Go API for Protocol Buffers to know why v1.20.0 is v2.

Currently there are 2:

Thanks

Feel free to ask me via email +

The difference is c.GetUser() -> c.User.Get().

For example we have client which connect to bank.
There are many functions like GetUser, GetTransaction, VerifyAccount, ...
So split big client to many children, each child handle single aspect, like user or transaction.

My concert is we replace an interface with a struct which contains multiple interfaces aka children.
I don't know if this is the right call.

This pattern is used by google/go-github.

Find alternative to grpc/grpc-go

Why?
See for yourself.
Also read A new Go API for Protocol Buffers to know why v1.20.0 is v2.

Currently there are some:

Thanks

Feel free to ask me via email Mastodon \ No newline at end of file diff --git a/posts/2022-07-31-experiment-go.md b/posts/2022-07-31-experiment-go.md index e8d7c8d..14ade0c 100644 --- a/posts/2022-07-31-experiment-go.md +++ b/posts/2022-07-31-experiment-go.md @@ -60,10 +60,11 @@ Why? [See for yourself](https://github.com/grpc/grpc-go/issues?q=is%3Aissue+compatibility+is%3Aclosed). Also read [A new Go API for Protocol Buffers](https://go.dev/blog/protobuf-apiv2) to know why `v1.20.0` is `v2`. -Currently there are 2: +Currently there are some: - [bufbuild/connect-go](https://github.com/bufbuild/connect-go). Comming from buf, trust worthy but need time to make it match feature parity with grpc-go. - [twitchtv/twirp](https://github.com/twitchtv/twirp) +- [storj/drpc](https://github.com/storj/drpc) # Thanks