Giter Club home page Giter Club logo

Comments (8)

qshuai avatar qshuai commented on June 8, 2024

我自己二开实现了该特性,需要的朋友可以移步:https://github.com/qshuai/agollo#%E5%8A%A8%E6%80%81namespace%E7%89%B9%E6%80%A7

from agollo.

zouyx avatar zouyx commented on June 8, 2024

我自己二开实现了该特性,需要的朋友可以移步:https://github.com/qshuai/agollo#%E5%8A%A8%E6%80%81namespace%E7%89%B9%E6%80%A7

如果有可能,可以提交 pr。
我代表社区感谢对 apolloconfig 社区的贡献。

from agollo.

fengqi avatar fengqi commented on June 8, 2024

你的实现方式是这样吗:
定时拉取全部namespace,然后配置正则匹配想要的部分

调整成这样是不是比较好:
在application这里配置要启用的namespace,如:namespace=mysql,redis,kafka,当修改的时候这个值是会自动同步到client的,client根据这个值去获取配置就好了,不用定时任务,也不用正则

按照目前的代码结构,只需要有个内置的change监听,设置调用下SetCurrentApolloConfig就可以了

from agollo.

qshuai avatar qshuai commented on June 8, 2024

你的实现方式是这样吗: 定时拉取全部namespace,然后配置正则匹配想要的部分

调整成这样是不是比较好: 在application这里配置要启用的namespace,如:namespace=mysql,redis,kafka,当修改的时候这个值是会自动同步到client的,client根据这个值去获取配置就好了,不用定时任务,也不用正则

按照目前的代码结构,只需要有个内置的change监听,设置调用下SetCurrentApolloConfig就可以了

嗯呢,不错的想法!

from agollo.

fengqi avatar fengqi commented on June 8, 2024

不过我好奇应用场景是什么,按说新增配置不应该都是需要提前适配代码的吗,这就需要重新部署或者重新启动的。

from agollo.

qshuai avatar qshuai commented on June 8, 2024

不过我好奇应用场景是什么,按说新增配置不应该都是需要提前适配代码的吗,这就需要重新部署或者重新启动的。

一个可能但不一定合理的场景:一个类目相关的服务,提供类目相关配置的查询能力,而类目是可以横向扩展的;也就是说在服务启动的时候,并不知道有多少个类目需要配置。为了实现无需重启服务就能提供这样能力的诉求,就衍生了这么一个功能。

一开始我并不同意业务方的诉求,其实这个诉求可以通过如下方式满足:搭建一个类目的后台管理,再加上一个持久化存储,程序实时查询数据库的数据即可。但是业务方看中了apollo配置中心已经存在的灰度发布、审核流程、变更历史查询等能力,不想重复建设,把配置中心当做数据库在使用了。所以~

from agollo.

fengqi avatar fengqi commented on June 8, 2024

确实不太合理,当成数据库用了

from agollo.

stale avatar stale commented on June 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from agollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.