You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by 李波 <li...@gmail.com> on 2018/01/04 07:03:45 UTC

Re: Dynamic configuration support

Thanks ZhangQi and YinXiang for your kind advise.

During our implementation of configuration management for ServiceComb
Chassis, we meet two problems for now
1. Design of YAML configuration file
  Some different configuration items are imported to support Apollo as a
configuration source, such as namespace, clusters etc.
I have two solutions to do that:
first, expand original config part and put the new items under
cse.config.client.xxx (xxx means new items), example as follow:

*cse:*
*            config:*
*                client:*
*     serviceName: testDemo*
*     serverUri: https://172.16.8.7:30103
<https://172.16.8.7:30103>,https://${host.name <http://host.name>}:30103*
*     tenantName: csetest*
*     refreshMode: 1*
*     refresh_interval: 10000 *
*     namespace: application*
*     clusters: default*
*     env: DEV*
*     token: xxx*

second, start a new section to put new items, which is easy to understand
and explain, Apollo config as follow:

*apollo:*
*     config:*
* serverUri: http://10.10.10.10:8070 <http://10.10.10.10:8070>*
* env: DEV*
* clusters: default*
* namespace: application*
* token: xxx*


2. Currently, module for config-center is under foundation-config-cc, and
module for Apollo is under foundation-config-apollo.
  Users need to change dependency in pom.xml between foundation-config-cc
and foundation-config-apollo so that SPI can get different class to handle
different source of configuration. we are concerning that changing the
basic module like foundation maybe a bad usage way for user. Is there a
better way to do that? or we can create a new module for different
configuration source?

Any suggestion and comment is welcome!

Best Regards,
Bo Li


2017-12-27 16:26 GMT+08:00 Zhang Qi <to...@gmail.com>:

> By doing that, you just need to build one more Archaius source and put in
> https://github.com/apache/incubator-servicecomb-java-chassis/tree/0.5.0/
> foundations/foundation-config/src/main/java/io/servicecomb/
> config/archaius/sources
> For the details how to develop this source and scheduler you mentioned,
> please refer to: https://github.com/Netflix/archaius/wiki/Users-Guide
>
> 2017-12-27 16:03 GMT+08:00 李波 <li...@gmail.com>:
>
> > Dear all,
> >
> > I propose a architecture to support dynamic configuration for Chaasis.
> >
> > The detailed design is at the following link:
> > https://issues.apache.org/jira/secure/attachment/
> > 12903770/Dynamic%20Config%20Proposal.pdf
> >
> > The document explains why we choose Apollo as a centralized configuration
> > center,
> > and in order to support modify the configuration items dynamically, we
> need
> > to:
> > 1. Implement a driver layer  to support communication with Apollo
> > 2. Start a periodic thread to watch Apollo configurations
> > 3. Refresh the configuration item to Archaius Dynamic Properties
> >
> > Any comment is welcome!
> >
> > Best Regards,
> > Bo Li
> >
> > 2017-12-21 10:56 GMT+08:00 Bin Ma <ma...@gmail.com>:
> >
> > > Hi all,
> > >
> > > After the investigation of the config center in the open source
> > community,
> > > we plan to support communicating with Apollo config center firstly for
> > java
> > > chassis.
> > >
> > >
> > > Realization of ideas,
> > >
> > > 1.To ensure scalability, implement a driver interface layer in the
> > > foundation-config-cc module, which links the driver instance to open
> > source
> > > config center.
> > >
> > > 2. Refactor the code of communication with cse config center as
> > independent
> > > driver.
> > >
> > > 3. Implement a driver to communicate with Apollo config center. Apollo
> > > config center provides REST APIs and library two ways to get config
> data,
> > > in order to reduce the coupling degree, give priority to using REST
> APIs
> > > way, it will be verified next step.
> > >
> > >
> > > next,we will make a demo to verified it.
> > >
> > > 2017-12-15 19:13 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > Hi Bo,
> > > >
> > > > It's a good feature to support user to change the configuration
> > > dynamically
> > > > from a configure server.
> > > > Please let us know your research result and made a proposal in the
> > > > community.
> > > >
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Blog: http://willemjiang.blogspot.com (English)
> > > >           http://jnn.iteye.com  (Chinese)
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Dec 13, 2017 at 7:58 PM, 李波 <li...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > We plan to enable dynamic configuration in Java Chassis, After
> that,
> > > > > configurations can be changed dynamically without restarting the
> > > services
> > > > > any more.
> > > > >
> > > > > To do that, we need following steps:
> > > > >
> > > > >
> > > > >    - Implement an adapter layer for the configuration server to
> > > > communicate
> > > > >    with Java Chassis(dynamic configuration based on archaius).
> > > > >    - A user friendly CLI/UI to manage configurations at runtime
> > > > >    - An event store to record users' operations
> > > > >
> > > > >
> > > > > Before that, some researches are needed:
> > > > >
> > > > >
> > > > >    - How do other frameworks support dynamic configurations? CSE?
> > > > >    - Which configuration server to choose? Apollo or Disconf?
> > > > >
> > > > >
> > > > >
> > > > > Best Regards,
> > > > > Bo Li
> > > > >
> > > >
> > >
> >
>
>
>
> --
> 张琦
> Mobile:15901162453
> MSN:todayhill@hotmail.com
> Blog:www.faquir.net
> Weibo: www.weibo.com/todayhill
>

回复: Dynamic configuration support

