slievrly commented on issue #6739:
URL: 
https://github.com/apache/incubator-seata/issues/6739#issuecomment-2284474050

   > 
您好!想就司内目前的场景,请教一下该使用何种分布式事务模型。举个例子,司内目前有上层应用A和方法a,他会调用其他两个底层应用B的b接口方法以及应用C的c接口方法。在未接入分布式事务的时,采用的土办法就是应用A开发了回滚方法ra,方法ra中会调用b和c的回滚方法rb、rc。然后在a方法执行异常时候显示调用ra。为代码如下:
 func a(){ try{ call B.b(); call C.c(); }catch(Exception e){ call ra(); } }
   > 
   > func ra(){ call rb(); call rc(); } 
由于应用B和C不一定是java写的,所以AT模式无法使用。而对于TCC模式,要改造出prepare、commit、rollback三个方法,几乎不现实,而且业务场景是并不存在需要commit这个方法的场景,相当于commit都是空逻辑。如果采用saga模式,这里也并不是长事务的场景,实际就是异常的是时候需要调用ra()方法,如果画流程图就是简单的一个正向节点一个反向补偿节点,但是对于接入而言每个上层应用A的类似a接口方法,都需要改动业务逻辑并画业务流程图,看起来有点重。
 如上,我想请教的是
   
   > 1.实际最符合需求的就是TCC模式但是commit要允许空方法,不知目前是否支持这种特殊配置。
   
   Whether TCC allows the commit method to be null depends on your 
implementation, but it is essential that you have this method. 
   
   > 2.如果采用saga模式,不知是否对于这种单节点的场景,有没有更简单的配置方式,类似于TCC模式的注解。
   > 
   
   Annotation based saga mode, is under development.
   
   > 以上,期待您的回答,多谢!
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to