Download - Webinar - Whats new in Axon 3
![Page 1: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/1.jpg)
What’s new in Axon 3
Presented by:
Allard Buijze
CTO of Trifork Amsterdam, Founder of Axon Framework
![Page 2: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/2.jpg)
A brief history of time
A quick replay of Axon’s Event Store
![Page 3: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/3.jpg)
A quick replay of Axon’s Event Store
Applied DDD to a project
Model clearly helped reduce accidental complexity
However, ‘management reports’ polluted the model, increasing complexity
2009 2010 2011 2012 2013 2014 2015 2016
![Page 4: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/4.jpg)
A quick replay of Axon’s Event Store
Investigation of ‘Distributed Domain Driven Design’
Event Driven Architecture & Event Sourcing
2009 2010 2011 2012 2013 2014 2015 2016
![Page 5: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/5.jpg)
2009 2010 2011 2012 2013 2014 2015 2016
![Page 6: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/6.jpg)
A quick replay of Axon’s Event Store
3rd party notified that Axon 0.4 is used in production
November 2010 - two projects for Axon (0.6)
Bridge Big
GeriMedica Ysis
2009 2010 2011 2012 2013 2014 2015 2016
![Page 7: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/7.jpg)
A quick replay of Axon’s Event Store
Axon 1.0 released in April
Basic infrastructure components
Annotation based event sourcing
Event class hierarchy
Event Store stored event context in same blob as event data
No distinction between payload and metadata
2009 2010 2011 2012 2013 2014 2015 2016
![Page 8: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/8.jpg)
A quick replay of Axon’s Event Store
Axon 2.0 released in January.
Message API
Scalability components
Aggregate hierarchy
Difficult replays
Infrastructure complexity
2009 2010 2011 2012 2013 2014 2015 2016
![Page 9: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/9.jpg)
A quick replay of Axon’s Event Store
Axon 3 development / design started
better API’s
simplify infrastructure
more modeling freedom
easy replays
2009 2010 2011 2012 2013 2014 2015 2016
![Page 10: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/10.jpg)
A quick replay of Axon’s Event Store
You’re here!!
Axon 3 available for public testing: 3.0-M1
We need your feedback!
2009 2010 2011 2012 2013 2014 2015 2016
![Page 11: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/11.jpg)
Why Axon 3?
Community feedback & lessons learned
Changing application ecosystem
Monoliths vs Microservices
Lightweight vs Application Servers
Fast release cycles
Major API changes
![Page 12: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/12.jpg)
What’s new in 3.0?
![Page 13: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/13.jpg)
Java 8
What’s new in 3.0?
![Page 14: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/14.jpg)
Java 8
javax.time instead of JodaTime
Functional interfaces & lambda’s
Streams
![Page 15: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/15.jpg)
It’s all about messaging!
What’s new in 3.0?
![Page 16: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/16.jpg)
Messaging & Unit of Work
Unit of Work spans a single message
Removed distinction between Command & Event
Register lifecycle handlers using lambda’s
UoW attaches Correlation Data to all generated messages
Attaching UoW-specific resources
![Page 17: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/17.jpg)
Event Store = Event Bus + Event Sourcing
What’s new in 3.0?
![Page 18: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/18.jpg)
Event Sourcing in Axon 2.x
![Page 19: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/19.jpg)
Event Sourcing in Axon 3.x
![Page 20: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/20.jpg)
Event Store acts as an Event Bus
Removes the need for an Event Bus when using Event Sourcing
Better consistency guarantees
Consumers can tail the Event Store
![Page 21: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/21.jpg)
Event Processors
What’s new in 3.0?
![Page 22: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/22.jpg)
Event Processors
Replacement for (Event Handler) Cluster
Technical component for processing events
1st level citizen in API
Subscribing (push) or streaming (pull)
Streaming processors store token of last processed event
Replay is a matter of deleting that token
![Page 23: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/23.jpg)
Spring JavaConfig
What’s new in 3.0?
![Page 24: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/24.jpg)
Dropping Spring XML namespace support
Spring promotes JavaConfig
XML fear / disgust
JavaConfig allows for fluent config API
Now: API’s are JavaConfig friendlier
Soon: Spring Annotation autoconfiguration
![Page 25: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/25.jpg)
Dropping Spring XML namespace support
![Page 26: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/26.jpg)
Models don’t need to extend Axon classes
What’s new in 3.0?
![Page 27: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/27.jpg)
AggregateRoot in Axon 2.x
public class MyAggregateRoot extends AnnotatedAggregateRoot {
@AggregateIdentifier
private String id;
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
![Page 28: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/28.jpg)
AggregateRoot in Axon 3.x
import static ….AggregateLifeCycle.apply;
public class MyAggregateRoot {
@AggregateIdentifier
private String id;
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
![Page 29: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/29.jpg)
Easier to model multi-entity aggregates
What’s new in 3.0?
![Page 30: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/30.jpg)
Aggregate member in Axon 2.x
public class MyAggregateRoot extends AnnotatedAggregateRoot {
@CommandHandlingMember
@EventHandlingMember
private MyEntity entity;
}
public class MyEntity extends AnnotatedEntity {
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
![Page 31: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/31.jpg)
Aggregate member collection in Axon 2.x
public class MyAggregateRoot extends AnnotatedAggregateRoot {
@CommandHandlingMemberCollection(entityId=“…”, commandTargetProperty=“…”)
@EventHandlingMember
private List<MyEntity> entities;
}
public class MyEntity extends AnnotatedEntity {
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
![Page 32: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/32.jpg)
Aggregate member in Axon 3.x
public class MyAggregateRoot {
@AggregateMember
private MyEntity entity;
}
public class MyEntity {
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
![Page 33: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/33.jpg)
Aggregate member collection in Axon 3.x
public class MyAggregateRoot {
@AggregateMember
private List<MyEntity> entities;
}
public class MyEntity {
@EntityId
private String myEntityId;
@CommandHandler
public void handle(MyCommand command) {
apply(new MyEvent(…));
}
}
Note: Default setting assumes command contains “myEntityId” property
![Page 34: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/34.jpg)
Meta-annotations
What’s new in 3.0?
![Page 35: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/35.jpg)
Meta annotations
@Retention(Retention.RUNTIME)
@Target(…)
@CommandHandler
public @interface MyCommandHandler {
}
![Page 36: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/36.jpg)
Handler enhancers
What’s new in 3.0?
![Page 37: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/37.jpg)
Handler enhancers
…
@CommandHandler
public @interface SecuredCommandHandler { … }
public class SecuredCommandHandlerDefinition implements
HandlerEnhancerDefinition {
… wrapHandler(MessageHandler<T> original) { … }
}
![Page 38: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/38.jpg)
Monitoring & Metrics
What’s new in 3.0?
![Page 39: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/39.jpg)
Monitoring & Metrics
Axon components provide API to expose metrics
Processing times
Success/Failure rates
Capacity
Default implementation using DropWizard Metrics
![Page 40: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/40.jpg)
Upcaster API
What’s new in 3.0?
![Page 41: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/41.jpg)
Upcaster API
No longer limited to events
Upcaster gets more contextual information
Lazy vs eager – everything is lazy
Support for stateful upcasters
Reactive API
![Page 42: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/42.jpg)
There’s more coming…
More plans for the future
![Page 43: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/43.jpg)
Axon 3.x, moving on…
Annotation based message interceptors
Annotation based upcasters
Deadline API
Simpler conflict detection and resolution
Enhancement of DistributedCommandBus
Spring based auto-configuration
QueryBus
![Page 44: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/44.jpg)
But wait… there’s more
Even more plans for the future
![Page 45: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/45.jpg)
Axon Platform
Running Axon at scale
![Page 46: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/46.jpg)
Axon Platform
Single monitoring endpoint / dashboard for all nodes
Cluster-wide latency measurement
Message tracing
Processing analytics
Auto-configuration through master node
Message routing settings
Load balancing
High Performance Event Store
![Page 47: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/47.jpg)
Other activities
Other things to get you going…
![Page 48: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/48.jpg)
Other activities
Support
Consultancy & development
Developer Support
Architecture & code reviews
Modelling workshops
Implement custom components
Training
Amsterdam, July 18-19
On-site
![Page 49: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/49.jpg)
Acknowledgements
René de Waele
Steven van Beelen
Marijn van Zelst
Koen Lavooij
Joris van der Kallen
and over 40 other committers
Are you already one of them?
![Page 50: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/50.jpg)
Enjoy!
Thank you
![Page 51: Webinar - Whats new in Axon 3](https://reader034.vdocument.in/reader034/viewer/2022050614/587085371a28ab57368b774d/html5/thumbnails/51.jpg)
Questions & Answers
What’s new in Axon 3
Allard Buijze
CTO of Trifork Amsterdam, Founder of Axon Framework
T: +31 20 486 20 36
W: www.axonframework.org
@allardbz / @axonframework
This presentation has been recorded and you will receive the link shortly