New Fast Command Handler Using ASM

I've created a new command handler that is faster than the standard AggregateAnnotationCommandHandler.
It uses ASM to dynamically generate invokers that using direct method invocation instead of reflection.
I've included a benchmark that compares the performance.
Note about the performance, replacing the standard UUID generator with FastUUIDIdentifierFactory yield much better performance.

The entire modules has been committed to my fork here
https://github.com/mingfang/AxonFramework/tree/master/asm

It currently does not support callbacks, and aggregate lookup with version.
My application doesn't need them so let me know if you do and I will add it.

Next I will apply the same technique to speedup event handling.

Hi Ming,

that looks very interesting! I have been looking at ASM for a while, but lacked the time to really dive into it.
This may be a good start to replacing the reflection with generated bytecode in Axon core. The main problem will be to make it robust enough to deal with all the different situations.

Cheers,

Allard

Hi Ming,

As an Axon committer I'd be happy to review this code and extend it to
support all features of Axon command handling.
I'll make a new branch in the Axon repository and put it in the
incubator section.

Cheers,
Frank

Nice.
For my app I’ll be working on getting this to work for event handling.

Let me know if there’s anything I can do to help.

I’ve updated the ASM Handler to be compatible with Axon 2.0
https://github.com/mingfang/AxonFramework/commit/d2b9c5b4b095b47e46db20bfc1ac943e863847fe

Hi Ming,

it’s been a while since we had a look at this. Unfortunately, the colleagure looking into this has left the company. He did dhow me what he had so far, but we didn’t get to integrate it in Axon yet. Mainly what he did was to add support for the ParameterResolver mechanism we included in Axon 2. If I am not mistaken, the current ASM implementation only supports the payload as sole parameter, right?

I’ll review your changes soon and try to incorporate it in the Axon incubator. Thanks anyway for your contribution.

Cheers,

Allard

The ASM implementation only supports payload as the sole parameter.
I’ll read up on the ParameterResolver mechanism and see if it’s doable.