Posted by 郑扬勇 <ya...@qq.com>.
Hi:
 1. I think we best keep the old yaml config style for compatible,and if we start support the third config center like consul,more duplicate config key may import;
 2. I think we can make it work like handler
   cse.config.provider:apollo --> apollo impl;
   cse.config.provider:cc --> servicecenter impl;(default)
  
 Best Regards & Thanks
 zhengyangyong
  
  ------------------ 原始邮件 ------------------
  发件人: "李波";<li...@gmail.com>;
 发送时间: 2018年1月4日(星期四) 下午3:03
 收件人: "dev"<de...@servicecomb.apache.org>;
 
 主题: Re: Dynamic configuration support

 

Thanks ZhangQi and YinXiang for your kind advise.

During our implementation of configuration management for ServiceComb
Chassis, we meet two problems for now
1. Design of YAML configuration file
  Some different configuration items are imported to support Apollo as a
configuration source, such as namespace, clusters etc.
I have two solutions to do that:
first, expand original config part and put the new items under
cse.config.client.xxx (xxx means new items), example as follow:

*cse:*
*            config:*
*                client:*
*     serviceName: testDemo*
*     serverUri: https://172.16.8.7:30103
<https://172.16.8.7:30103>,https://${host.name <http://host.name>}:30103*
*     tenantName: csetest*
*     refreshMode: 1*
*     refresh_interval: 10000 *
*     namespace: application*
*     clusters: default*
*     env: DEV*
*     token: xxx*

second, start a new section to put new items, which is easy to understand
and explain, Apollo config as follow:

*apollo:*
*     config:*
* serverUri: http://10.10.10.10:8070 <http://10.10.10.10:8070>*
* env: DEV*
* clusters: default*
* namespace: application*
* token: xxx*


2. Currently, module for config-center is under foundation-config-cc, and
module for Apollo is under foundation-config-apollo.
  Users need to change dependency in pom.xml between foundation-config-cc
and foundation-config-apollo so that SPI can get different class to handle
different source of configuration. we are concerning that changing the
basic module like foundation maybe a bad usage way for user. Is there a
better way to do that? or we can create a new module for different
configuration source?

Any suggestion and comment is welcome!

Best Regards,
Bo Li


2017-12-27 16:26 GMT+08:00 Zhang Qi <to...@gmail.com>:

> By doing that, you just need to build one more Archaius source and put in
> https://github.com/apache/incubator-servicecomb-java-chassis/tree/0.5.0/
> foundations/foundation-config/src/main/java/io/servicecomb/
> config/archaius/sources
> For the details how to develop this source and scheduler you mentioned,
> please refer to: https://github.com/Netflix/archaius/wiki/Users-Guide
>
> 2017-12-27 16:03 GMT+08:00 李波 <li...@gmail.com>:
>
> > Dear all,
> >
> > I propose a architecture to support dynamic configuration for Chaasis.
> >
> > The detailed design is at the following link:
> > https://issues.apache.org/jira/secure/attachment/
> > 12903770/Dynamic%20Config%20Proposal.pdf
> >
> > The document explains why we choose Apollo as a centralized configuration
> > center,
> > and in order to support modify the configuration items dynamically, we
> need
> > to:
> > 1. Implement a driver layer  to support communication with Apollo
> > 2. Start a periodic thread to watch Apollo configurations
> > 3. Refresh the configuration item to Archaius Dynamic Properties
> >
> > Any comment is welcome!
> >
> > Best Regards,
> > Bo Li
> >
> > 2017-12-21 10:56 GMT+08:00 Bin Ma <ma...@gmail.com>:
> >
> > > Hi all,
> > >
> > > After the investigation of the config center in the open source
> > community,
> > > we plan to support communicating with Apollo config center firstly for
> > java
> > > chassis.
> > >
> > >
> > > Realization of ideas,
> > >
> > > 1.To ensure scalability, implement a driver interface layer in the
> > > foundation-config-cc module, which links the driver instance to open
> > source
> > > config center.
> > >
> > > 2. Refactor the code of communication with cse config center as
> > independent
> > > driver.
> > >
> > > 3. Implement a driver to communicate with Apollo config center. Apollo
> > > config center provides REST APIs and library two ways to get config
> data,
> > > in order to reduce the coupling degree, give priority to using REST
> APIs
> > > way, it will be verified next step.
> > >
> > >
> > > next,we will make a demo to verified it.
> > >
> > > 2017-12-15 19:13 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > Hi Bo,
> > > >
> > > > It's a good feature to support user to change the configuration
> > > dynamically
> > > > from a configure server.
> > > > Please let us know your research result and made a proposal in the
> > > > community.
> > > >
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Blog: http://willemjiang.blogspot.com (English)
> > > >           http://jnn.iteye.com  (Chinese)
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Dec 13, 2017 at 7:58 PM, 李波 <li...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > We plan to enable dynamic configuration in Java Chassis, After
> that,
> > > > > configurations can be changed dynamically without restarting the
> > > services
> > > > > any more.
> > > > >
> > > > > To do that, we need following steps:
> > > > >
> > > > >
> > > > >    - Implement an adapter layer for the configuration server to
> > > > communicate
> > > > >    with Java Chassis(dynamic configuration based on archaius).
> > > > >    - A user friendly CLI/UI to manage configurations at runtime
> > > > >    - An event store to record users' operations
> > > > >
> > > > >
> > > > > Before that, some researches are needed:
> > > > >
> > > > >
> > > > >    - How do other frameworks support dynamic configurations? CSE?
> > > > >    - Which configuration server to choose? Apollo or Disconf?
> > > > >
> > > > >
> > > > >
> > > > > Best Regards,
> > > > > Bo Li
> > > > >
> > > >
> > >
> >
>
>
>
> --
> 张琦
> Mobile:15901162453
> MSN:todayhill@hotmail.com
> Blog:www.faquir.net
> Weibo: www.weibo.com/todayhill
>