Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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?

Why Domain-Driven Design and Reactive Programming?

  1. 1. Why Domain-Driven Design and Reactive Programming? Vaughn Vernon – Distinguished Author and Consultant Wes Williams – Pivotal Software Designer & Architect
  2. 2. My Best Selling Books @VaughnVernon
  3. 3. What Causes Software Projects to Lack Well- Designed Domains?
  4. 4. Data-Only Focus When You Should Aim Higher to Capitalize on Your Unique Business Drivers
  5. 5. Business Concepts are Seen Only as Data-Centric Anemic Entities
  6. 6. Here’s How it Happens
  7. 7. Oh Yeah, and …
  8. 8. Well, There are Also …
  9. 9. Don’t Forget …
  10. 10. Wouldn’t That Be …
  11. 11. Don’t Limit
  12. 12. It’s Getting Muddy
  13. 13. Cavaet: Big Ball of Mud Your entities grow in number until no one understands the tangled web.
  14. 14. Team is Blinded by Data and Lack of Core Business Knowledge and Collaboration
  15. 15. What is a Good Domain Model and How Does it Help with Reducing Complexity?
  16. 16. Invest in Business Knowledge Developers Domain Experts
  17. 17. Business Value: Unify Mental Models Through a Team-Developed Domain Language ??????
  18. 18. Segregate the Language Into a Well-Defined Software Model
  19. 19. Strategic Design Tool: Bounded Context Strategic Design Tool: Bounded Context
  20. 20. Inside the Boundary the Concepts Have Well Defined Context
  21. 21. Outside The Boundary Other Concepts Will Not Adhere to The Context of our Model
  22. 22. Using These Principles We Can Challenge The Tangle and Identify Our Core Language
  23. 23. Actual Core
  24. 24. Multiple Bounded Contexts
  25. 25. What is Reactive Software and How Does it Help Developers Solve Complex Application and Integration Problems?
  26. 26. Must Integrate Multiple Bounded Contexts
  27. 27. Inside Bounded Contexts Are Aggregate Components
  28. 28. Aggregates Produce Facts: Domain Events
  29. 29. In App: Cross-Aggregates are Reactive new
  30. 30. One Transaction Saves Aggregate and Event Other Bounded Contexts react to Domain Events
  31. 31. 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?
  32. 32. Time-to-Market is Reduced Through Modeling with Business Knowledge
  33. 33. Software Quality is Enhanced and Business Goals Achieved Through the Bounded Context and Ubiquitous Language
  34. 34. Software is More Scalable Through Smaller Focused Bounded Contexts
  35. 35. How Can In-Memory Data Grids Like Open Source Apache Geode and Pivotal GemFire (Based on Apache Geode) Fit With These Modern Concepts?
  36. 36. Pivotal Software Wes Williams Pivotal Data Engineering Largest startup in history of Silicon Valley Helping enterprises scale with Process + OS Software + Data Engineering
  37. 37. Reactor & DDD - Demo High-speed Price Feed Pivotal GemFire Execution Management System Algorithmic Trading System DDD Style Stream – convert quotes to price bars Wall Street Automated Trading Strategy
  38. 38. Reactive Kafka – Why? High-speed streaming transactions Pivotal GemFire High-speed streaming transactions Pivotal GemFire 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 Asynch put micro-batches Auto-replay batches in case of commit failure
  39. 39. GemFire – Why? Region get(key) Aggregate In-memory object grid Business logic and data are co-located DDD + GemFire = A natural complement! Data must be serialized first from across network.
  40. 40. GemFire – Eventing Architecture Applicatio n Applicatio n DB or other Data Store Orders Update! Continuous Query Select * from /EventStore where type = “Buy Order” Cache Write Algorithmic Orders EventStore Listening for new orders Built-in Event-Driven Architecture
  41. 41. GemFire – Fast Calculations High-speed calculations Algorithmic Trading System Pivotal GemFire Flight Scheduler Target Marketing <Your company’s analytic here>
  42. 42. Demo Features 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
  43. 43. Demo – Convert Prices to … High-speed Price Feed Pivotal GemFire Price feed - emits price quotes in a pseudo-random wave pattern with a 5% range 5-second price bars for AAPL Creating price bars in a 1-second window open highclose low
  44. 44. Demo - Analytics Volume-Weighted Average Price Execute trade when VWAP < target price open close  Calculate VWAP  Evaluate Trade Σ (price * volume) ________________________________________________________ Σ (volume) VWAP =
  45. 45. GemFire – Eventing Architecture Applicatio n Applicatio n Orders Update! Continuous Query Select * from /EventStore where type = “Buy Order” Algo Orders EventStore Listening for new orders Submit a “Buy” request for 25,000 shares Submit Order to trade algorithmically Will submit orders 1,000 shares at a time until the entire order is filled
  46. 46. Demo
  47. 47. Demo Summary 1. DDD and Reactor – Powerful best practices and practical for the enterprise 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
  48. 48. Next Steps
  49. 49. My Best Selling Books @VaughnVernon
  50. 50.
  51. 51. Pivotal Resources • Pivotal GemFire • Features, Benefits, Use Cases: • Free Intro Online Course: gemfire • Today’s Demo: • Apache Geode • Site: • Geode Summit: • Upcoming Community Discussion with Vaughn Vernon: Weds, Sept 21, 9AM Pacific Meeting URL: