distributed-flexible-transaction | 采用Best effort 1pc | Aspect Oriented library
kandi X-RAY | distributed-flexible-transaction Summary
kandi X-RAY | distributed-flexible-transaction Summary
这是一个在dubbo rpc服务框架上实现的分布式事务补偿框架,该分布式事务框架没有采用传统的2pc(两阶段分布式事务提交的协议), 因为两阶段分布式事务提交协议有比较大的阻塞性能问题。所以distributed-flexible-transaction 分布式事务框架采用的 是Best effort 1PC(一阶段最大努力提交协议) + 分布式回滚补偿的方式来实现分布式事务,这样可以大大提高性能,同时能 保证不同分布式服务之间的数据一致性。应用场景如下: 比如现在有 分布式服务A,B,C,D,E,F。 A->B,B->C,C->D,D->E,E->F,在distributed-flexible-transaction分布式事务框架中一次分布式服务的调用链就是一个transaction, 每个单独的分布式服务是一个participant。一个transaction由多个participant组成。当D->E出现超时异常或是业务异常时, 分布式事务框架将会执行A->B,B->C,C->D 的各个participant(分布式服务调用)的回滚服务进行事务补偿。同时,在分布式事务的整个执行过程中,用WAL(Write ahead log)机制,将分 布式服务执行的commit和rollback之前保留重要执行信息。.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Rollback the transaction
- Rollback a transaction
- Writes a transaction write ahead log to the log
- Gets a method by name and parameter types
- Get TransactionWriteAheadLog from logger
- Convert a TransactionWriteAheadLog to a TransactionWriteAheadLog
- Deserializes the given byte array into an object
- Get transaction write - ahead log type
- Save writeAheadLogger
- Serialize object to byte array
- Convert TransactionWriteAheadLog to a TransactionWriteAhead object
- Save a transaction
- Converts a Transaction object to a TransactionMongoBean
- Delete transaction mongo bean
- Update transaction
- Updates the transaction mongo bean
- Get rollback error transaction
- Main entry point
- Create a new thread
- Enroll a participant
- Return the transaction with the given transaction UUID
- Run async write - ahead log
- Get rollback error transaction
- UpdateTransactionMongoBean
- Starts a transaction
distributed-flexible-transaction Key Features
distributed-flexible-transaction Examples and Code Snippets
Community Discussions
Trending Discussions on Aspect Oriented
QUESTION
While writing code using Spring/Java and Aspect oriented programing, I'm facing an issue. In the service class, I have the retry method using @Retryable and a recovery method using @Recover.
Each of these 2 methods are attached to Aspects. The Retryable method - "triggerJob" inside TestProcessService is attached to these methods in TestAspect class - beforeTestTriggerJobsAdvice, afterTestTriggerJobsAdvice, onErrorTestTriggerJobsAdvice. They all are working fine and getting triggered at the right time.
PROBLEM STATEMENT: The Recovery method - "recover" inside TestProcessService is attached to these methods in TestAspect class - beforeRecoveryTestJobsAdvice, onErrorRecoveryTestTriggerJobsAdvice, and afterRecoveryTestTriggerJobsAdvice.
BUT NONE OF THESE ASPECT METHODS ARE GETTING CALLED once the code reached the recover method inside TestProcessService.
Here is the code:
SCHEDULER CLASS (triggers the methods inside TEST_MyProcessService class at regular interval)
...ANSWER
Answered 2021-Jun-08 at 03:45I am not a Spring user, but interested in all things AOP, both AspectJ and Spring AOP. I liked your little puzzle. Thanks to your MCVE, I was able to reproduce the issue and debug into it. This is a perfect example for why an MCVE is so much superior to simply posting a bunch of code snippets. So thanks for that, please keep up this way of asking questions.
When looking at the situation in a debugger, you see that while the aspect is proceeding into triggerJob
, at some point we are in method AnnotationAwareRetryOperationsInterceptor.invoke
and there we have the following code:
QUESTION
I'm trying to run a web app with maven, spring on a tomcat server in intelliji idea. And i get: Artifact crm-web:war exploded: Error during artifact deployment.
Loggs:
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.WebApplicationContext SEVERE: Exception invoking method createStandardContext SEVERE: Exception invoking method manageApp
Here is project structure:
...ANSWER
Answered 2020-Nov-13 at 12:51I was able to solve the problem by moving all the necessary jars to the WEB-INF/lib folder. Turns out they were in a different directory
QUESTION
I am using Microsoft.CodeDom.Providers.DotNetCompilerPlatform
nuget packge for compilation of code at runtime. It is achievable but in my scenario my dynamic class needs to use Postsharp
for aspect oriented programming.
Can anyone point me to the commandline support to add Postsharp
dependency injection for the compiled assembly using the csc.exe
, like what is done by the MSBuild or Visualstudio.
ANSWER
Answered 2020-Aug-17 at 10:26You can't easily do that with the current versions of PostSharp. The last version to have command-line execution is 5.0 and that is no longer supported.
The problem is that PostSharp reads too many properties in MSBuild or passed to it by MSBuild.
If it's possible for you to generate an msbuild file, you can then build it the Microsoft.Build NuGet package and have PostSharp run on the generated code that way.
QUESTION
I want to check user authorization in the api method.
Method responsible for get for an employee by id. So user should render this method if the user works the same company with employee. So I mean user CompanyId should be same with the Employee CompanyId.
Think about like this api method:
...ANSWER
Answered 2020-Mar-02 at 10:03You could customize a ActionFilter like below:
QUESTION
I'm trying to get started with aspect oriented programming. I'm using latest eclipse (currently 12-2019)
...ANSWER
Answered 2020-Jan-05 at 14:42Your problem caused by the removal of org.eclipse.core.runtime.compatibility
plugin from Eclipse 4.6 .
Read more about this problem here.
The correct solution is to:
Install AspectJ
from the correct download link.
The most updated to Eclipse 4.10 is: http://download.eclipse.org/tools/ajdt/410/dev/update
Another solution is to:
Uninstall Eclipse.
Install Eclipse 4.3 (matching your
AspectJ
version) .Retry AspectJ install.
The more complex solution is:
Locate and build/extract
org.eclipse.core.runtime.compatibility
jar file from Maven repository.Put
org.eclipse.core.runtime.compatibility
jar file into Eclipse plugins directory.Run
eclipse
in--clean
mode to rebuild and register the added plugin.Retry AspectJ install.
You might encounter more missing dependencies for org.eclipse.core.runtime.compatibility
, eventually will have to load all the related plugins (long effort).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install distributed-flexible-transaction
You can use distributed-flexible-transaction like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the distributed-flexible-transaction component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page