All Projects → ihaolin → Diablo

ihaolin / Diablo

Licence: mit
分布式配置管理平台(Distributed Configuration Management Platform)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Diablo

Core
CQRS-DDD-Actor framework for Node.js
Stars: ✭ 273 (-18.75%)
Mutual labels:  distributed
Crate
CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of data in real-time.
Stars: ✭ 3,254 (+868.45%)
Mutual labels:  distributed
Cntk
Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
Stars: ✭ 17,113 (+4993.15%)
Mutual labels:  distributed
Dotnetspider
DotnetSpider, a .NET standard web crawling library. It is lightweight, efficient and fast high-level web crawling & scraping framework
Stars: ✭ 3,233 (+862.2%)
Mutual labels:  distributed
Phoenix
Peace of mind from prototype to production
Stars: ✭ 17,476 (+5101.19%)
Mutual labels:  distributed
Redsync.go
*DEPRECATED* Please use https://gopkg.in/redsync.v1 (https://github.com/go-redsync/redsync)
Stars: ✭ 292 (-13.1%)
Mutual labels:  distributed
Beeping
HTTP Monitoring via API - Measure the performance of your servers
Stars: ✭ 267 (-20.54%)
Mutual labels:  distributed
Coherence
Oracle Coherence Community Edition
Stars: ✭ 328 (-2.38%)
Mutual labels:  distributed
Clearly
Clearly see and debug your celery cluster in real time!
Stars: ✭ 287 (-14.58%)
Mutual labels:  distributed
Go Advanced
A small Vietnamese Go book compiled by ZaloPay teams.
Stars: ✭ 321 (-4.46%)
Mutual labels:  distributed
Broccoli
Broccoli - distributed task queues for ESP32 cluster
Stars: ✭ 280 (-16.67%)
Mutual labels:  distributed
Redisson
Redisson - Redis Java client with features of In-Memory Data Grid. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Publish / Subscribe, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, MyBatis, RPC, local cache ...
Stars: ✭ 17,972 (+5248.81%)
Mutual labels:  distributed
Aecor
Pure functional event sourcing runtime
Stars: ✭ 299 (-11.01%)
Mutual labels:  distributed
Oklog
A distributed and coördination-free log management system
Stars: ✭ 2,937 (+774.11%)
Mutual labels:  distributed
Xxl Job
A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
Stars: ✭ 20,197 (+5911.01%)
Mutual labels:  distributed
Fluidframework
Library for building distributed, real-time collaborative web applications
Stars: ✭ 3,592 (+969.05%)
Mutual labels:  distributed
Joyrpc
high-performance, high-extensibility Java rpc framework.
Stars: ✭ 290 (-13.69%)
Mutual labels:  distributed
Distributed Java
Distributed Java.《分布式 Java》
Stars: ✭ 332 (-1.19%)
Mutual labels:  distributed
Sshoogr
A Groovy-based DSL for working with remote SSH servers.
Stars: ✭ 327 (-2.68%)
Mutual labels:  config-management
Zoneminder
ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
Stars: ✭ 3,450 (+926.79%)
Mutual labels:  distributed

轻量的分布式配置管理平台Build Status

English wiki

在线Demo: 用户名/密码(admin/admin123).

一些特性

  • 轻量级: 没有复杂的技术和第三方依赖;

  • 可靠存储: 使用Redis作为存储,建议使用Redis ClusterRedis Master-Slave 或者 Redis Proxy Middleware等技术保证存储的可靠性;

  • 对等的Server节点: Server节点的对等性,保证即便某些Server不可用,集群仍能工作;

  • 近似实时更新: diablo使用Http长轮询来保证客户端能及时得到配置更新的通知;

  • 简单的UI: diablo内嵌了一个简单易用的web界面,叫做Diablo Tower;

  • ...

Diablo架构

Quick start

