MCPcopy Index your code
hub / github.com/dromara/hmily

github.com/dromara/hmily @2.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.1.2 ↗ · + Follow
4,057 symbols 11,829 edges 774 files 2,014 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="https://dromara.org"><img src="https://yu199195.github.io/images/hmily/hmily-logo.png" width="45%"></a>

Financial-level flexible distributed transaction solution

https://dromara.org/

English | 简体中文

<a target="_blank" href="https://search.maven.org/search?q=g:org.dromara%20AND%20hmily">
    <img src="https://img.shields.io/maven-central/v/org.dromara/hmily.svg?label=maven%20central" />
</a>
<a target="_blank" href="https://github.com/Dromara/hmily/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license" />
</a>
<a target="_blank" href="https://app.codacy.com/app/Dromara/hmily?utm_source=github.com&utm_medium=referral&utm_content=Dromara/hmily&utm_campaign=Badge_Grade_Settings">
     <img src="https://api.codacy.com/project/badge/Grade/2f0a0191b02448e6919aca6ce12a1584" />
</a>
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
    <img src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://github.com/dromara/hmily">
    <img src="https://github.com/dromara/hmily/workflows/build/badge.svg" />
</a>
<a href="https://codecov.io/gh/dromara/hmily">
    <img src="https://codecov.io/gh/dromara/hmily/branch/master/graph/badge.svg"/>
</a>
<a target="_blank" href='https://gitee.com/dromara/hmily/stargazers'>
    <img src='https://gitee.com/dromara/hmily/badge/star.svg?theme=gvp' alt='gitee stars'/>
</a>
<a target="_blank" href='https://github.com/dromara/hmily'>
    <img src="https://img.shields.io/github/forks/dromara/hmily.svg" alt="github forks"/>
</a>
<a target="_blank" href='https://github.com/dromara/hmily'>
    <img src="https://img.shields.io/github/stars/dromara/hmily.svg" alt="github stars"/>
</a>
<a target="_blank" href='https://github.com/dromara/hmily'>
    <img src="https://img.shields.io/github/contributors/dromara/hmily.svg" alt="github contributors"/>
</a>


Panorama of distributed transaction solutions


Features

  • high reliability :supports abnormal transaction rollback in distributed scenarios, and abnormal recovery over time to prevent transaction suspension

  • usability :provide zero-invasive Spring-Boot, Spring-Namespace to quickly integrate with business systems

  • high performance :decentralized design, fully integrated with business systems, naturally supporting cluster deployment

  • observability :metrics performance monitoring of multiple indicators, and admin management background UI display

  • various RPC : support Dubbo, SpringCloud, Motan, Sofa-rpc, brpc, tars and other well-known RPC frameworks

  • log storage : support mysql, oracle, mongodb, redis, zookeeper etc.

  • complex scene : support RPC nested call transaction


Necessary premise

  • must use JDK8+

  • TCC mode must use a RPC framework, such as: Dubbo, SpringCloud, Montan


TCC mode

when using the TCC mode, users provide three methods: try, confirm, and cancel according to their business needs. And the confirm and cancel methods are implemented by themselves, and the framework is only responsible for calling them to achieve transaction consistency。


TAC mode

When the user uses the TAC mode, the user must use a relational database for business operations, and the framework will automatically generate a rollback SQL, When the business is abnormal, the rollback SQL will be executed to achieve transaction consistency。


Documentation

EN doc

CN doc

If you want to use it, you can refer to Quick Start

About Hmily

Hmily is a flexible distributed transaction solution that provides TCC and TAC modes。

It can be easily integrated by business with zero intrusion and rapid integration。

In terms of performance, log storage is asynchronous (optional) and asynchronous execution is used, without loss of business methods。

It was previously developed by me personally. At present, I have restarted at JD Digital. The future will be a distributed transaction solution for financial scenarios.。


Follow the trend

Stargazers over time


User wall

Support

Extension points exported contracts — how you extend this code

