apache / apache/incubator-seata

[Discussion]Add an eventbus mechanism for the status change notification of transactions

Open
#751 1 comment 2 reactions 0 assignees View on GitHub
type: discussion
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

## Why you need it?
As https://github.com/seata/seata/issues/384#issuecomment-480713071 mentioned,I think we can add an eventbus mechanism in order to make seata better scalability, then we can implement various metrics or other features based on it.

在 https://github.com/seata/seata/issues/384#issuecomment-480713071 中已经提到,我想我们可以增加一个事件机制使得seata具有更好的可扩展性,然后在之上实现metrics和其它新特性。

## How it could be?
The fast and simple way is use [EventBus](https://github.com/google/guava/tree/master/guava/src/com/google/common/eventbus) in [Google Guava ](https://github.com/google/guava) lib, after we can make a higher performance implementation by ourself.

最简单快速的方法是使用[谷歌 Guava](https://github.com/google/guava)库中的[EventBus](https://github.com/google/guava/tree/master/guava/src/com/google/common/eventbus),未来我们也可以自己实现更简单更高效的EventBus机制。

This mechanism will add into all seata components include TC,TM and RM, it will raise event when the status of transaction changed like started, committed, failed or aborted, not only status is inclued in this events, also transaction name, start time, end time(for compute duration).

这个机制将会在所有的seata组件包括TC,TM和RM中添加,当事务的状态发生变化的时候例如开始、已提交、失败或终止就会触发,事件中不仅包含状态信息,还包含事务名,开始时间和结束时间(用于计算时延)。

## Other related information
https://github.com/seata/seata/issues/384

Contributor guide

Open the contributing guide

Research direction

Start by reading the related discussion in issue #384 and review how transaction status changes are handled across the TC, TM, and RM components. Evaluate the proposed Guava EventBus approach and define the event data for transaction name, status, start time, and end time. Done would mean an agreed mechanism covering the listed transaction lifecycle states and components.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.