Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1vALlg7.
Allard Buijze introduces CQRS and related concepts along with case studies showing how it is used in finance, gaming and healthcare to meet the demands of modern web-based applications. Filmed at qconlondon.com.
Allard Buijze is software architect at Trifork Amsterdam, which delivers software development, consultancy and training services to both national and international organizations. As an architect, he is responsible for the technical choices in his projects and investigates technologies for their potential in the diversity of projects Trifork does.
What Are The Drone Anti-jamming Systems Technology?
Finance's Forgotten Treasure: an Introduction to CQRS & Axon
1. An introduction to CQRS and Axon Framework
Finance’s ‘forgotten’ treasure
Allard Buijze – allard.buijze@trifork.nl
2. Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/cqrs-axon
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
3. Presented at QCon London
www.qconlondon.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
4. Allard Buijze
! Software Architect at Trifork Amsterdam
! ~ 15 years of web development experience
! Strong believer in DDD and CQRS
! Developer and initiator of Axon Framework
! Java Framework for scalability and performance
! www.axonframework.org
19. CQRS Based Architecture
Command
model
ProjecYons
T:
1
mln
/
s
Resp:
<
10
ms
T:
Thr.
20
/
s
Resp:
<
100
ms
T:
10
mln
/
s
Resp.
<
100
ms
T:
1
/
s
Resp.
<
10
ms
25. Event Sourcing
! Pros
! Audit trail
! Reconstruct query model(s)
! Management reports since day 1
! Data analysis
! Cons
! Maintain history (upcasters)
! Ever-growing
26. Axon Framework
! “CQRS Framework” for Java
! Open source under Apache 2 License
! Simplify CQRS based applications
! Provides building blocks for CQRS applications
! Current version*: 2.1
! More information: www.AxonFramework.org
*
On
January
9th,
2014
28. Axon – Command Bus API
commandBus.dispatch(commandMessage,
new
VoidCallback()
{
@Override
public
void
onSuccess()
{
...
}
@Override
public
void
onFailure(Throwable
cause)
{
...
}
});
@CommandHandler
public
void
handle(CreateToDoItemCommand
command)
{
//
handle
command
}
29. Axon – Event Bus API
eventBus.publish(asEventMessage(new
ToDoItemCompletedEvent(“todo1”)));
@EventHandler
public
void
onEvent(ToDoItemCompletedEvent
event)
{
//
handle
event
}
30. CQRS Based Architecture
interface
AggregateRoot
abstract
class
AbstractAggregateRoot
interface
EventSourcedAggregateRoot
abstract
class
AbstractAnnotatedAggregateRoot
31. Axon – Event Sourcing
Apply
state
Make
decisions
32. Event Sourcing - Testing
! Given-when-then fixtures
! Given some past events
! When I apply a new Command
! Expect these new Events
fixture.given(new GameStartedEvent(…),
new CallMadeEvent(…),
new TurnChangedEvent(…))
.when(new MakeCallCommand(…))
.expectEvents(new CallMadeEvent(…),
new TurnChangedEvent(…));
40. Infrastructure components in Axon
! Single VM
! SimpleCommandBus
! SimpleEventBus
! High Performance
! DisruptorCommandBus
! ...
! Distributed
! DistributedCommandBus + JGroupsConnector
! ClusteringEventBus + AMQP Terminal
! ...
41. Axon Roadmap
! More distributed implementations
! Improved OSGi support
! DSL for definition of Command & Events
! IDE Plugins
! High performance Event Store
42. Axon Framework – Some cases
! Finance
! Process automation in a top 50 bank
! Trading engine for ETF (index trackers) trading
! Pension fund calculations at a large bank
! On-line payment processing
! Gaming
! On-line bridge platform (bridgebig.com)
! On-line casino (casumo.com)
! Healthcare
! Electronic Medical Record for the Geriatric Healthcare
! Tracking and Tracing of equipment for dental implants
! Aviation
! Optimizing aircraft movement at a large European airport