MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

深度分析:Milkomeda,一套基于Spring生态的高效开发模块

项目背景与痛点

在微服务和云原生技术浪潮中,Spring Boot 逐渐成为现代企业级应用开发的事实标准。然而,随着项目规模的扩大,开发团队面对的业务复杂性也在不断提升。开发者需要在快速迭代的同时保持代码质量,既要快速实现功能,又要保障系统的稳定性和可维护性。于是,像 Milkomeda 这样的项目便应运而生,其核心目的是基于 Spring Boot,提供一系列来自业务实践的快速开发模块,以提升开发效率和开发体验。

核心技术揭秘

Milkomeda 的架构原则体现在简洁高效的数据流处理机制,以及对工厂模式的广泛运用。该框架的核心组件包含流程引擎、缓存管理、日志输出等模块,它们之间通过轻量级的依赖注入实现松耦合。为了进一步解释 Milkomeda 的运作原理,下面将通过一张简洁明了的 Mermaid 数据流图来展示这一过程。

数据流演示

graph TD A[用户请求] --> B("参数校验") B -->|"参数通过验证"| C[业务逻辑处理] C --> D{"异步/同步处理?"} D -->|"异步"| E[消息队列]; D -->|"同步"| F[结果返回]; B -->|"参数未通过验证"| G{"返回错误"}

如图表所示,用户请求首先会被彻底校验,经过检验的请求会被送往业务逻辑处理层。在这个过程中,某些操作将被定向至异步处理以优化响应时间,其余操作则直接返回结果。整个流程设计优雅,简洁且高效,同时支持强大的扩展能力。

功能亮点与差异

Milkomeda 突显出其独特优势,在快速搭建微服务方面具有不俗表现。与其它框架相比,Milkomeda 最大的区别在于其模块化设计理念带来的灵活性。用户可以按需引入各个子模块,减少冗余,同时丰富业务需求。此外,充分考虑了模块之间的松散耦合,使得这些组件能够无缝集成到现有的 Spring Boot 应用中,不仅降低了初期整合成本,也提升了长期维护性。

应用场景与落地建议

在生产环境中使用 Milkomeda 时需留意一些细节,比如在部署前务必详细测试每个引入的模块,确保它们适配业务场景。针对大型项目,推荐初期对关键模块进行彻底审查,以确保业务逻辑与框架功能无缝对接。

Milkomeda 的理想应用场景集中在逐步向微服务过渡的现代化企业,尤其是那些对于开发者效率有较高要求的中小型团队。利用该框架,可以极大地提高开发速度,同时确保代码的正确性和系统稳定性。

综合评价

总体而言,Milkomeda 作为基于 Spring 生态的扩展组件集合,在快速开发与业务实现之间找到了一个很好的平衡点。通过精心设计的模块化架构,它为开发团队提供了可高度自定义的开发环境,同时确保了项目的可扩展性与维护性。当然,这也使得 Milkomeda 在灵活性和性能上拥有一定优势,但也需留意引入新模块可能导致的复杂度增加问题。在持续迭代过程中,Milkomeda 必将成为更多开发团队的首选。

关于

GitHub 原始描述(英文)

Spring extend componets which build from experience of bussiness, let developers to develop with Spring Boot as fast as possible.(基于Spring生态打造的一系列来自业务上的快速开发模块集合。)

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

HTML
Java
Kotlin
Lua

Release

README

Milkomeda

tag Maven Central Java CI Code Coverage Production Ready license

The project name is inspired by the fact that the Milky Way and Andromeda galaxies will merge in the future, and like the Spring ecosystem, this project has a number of popular modular solutions.

This project is not demo or template, can be called “springboot plus” (sounds like a great project), each module needs to be enabled with the appropriate annotations.

中文文档

Goals

  • Use meta-configuration whenever possible.
  • Use annotations whenever possible.
  • Use declarative programming whenever possible.