安装

  • 下载最新的压缩包;

  • 或者通过源码构建:

     mvn clean package -DskipTests
     # package located diablo-server/target/diablo-server-{version}.tar.gz
    
  • 解压缩包:

     tar zxf diablo-server.tar.gz
     ll diabloh
     bin		# the execute scripts
     conf	# conf dir
     lib		# dependency libs
    
  • 编辑配置文件diablo.conf

     # vim ${DIABLO_HOME}/conf/diablo.conf
     # The server bind address
     BIND_ADDR=127.0.0.1
     
     # The server listening port
     LISTEN_PORT=2143
     
     # The redis host
     REDIS_HOST=127.0.0.1
     
     # The redis port
     REDIS_PORT=6379
     
     # The log path
     LOG_PATH=~/logs/diablo
     
     # The password for Diablo Tower admin
     TOWER_PASS=admin
     
     # The inverval(seconds) for checking server's status
     CHECK_SERVER_INTERVAL=5
     
     # Enable or disable client api auth
     # client must config the appKey, if CLIENT_AUTH=true
     CLIENT_AUTH=true
     
     # Java Heap options
     JAVA_HEAP_OPTS="-Xms512m -Xmx512m"
    
  • 启动或停止diablo server:

     ${DIABLO_HOME}/bin/diablo.sh start
     ${DIABLO_HOME}/bin/diablo.sh stop
     ${DIABLO_HOME}/bin/diablo.sh restart
    

使用 Diablo Tower

  • 启动diablo server后,便可通过Http访问diablo tower(如http://127.0.0.1:2143);

  • 事先准备应用配置项

    • 编辑应用:

      app_edit_en.png

    • 编辑配置项:

      config_edit_en.png

集成diablo client到应用中

  • 以下针对Java客户端,其他客户端可参考该规范

  • SimpleDiabloClient(编程模式):

    • 添加maven依赖:

       <dependency>
           <groupId>me.hao0</groupId>
           <artifactId>diablo-client</artifactId>
           <version>1.2.3</version>
       </dependency>
      
    • 代码样例:

       SimpleDiabloClient client = new SimpleDiabloClient();
      client.setAppName("myapp");
      client.setAppKey("123456");
      client.setServers("127.0.0.1:2143,127.0.0.1:2144");
      // 可添加配置监听
      client.addListener(new ConfigListener<String>() {
           @Override
           public String name() {
               // 配置项名称
               return "test_config1";
           }
      
           @Override
           public void onUpdate(String newValue) {
               // 该方法会在本地配置更新后触发
               System.out.println("test_config1 has updated to " + newValue);
           }
       });
      client.start();
      
      // 获取配置项最新的值
      String testConfig = client.get("test_config");
      
      // 获取配置项最新的json对象
      MyClass myClass = client.get("test_json", MyClass.class);
      
      client.shutdown();
      
    • 具体见测试用例.

  • SpringDiabloClient(Spring注入模式):

    • 添加maven依赖:

       <dependency>
           <groupId>me.hao0</groupId>
           <artifactId>diablo-client-spring</artifactId>
           <version>1.2.2</version>
       </dependency>
      
    • 配置片段:

       <bean class="me.hao0.diablo.client.SpringDiabloClient">
       	<property name="appName" value="myapp" />
       	<property name="appKey" value="123456" />
       	<property name="servers" value="127.0.0.1:2143,127.0.0.1:2144" />
       	<!-- 可选配置 -->
       	<property name="listeners">
       		<list>
       			<ref bean="activityNoListener" />
       			<ref bean="timeInfoListener" />
       			<ref bean="timeInfosListener" />
       			<ref bean="timeInfoMapListener" />
       		</list>
       	</property>
       </bean>
       
       <!-- 可配置一些监听器,会在本地配置更新后触发 -->
       <bean id="activityNoListener" class="me.hao0.diablo.client.listener.ActivityNoListener" />
       <bean id="timeInfoListener" class="me.hao0.diablo.client.listener.TimeInfoListener" />
       <bean id="timeInfosListener" class="me.hao0.diablo.client.listener.TimeInfosListener" />
       <bean id="timeInfoMapListener" class="me.hao0.diablo.client.listener.TimeInfoMapListener" />
      
    • 添加diablo配置Beanspring上下文中, 如:

       @Component
       public class MyAppConfig implements DiabloConfig {
       
       	// 支持基本类型转换 
           private String activityNo;
           private Integer activityChannel;
           private Boolean activityStart;
           private Float activityRatio;
           private Long activityCount;
           private Double activityFee;
        
           // 支持普通json对象转换
           private TimeInfo timeInfo;
       
           // 支持一级List对象转换
           private List<TimeInfo> timeInfos;
       
           // 支持一级Map对象转换
           private Map<String, TimeInfo> timeInfoMap;
       	
       	// getters and setters
       }
      
    • 具体见测试用例.

  • 这样一旦你通过Diablo Tower修改了对应配置项时,客户端将收到通知。

有事请烧钱

  • 支付宝:

  • 微信:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].