Water (water breeds all things…)

Water provides a one-stop solution for project development and service governance (which can be understood as a microservice architecture support suite). Developed based on the Solon framework and supports the full Solon Cloud specification; has been running in production for 4 years.

The function is equivalent to: consul + rabbitmq + elk + prometheus + openFaas + quartz + etc., and organically combined. Or approximately equal to: nacos + rocketmq + PlumeLog + prometheus + magic-api + xxl-job + etc.

It is friendly to k8s, supports IP drift, and supports k8s service mapping.

This update

  • Added “Indicator Concern” record interface and display
  • Added “Certificate Monitoring” management interface
  • Added “app monitoring” batch disable enable support
  • Added “Data Monitoring” batch disable enable support
  • Solon is upgraded to: 1.10.2 (project address: https://gitee.com/noear/solon)
  • Snack3 is upgraded to: 3.2.35 (project address: https://gitee.com/noear/snack3)

Quick start

Learn about development frameworks and mirroring

Development Framework
org.noear:water.clientFramework: Water Client
org.noear:water-solon-pluginFramework: Water client for soloon (also available for Spring Boot projects)
noearorg/waterapi:2.8.2Image: Water main interface service
noearorg/watersev:2.8.2Mirror: Water background service (health detection; data monitoring; message distribution; scheduled tasks, etc…)
noearorg/wateradmin:2.8.2Image: Water management console (support LDAP login)
noearorg/waterfaas:2.8.2Image: Water instant interface service, providing lightweight FaaS interface service
noearorg/xwater:2.8.2Build: Water Assistant Tool

Console Demonstration Station

Address: http://water.noear.org (account: demo; password: demo)

Key persistence notes:

  • Log persistence, support: MySql, PostgreSQL, MongoDb, ElasticSearch, ClickHouse
  • Message persistence, support: MySql, PostgreSQL, MongoDb

project address

code demo

(1) Configuration

<!-- 客户端版本 -->

<!-- solon cloud 集成版本 (也可用于 Spring Boot 项目) -->

  name: "demo-api"
  group: "demo"

  server: "waterapi:9371"    #WATER服务地址
    load: "demo.yml"         #默认加载的配置

(2) Code

public class DemoApp {
    public void main(String[] args) {
        SolonApp app = Solon.start(DemoApp.class, args);

        Logger log = LoggerFactory.getLogger(DemoApp.class);
        app.filter((ctx, chain) -> {
            long start = System.currentTimeMillis();

            try {
            } catch (Throwable e) {
            } finally {
                long milliseconds = System.currentTimeMillis() - start;
                CloudClient.metric().addMeter(Solon.cfg().appName(), "path", ctx.pathNew(), milliseconds);

public class DemoConfig {

    public DataSource db1(@CloudConfig("demoDb") HikariDataSource ds) {
        return ds;
    public I18nBundleFactory i18nBundleFactory(){
        return new CloudI18nBundleFactory();

public class DemoController{
    @CloudConfig(name = "demoDb", autoRefreshed = true)  //配置服务的功能(注解模式)
    DbContext demoDb;

    @NamiClient            //RPC服务发现的功能(注解模式)
    RockService rockService;
    public void test(){
        log.info("你好,日志服务"); //(content)
        log.error("{}\\r\\n{}","test","你好,日志服务"); //(tag,summary,content)
        Map map = demoDb.table("water_reg_service").limit(1).selectMap("*");

        CloudClient.event().publish(new Event("demo.test", "{\\"order_id\\":1}")); //(非注解模式)

        AppModel app = rockService.getAppById(12);

//消息订阅:订阅消息并处理(根据:topic 进行订阅)
public class Event_demo_test implements CloudEventHandler {
    public boolean handle(Event event) throws Exception {
        log.info("我收到消息:" + event.content());
        return true;

public class TestConfigHandler implements CloudConfigHandler {
    public void handle(Config config) {


@CloudJob(name = "demo_test", cron7x = "0 1 * * * ?")
public class Job_test implements CloudJobHandler {

    public void handle(Context ctx) throws Throwable {

#Onestop #service #governance #platform #Water #released #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *