Jiangnan Jia
Jiangnan Jia
> As discussed and debugged with @jnan806, these weird race conditions were mainly caused by non-thread-safe access of `subscribeConfigStream` of OpenSergoClient. > > How to reproduce it: when a client...
> Fabulous! Thanks for contributing! > > PS: We may improve the SDK implementation later :) It's my pleasure ~ And I will keep following and improving it. 😃
@sczyh30 我对上述几点,逐点进行考虑,得出如下: > 1. OpenSergoClient 作为基础的客户端,完全由使用者创建和管理,这个是没问题的; > 2. 我们现在需要的是 OpenSergo SDK 自身有一套管理机制,能够复用同个 endpoint 下的 client 连接。这里面是不是可以抽象出一种 OpenSergoClientManager,用来自动创建和复用托管 client。如果用户不需要复用连接,则仍可以自主创建 OpenSergoClient,而不需要关注 manager。 - 框架作为直接接入OpenSergo的用户,可以 OpenSergoClientManager 和 OpenSergoClient 构造两种方式进行实例化,从而达到 复用与独立使用的目的。 - 应用作为间接使用OpenSergo的用户,则需要依托于框架来进行 OpenSergoClient...
> @jnan806 相同 endpoint 同个 config 的场景,用户在 OpenSergoClientManager 里面怎么提供? 这种场景不正是我们希望的复用的最佳场景么:joy:,如果 endpoint 存在就缓存里取client,不存在就实例化 OpenSergoClientManager 主要解决的就是 `不同 endpoint`场景的client 实例化,以及 `相同 endpoint 相同 config` 场景的 client 复用
> 这里指的是 这个通用的 config 怎么提供?比如可以通过环境变量来配。 配置的提供方式,我个人不建议以 OpenSergo 为主要的配置文件或者环境变量来提供。 我们仅仅是 SDK ,只需要提供接口,或者 构造方法,或是 Builder ,而配置文件或环境变量,最好是注入到框架中,由框架进行转换后调用 SDK 时提供 config。 ``` java // OpenSergoClientManager 获取 Client, config 暂时以参数形式传递,具体方式待定 public OpenSergoClient getOrCreateClient(host, port, openSergoConfig)...
需要支持 单向TLS认证 还是 双向TLS认证?
@sczyh30 Cloud you help me to check and complete the `// TODO` list in file [`fix#483-datasource-opensergo -> opensergo_sentinel_assembler.go`](https://github.com/jnan806/sentinel-golang/blob/fix%23483-datasource-opensergo/pkg/datasource/opensergo/opensergo_sentinel_assembler.go) to fill filed-mapping between `pb-message` and `sentinel rule`. And then delete the...
@sczyh30 PTAL