Modules

  • Pulsar: Used for long polling, fast-timeout. 0.1.0+
    • Depends on: Spring MVC
  • Comet: Used for uniform request facet logging (include controller layer and service layer (1.12.0+)). 0.2.0+
    • Depends on: Spring MVC
  • Pillar: Used for if/else business block splitting. 0.2.0+
    • Depends on: Spring IoC
  • Particle: Support idempotent, times and Bloom limiter (3.9.0), also allow an extensible limiter chain of responsibility. 1.5.0+
    • Depends on: Spring MVC, SpringBoot Data Redis
  • Light: Used for data cache, support super cache (ThreadLocal), L1 cache(RAM), L2 cache (Redis). 1.8.0+
    • Depends on: SpringBoot Data Redis
  • Fusion: Used for dynamic modify method return value, invoke methods based on conditions (support fallback when condition is disallow). 1.12.0+
    • Depends on: Spring AOP
  • Echo: Integrating the RestTemplate with support sign/unsigned with RSA, encryption with AES, uniform response and verification . 1.13.0+
    • Depends on: Spring MVC
  • Crust: Used for both session login and jwt Token stateless login, support config token encryption with RSA and AES. 1.14.0+
    • Depends on: Spring Security
  • Ice: Used for delay queue, support delay bucket, TTR, task auto schedule. 1.15.0+
    • Depends on: Spring IoC, Spring Task, SpringBoot Data Redis
  • Neutron: Used for time task,support create/delete/update job online. 1.18.0+
    • Depends on: Spring IoC, Quartz
  • Moon: Used for polling between multiple type values, support for concurrent operations, support for generic data values, and isolation of different services. 2.2.0+
    • Depends on: Spring IoC, SpringBoot Data Redis
  • Halo: Used for listen Mybatis CRUD. 2.5.0+
    • Depends on: Mybatis
  • Hydrogen: Used for aop transactions, unified exception response handling (also support for custom exceptions), parameter validation, internationalization, add interceptors and filters dynamically (support for loaded online). 3.0.0+
    • Depends on: Spring MVC
  • Atom: Used for distributed lock, support both Redis and Zookeeper solution. 3.3.0+
    • Depends on: Redission, Curator-Recipes
  • Wormhole: The event bus designed based on DDD architecture module can be used for event flow, big data business event production and output. 3.3.0+
    • Depends on: Spring IoC
  • Sundial: Used for master-slave data source switching, addition supports sub-table with consistency of the Hash (3.8.0+). 3.4.0+
    • Depends on: Spring JDBC, Mybatis
  • Jupiter: Lightweight rule engine based on data source queries, query filtering with request domains extract expression (such as $params, $attr, $header),and result matching with EL/OGNL expression parsing. 3.5.0+
    • Depends on: Spring JDBC, Spring EL, OGNL
  • Metal: Used for distributed dynamic configuration refresh based on KV data and support property-binding injection. 3.6.0+
    • Depends on: Spring IoC, SpringBoot Data Redis
  • Orbit: Add method interceptor only with yml config or using @Orbit. 3.13.0+
    • Depends on: Spring AOP
  • Sirius: Mybatis-plus addition support, such as page query with @QueryMatcher, remove before check ref with @RefMatcher. 3.14.0+
    • Depends on: Mybatis-plus

Requirements

  • Java 8
  • Lombok 1.18.x
  • SpringBoot 2.x

Version control guidelines

Milkomeda Spring Boot
4.0 preview 3.2.x
3.15.x - 3.20.x 2.7.x
3.14.x 2.6.x
3.13.x 2.4.x - 2.5.x
3.0 - 3.12.x 2.2.x - 2.3.x
1.16.x - 2.x 2.1.x
Dalston.1.11.0-Dalston.1.12.0 Spring Boot 1.5.x

Installation

<dependency>
    <groupId>com.github.yizzuide</groupId>
    <artifactId>milkomeda-spring-boot-starter</artifactId>
    <version>${milkomeda-last-version}</version>
</dependency>

Upgrade

3.0 Release

Milkomeda 3.0 is now available(April 2020).

  • YML config, promoted to first-class of development, allows developers to start quickly.
  • Add a new module called Hydrogen, the infrastructure functions of Spring and SpringMVC are all taken over, and explored from the source level.
  • The aggregation ability of functional modules has strengthened to achieve the improvement of the small world within the big world.

More

Documentation

See Wiki

Releases log

See Releases

Contributing

This project needs more developers to work together, join us with some notice as the following:

  • If you have a better idea, please submit a new issue with [feature] prefix.
  • Fork from master branch, check out a new branch named like feat_module_yyyyMMdd for add new module,fix_module_yyyyMMdd for fixing issues.
  • The newly added module should be as universal as possible, also provide demo in MilkomedaDemo as better.
  • The newly added module must be under package com.github.yizzuide.milkomeda with addition module name subpackage, and can be enabled with annotation in Spring Boot environment.
  • Don’t commit IDE config file and OS temp file, please add to .gitignore file.
  • The last thing, pull request for me with master branch or dev-xxx if there is a recent new version development branch.

Author

yizzuide [email protected]

License

Milkomeda is available under the MIT license. See the LICENSE file for more info.

评论

暂无评论