Why Domain-Driven Design and Reactive Programming?
Enterprise software development is hard.
A poorly designed enterprise software application can result in exorbitant costs and overall project failure. Traditional approaches have had difficulty with promoting good design practices, resulting in applications that don’t meet the needs of the business and are costly and difficult to change. Ultimately, this severely limits the value of these applications.
Domain-Driven Design (DDD) and Reactive Programming are design patterns that address these issues head on. Both approaches address application development complexity by breaking your big problems into smaller problems.
DDD puts the focus on the core business domain ensuring that the highest business value areas are addressed first. DDD operates on the premise that your business needs will change, and your applications need to change accordingly. Working closely together, your business domain experts and technical team can deliver apps that evolve with your business.
Reactive Programming promotes simplicity by focusing on only a few important concepts. It reduces the complexity of building a big application by viewing it as a collection of smaller applications that respond to events. The stream of events that occur as part of your business operations can instantly trigger responses from the application, making Reactive Programming real-time, interactive, and engaging.
In this webinar, we will answer five key questions:
What causes software projects to lack well-designed domains?
What is a good domain model and how does it help with reducing complexity?
What is the Reactive model and how does it help developers solve complex application and integration problems?
How can you use these techniques to reduce time-to-market and improve quality as you build software that is more flexible, more scalable, and more tightly aligned to business goals?
How can in-memory data grids like open source Apache Geode and GemFire (Pivotal’s product based on Apache Geode) fit with these modern concepts?
One Transaction Saves Aggregate and Event
Other Bounded Contexts react to Domain Events
How Can You Use These Techniques
To Reduce Time-to-Market and
Improve Quality as You Build
Software That is More Flexible, More
Scalable, and More Tightly Aligned to
Time-to-Market is Reduced Through Modeling with
Software Quality is Enhanced and Business Goals
Achieved Through the Bounded Context and
Software is More Scalable Through Smaller
Focused Bounded Contexts
How Can In-Memory Data Grids Like Open
Source Apache Geode and Pivotal GemFire
(Based on Apache Geode) Fit With These
Pivotal Data Engineering
Largest startup in history of Silicon Valley
Helping enterprises scale with
Process + OS Software + Data Engineering
Reactor & DDD - Demo
Stream – convert quotes to price bars
Automated Trading Strategy
Reactive Kafka – Why?
20,000 txns/ sec on a 4-core 2.8 GHz MAC
1,000,000 txn / sec on
a 4-core 2.8 GHz MAC
Auto-replay batches in
case of commit failure
GemFire – Why?
Business logic and
data are co-located
DDD + GemFire =
A natural complement!
Data must be
GemFire – Eventing Architecture
DB or other
Select * from /EventStore where type
= “Buy Order”
GemFire – Fast Calculations
Flight Scheduler Target Marketing
1. Windowing – Convert a stream of quotes into a 1-second price bar.
2. Analytics – Calculate the Volume-Weighted Average Price on each bar
3. Submit Buy Order for 25,000 shares
4. Algorithmically execute the order in 1,000-share “slices” until filled
Using DDD & Reactor technology with an In-memory Data Grid
Demo – Convert Prices to …
Price feed - emits price
quotes in a pseudo-random
wave pattern with a 5%
5-second price bars for AAPL
Creating price bars in a
Demo - Analytics
Volume-Weighted Average Price
Execute trade when VWAP < target price
Calculate VWAP Evaluate Trade
Σ (price * volume)
GemFire – Eventing Architecture
Select * from /EventStore
where type = “Buy Order”
Submit a “Buy”
Submit Order to
Will submit orders 1,000
shares at a time until the
entire order is filled
1. DDD and Reactor – Powerful best practices and practical for the
2. GemFire – A natural complement to DDD due to being an object IMDG,
built-in eventing. Can use with Reactor streaming for Fast Analytics.
3. Reactor Kafka - Enables extremely high throughput
Thanks to Vaughn Vernon for modifying the trading system to DDD style