Skip to content

Conversation

@sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Aug 16, 2022

Add initial implementation of OpenSergo Java client.

  • Add fundamental client subscribe and config cache mechanism
  • Add fundamental implementation of OpenSergo gRPC client

@sczyh30
Copy link
Member Author

sczyh30 commented Aug 23, 2022

An example of how data-plane integrates with OpenSergo Java SDK:

OpenSergoClient client = new OpenSergoClient(host, port);
client.start();

// Push-model
client.subscribeConfig(new SubscribeKey(namespace, appName, configKind),
    new OpenSergoConfigSubscriber() {
        @Override
        public boolean onConfigUpdate(SubscribeKey subscribeKey, Object dataList) {
            // Handle received config here
            System.out.println("key: " + subscribeKey + ", data: " + dataList);
            return true;
        }
    });

@sczyh30 sczyh30 added the kind/feature Category issues or PRs related to feature request label Aug 23, 2022
Node node = 2;

repeated ServiceMetadata service_metadata = 3;
reserved 4 to 16;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reserved tag conflict with docs https://github.com/opensergo/opensergo-specification/blob/main/specification/zh-Hans/README.md
maybe the docs is needed to change the tag range

image

@jnan806
Copy link
Collaborator

jnan806 commented Sep 8, 2022

是否应该将 *.proto 文件抽取到 opensergo/opensergo-proto 项目

@sczyh30
Copy link
Member Author

sczyh30 commented Sep 8, 2022

是否应该将 *.proto 文件抽取到 opensergo/opensergo-proto 项目

对应的 proto 会提交到 opensergo-proto 项目里面;不过如何在 SDK 项目中比较方便地引用 proto,社区可以给一些更好的建议

@jnan806
Copy link
Collaborator

jnan806 commented Sep 8, 2022

对应的 proto 会提交到 opensergo-proto 项目里面;不过如何在 SDK 项目中比较方便地引用 proto,社区可以给一些更好的建议

refer to opensergo/opensergo-proto#3

@jnan806
Copy link
Collaborator

jnan806 commented Sep 13, 2022

@sczyh30

PTAL!THX.

针对 issue opensergo/opensergo-proto#3

已经将 grpc协议javago两中SDK的依赖实现提交在 PR 中,麻烦review并讨论下是否合理。

opensergo/opensergo-proto#4

@sczyh30
Copy link
Member Author

sczyh30 commented Sep 25, 2022

Hi, I've updated the latest proto and polished SDK code (a lot of bugs has been fixed...).

cc @opensergo/opensergo-maintainer

@sczyh30 sczyh30 marked this pull request as ready for review September 25, 2022 15:31
@sczyh30 sczyh30 merged commit 4270c11 into opensergo:main Sep 25, 2022
@jnan806
Copy link
Collaborator

jnan806 commented Sep 26, 2022

ok, I've synchronized my fork branch https://github.com/jnan806/opensergo-java-sdk-review-sczyh30/tree/stubcode-based-sczyh30
Please take a review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Category issues or PRs related to feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add gRPC bi-directional transport layer in OpenSergo client Add local config cache mechanism Add basic implementation of config subscriber

2 participants