InitializeSPI (Interface)
The interface Initialize spi. @author xiaoyu [18 implementers]
hmily-spi/src/main/java/org/dromara/hmily/spi/InitializeSPI.java
AggregateElementBinder (Interface)
AggregateElementBinder. @author xiaoyu [7 implementers]
hmily-config/hmily-config-loader/src/main/java/org/dromara/hmily/config/loader/bind/AggregateElementBinder.java
HmilyTransactionInterceptor (Interface)
The HmilyTransactionInterceptor. @author xiaoyu [12 implementers]
hmily-core/src/main/java/org/dromara/hmily/core/interceptor/HmilyTransactionInterceptor.java
HmilySerializer (Interface)
HmilySerializer. @author xiaoyu [10 implementers]
hmily-serializer/hmily-serializer-spi/src/main/java/org/dromara/hmily/serializer/spi/HmilySerializer.java
InventoryClient (Interface)
The interface Inventory client. @author xiaoyu [12 implementers]
hmily-demo/hmily-demo-tcc/hmily-demo-tcc-springcloud/hmily-demo-tcc-springcloud-order/src/main/java/org/dromara/hmily/demo/springcloud/order/client/InventoryClient.java
InlineService (Interface)
@author xiaoyu(Myth) [10 implementers]
hmily-demo/hmily-demo-common/src/main/java/org/dromara/hmily/demo/common/account/api/InlineService.java
InventoryClient (Interface)
The interface Inventory client. @author xiaoyu [11 implementers]
hmily-demo/hmily-demo-xa/hmily-demo-xa-springcloud/hmily-demo-xa-springcloud-order/src/main/java/org/dromara/hmily/demo/springcloud/order/client/InventoryClient.java
HmilySegment (Interface)
SQL segment. [24 implementers]
hmily-tac/hmily-tac-sqlparser/hmily-tac-sqlparser-model/src/main/java/org/dromara/hmily/tac/sqlparser/model/common/segment/HmilySegment.java

Core symbols most depended-on inside this repo

get
called by 206
hmily-core/src/main/java/org/dromara/hmily/core/context/HmilyContext.java
info
called by 153
hmily-common/src/main/java/org/dromara/hmily/common/utils/LogUtil.java
get
called by 130
hmily-repository/hmily-repository-redis/src/main/java/org/dromara/hmily/repository/redis/jedis/JedisClient.java
error
called by 121
hmily-common/src/main/java/org/dromara/hmily/common/utils/LogUtil.java
equals
called by 118
hmily-xa/hmily-xa-rpc/hmily-xa-rpc-common/src/main/java/org/dromara/hmily/xa/rpc/RpcXaProxy.java
getInstance
called by 106
hmily-config/hmily-config-api/src/main/java/org/dromara/hmily/config/api/ConfigEnv.java
getConfig
called by 96
hmily-config/hmily-config-api/src/main/java/org/dromara/hmily/config/api/ConfigEnv.java
put
called by 79
hmily-xa/hmily-xa-core/src/main/java/org/dromara/hmily/xa/core/timer/HmilyTimer.java

Shape

Method 3,230
Class 663
Interface 127
Enum 37

Languages

Java100%

Modules by API surface

hmily-demo/hmily-demo-tcc/hmily-demo-tcc-grpc/hmily-demo-tcc-grpc-common/src/main/java/org/dromara/hmily/demo/grpc/account/service/AccountRequest.java54 symbols
hmily-repository/hmily-repository-file/src/main/java/org/dromara/hmily/repository/file/FileRepository.java52 symbols
hmily-demo/hmily-demo-tcc/hmily-demo-tcc-grpc/hmily-demo-tcc-grpc-common/src/main/java/org/dromara/hmily/demo/grpc/inventory/service/InventoryResponse.java51 symbols
hmily-demo/hmily-demo-tcc/hmily-demo-tcc-grpc/hmily-demo-tcc-grpc-common/src/main/java/org/dromara/hmily/demo/grpc/inventory/service/InventoryRequest.java51 symbols
hmily-xa/hmily-xa-p6spy/src/main/java/org/dromara/hmily/xa/p6spy/HmilyXaConnection.java49 symbols
hmily-demo/hmily-demo-tcc/hmily-demo-tcc-grpc/hmily-demo-tcc-grpc-common/src/main/java/org/dromara/hmily/demo/grpc/account/service/AccountResponse.java44 symbols
hmily-xa/hmily-xa-p6spy/src/main/java/org/dromara/hmily/xa/p6spy/HmilyXaStatement.java43 symbols
hmily-tac/hmily-tac-metadata/src/main/java/org/dromara/hmily/tac/metadata/connection/MetaDataConnectionAdapter.java42 symbols
hmily-repository/hmily-repository-zookeeper/src/main/java/org/dromara/hmily/repository/zookeeper/ZookeeperRepository.java39 symbols
hmily-repository/hmily-repository-redis/src/main/java/org/dromara/hmily/repository/redis/RedisRepository.java39 symbols
hmily-repository/hmily-repository-database/hmily-repository-database-manager/src/main/java/org/dromara/hmily/repository/database/manager/AbstractHmilyDatabase.java39 symbols
hmily-xa/hmily-xa-p6spy/src/main/java/org/dromara/hmily/xa/p6spy/HmilyXaPreparedStatement.java38 symbols

Datastores touched

(mysql)Database · 1 repos
hmilyDatabase · 1 repos
hmily_accountDatabase · 1 repos
hmily_orderDatabase · 1 repos
hmily_stockDatabase · 1 repos
xa_testDatabase · 1 repos

For agents

$ claude mcp add hmily \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact