Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

对pack的几点述求 #692

Open
kelly-ye opened this issue Jan 27, 2021 · 7 comments
Open

对pack的几点述求 #692

kelly-ye opened this issue Jan 27, 2021 · 7 comments

Comments

@kelly-ye
Copy link

1、springboot框架还是比较大的,想只基于spring开发,是否可以剥离springboot框架
2、使用的中间件,如:Kafka、缓存、数据库是否可以提供接口,由业务方进行适配实现接口进行对接
3、当前很多场景是通过异步回调的方式来判断分支事务是否结束,不是同一个线程,怎么在回调方法里面来告诉alpha事务的结果
4、一个分支事务会增加时延几十毫秒甚至上百毫秒,性能需要再优化

@kelly-ye kelly-ye changed the title 框架的优化建议 对pack的几点述求 Jan 27, 2021
@zhfeng
Copy link
Contributor

zhfeng commented Jan 27, 2021

Thanks @kelly-ye to bring these suggestions. It could be better if you can describe them in English and I think it could be much helpful for more people.

  1. I agree that we need to consider getting out of the spring-boot framework and might provide the core capabilities building on the different runtime vendors, such as the spring, spring-boot or CDI (maybe others). So I think this could be very useful to extend Saga in the different runtime environments. And yeah, this is really a big refactoring on the current codes. I'd like to create a new experimental branch for these changes and see more feedbacks from the community.
  2. It's a good idea to priovde the SPI for these components.
  3. I think we have some discuss about the async invoking of Saga before

@coolbeevip
Copy link
Member

coolbeevip commented Jan 27, 2021

Spring Boot components are used in the following places

In Actor mode (saga)

  1. Use spring boot data Elasticsearch for the persistence of completed transaction data

About Channel Model(redis queue or kafka queue)
2. When alpha receives gRPC events, push to Redis queue(spring boot data redis)

In DB mode(saga or tcc)

  1. Use spring boot data JPA

Alpha UI

  1. Use spring boot Thymeleaf for UI
    2.Use spring boot WebSocket for push indicator data to the Alpha UI

  2. Non-state machine mode uses spring boot data jpa

  3. The spring cloud component is also used to realize the registration of some third-party registration centers, eureka, nacos

@kelly-ye
Copy link
Author

Thank you @zhfeng for your reply,

  1. How to handle the asynchronous invoking of the Saga?
  2. In Akka mode, whether the actor status can be persisted to the database. Currently, the actor status is persisted to the Redis. However, if the Redis is unreliable, data will be lost, which may cause the actor to fail to be restored.

@zhfeng
Copy link
Contributor

zhfeng commented Jan 27, 2021

Thank you @zhfeng for your reply,

  1. How to handle the asynchronous invoking of the Saga?

I think it depends on the async framwork you use, such as java concurrency future, vertx, etc. I can not find the discussion on the github issues but maybe on the gitter, @WillemJiang can you recall ?

  1. In Akka mode, whether the actor status can be persisted to the database. Currently, the actor status is persisted to the Redis. However, if the Redis is unreliable, data will be lost, which may cause the actor to fail to be restored.

I think there is an issue for the redis cluster and persistent.

@chanjarster
Copy link
Member

@zhfeng
Copy link
Contributor

zhfeng commented Feb 3, 2021

Thanks @chanjarster and yeah, this is exactly I want to work out. OK, it looks like a good opportunity to revisit our saga framework to support the async or reactive programming model at this time.

@LLLLimbo
Copy link

LLLLimbo commented Feb 24, 2021

Could use RocksDB as storage ,and use raft protocol replicating data across machines.
Also , Quarks mighte be substitute of Spring.

Current running state can be kept in memory on the leader , and on disk in RocksDB
See Zeebe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants