apache / shardingsphere

Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.
Apache License 2.0
20.01k stars 6.76k forks source link

[Feature Request] Use unified registry center client for different scenarios in proxy #18609

Open sandynz opened 2 years ago

sandynz commented 2 years ago

Some discussion notes with @terrymanu . It's related to ElasticJob and ShardingSphere Proxy Mode.

Currently, registry center client will be created, all of them use configuration from mode in server.yaml:

It means it might create 3 ZooKeeper client if mode Cluster type is ZooKeeper.

Why there're several registry center client?

  1. org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter is different with org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository, seems could not be wrappered simply.
  2. Since modules dependency hierarchy, ModeScheduleContext could not reuse CoordinatorRegistryCenterInitializer.
data-pipeline-core (includes CoordinatorRegistryCenterInitializer)
    mode-core (CoordinatorRegistryCenterInitializer depends on it)
        schedule-core (includes ModeScheduleContext)

It's better to use unified registry center client, just reuse the proxy one.

github-actions[bot] commented 2 years ago

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.