Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Construire le SI de demain
REX Société Générale
La simplicité comme moyen d'être
performant, résilient
et de réduire le Ti...
Marie-Laure
Thuret
@mlthuret
Développeur
chez
Clément
Héliou
@c_heliou
Développeur
chez
Thierry
Abaléa
@ThierryAbalea
Tech...
Palladium
Commodity
Trading Company
Today
Hedging
Commodity
Trading Company
Commodity
Trading Company
Few Months Later
Hedging
Physical Delivery
Sales PersonCustomer Trader
Booking
Exchanges
Automatize
the processus
OrchestratorCustomer ExchangesPricer
Booking
Hedger
Trading Limit
Margin
The Constraints
Reliability / Resilience Performance
Productivity / Time To Market
Our Solution
Simplicity
Simple ≠ Easy
Choices are
business-oriented
Functional and
Code
Reduce the impedance between
Our Goal
Orchestration
Let’s take an example with
our main component
Event Sourcing
 «  Capture all changes to an
application state as a
sequence of events  »
Martin Fowler
Date Money Out Money In
2015/05/14 100
2015/05/14 -20
2015/05/16 -30
2015/05/24 380
2015/06/01 -70
Total -120 480
Balance ...
WithdrawalPerformed
accountId: 9387
amount: 30€
BankAccount
id: 9387
balance: 0€
WithdrawalPerformed
accountId: 9387
amoun...
J. Chassaing - http://thinkbeforecoding.com/post/2014/01/04/Event-Sourcing.-Draw-it
BankAccount
id: 9387
balance: 0€
WithdrawalPerforme
accountId: 9387
amount: 20€
DepositPerformed
accountId: 9387
amount: 1...
WithdrawalPerformed
accountId: 9387
amount: 30€
BankAccount
id: 9387
balance: 0€
WithdrawalPerformed
accountId: 9387
amoun...
Domain Driven Design
 « DDD is about designing
software based on models
of the underlying
(business) domain »
Martin Fowler
Ubiquitous
Language
RepositoryAggregate Root
Entity
Value Object
Durable business
model
Extensibility
Clean Architecture
Solid Responsibility Segregation
Using Event Sourcing
and DDD concepts in
Multiplus
Multiplus
Business
Logic
ReceiveQuote
{command}
QuoteReceived
{event}
QuoteForwarded
{event}
Customer
EventBus
QuoteForwar...
Transaction
{aggregate root}
Pricing
{entity}
Execution
{entity}
Orchestration
{entity}
ReceiveQuote
{command/value object...
What we’ve learned
Be awareof
Command Sourcing
Multiplus
Business
Logic
ReceiveQuote
{command}
quoteRequestId: 4563
price: 100€
QuoteForwarded
{event}
accountId: 4563
pr...
Multiplus
Business
Logic
ReceiveQuote
{command}
QuoteForwarded
{event}
Customer
EventBus
QuoteForwardedHandler
{handler}
{...
Multiplus
Business
Logic
ReceiveQuote
{command}
QuoteForwarded
{event}
Customer
EventBus
QuoteForwardedHandler
{handler}
C...
Store the events
produced by the
Decide function
Multiplus
Business
Logic
ReceiveQuote
{command}
quoteRequestId: 4563
price: 100€
QuoteForwarded
{event}
accountId: 4563
pr...
Multiplus
Business
Logic
ReceiveQuote
{command}
QuoteForwarded
{event}
Customer
EventBus
QuoteForwardedHandler
{handler}
Q...
It’s all in the past !
Date Money Out Money In
2015/05/14 100
2015/05/14 -20
2015/05/16 -30
2015/05/24 30
2015/06/01 -70
Total -120 130
Balance 10
Behavior Driven
Development
Conversation
Collaboration
Specifications By Examples
Three Amigos
Automation
Ubiquitous Langu...
deliver
theright
software
Your
documentation
will become
alive
you
will
new comers
thank
you
will
new comers
thank
… but you’ll enjoy it too !
warning
doing BDD right
easy
is not
BDD
Common Issues
Business and developper
faces collaboration difficulties
Mess with the
scenario writing
Automation Night...
BDD
Common Issues
Business and developper
faces collaboration difficulties
Mess with the
scenario
writing
Automation Night...
our
complex
application
are
often
we tend to let
everywhere
business rules
being dispatch
… making them
hard to test
Hexagonal
Architecture
the onion architecture
the clean architecture
ports and adapters
Advantages
Testability Flexibility
Business Centric
domain driven
app structure
that’s not
enough !
use different
granularity
business scenarios
when expressing your
levels
Given a quantity value of 1000 in G
When the quantity is converted in OZ
Then the converted quantity is 32.1507 OZ
Given a...
« l’enfer c’est les
autres »
Jean-Paul Sartre
at
any time
business validation
steroids
integration testing
on
care about
the contract
between your app and another
avoid
accidental
complexity
there’s always
implicit
a schema
even if it’s
Hexagonal
Architecture
DDD
Event Sourcing
BDD
State Machine
Hexagonal
Architecture
Java
DDD
Event Sourcing
BDD
State Machine
Hexagonal
Architecture
DaggerJava
DDD
Event Sourcing
BDD
State Machine
Hexagonal
Architecture
DaggerJava
Guava
DDD
Event Sourcing
BDD
State Machine
Our architecture
is easy to deploy !
Simple
Simple
No More Technologies Than Required
Simple
No More Technologies Than Required
Business Centric
Simple
No More Technologies Than Required
Business Centric
Code Understanding is Key
Simple
No More Technologies Than Required
Business Centric
CourageCode Understanding is Key
Any Questions ?
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing
Prochain SlideShare
Chargement dans…5
×

Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing

La simplicité comme moyen d'être performant, résilient et de réduire le Time To Market.

Il y a 1 an et demi, la Société Générale a décidé de construire un nouveau service de vente électronique de nos produits financiers. Les contraintes étaient claires : "le système sera performant, auditable, résilient et développé de manière à avoir un Time To Market court". Une seule solution s'imposait à nous : faire simple, très simple !
Ainsi à travers cette présentation, nous vous raconterons notre quête de simplicité. Vous verrez ainsi que notre stack technique ne contient quasiment aucun framework, juste quelques bibliothèques utiles ou indispensables. Notre code se structure autour de quelques principes : l'Event Sourcing, un peu de Domain Driven Design et une discipline de fer en matière de qualité et de tests automatisés (BDD for the win!).

  • Identifiez-vous pour voir les commentaires

Back Day - REX Société Générale - Explorer les principes de l'Event Sourcing

  1. 1. Construire le SI de demain REX Société Générale La simplicité comme moyen d'être performant, résilient et de réduire le Time To Market
  2. 2. Marie-Laure Thuret @mlthuret Développeur chez Clément Héliou @c_heliou Développeur chez Thierry Abaléa @ThierryAbalea Tech Lead à la Société Générale
  3. 3. Palladium
  4. 4. Commodity Trading Company
  5. 5. Today Hedging Commodity Trading Company
  6. 6. Commodity Trading Company Few Months Later Hedging Physical Delivery
  7. 7. Sales PersonCustomer Trader Booking Exchanges
  8. 8. Automatize the processus
  9. 9. OrchestratorCustomer ExchangesPricer Booking Hedger Trading Limit Margin
  10. 10. The Constraints Reliability / Resilience Performance Productivity / Time To Market
  11. 11. Our Solution Simplicity
  12. 12. Simple ≠ Easy
  13. 13. Choices are business-oriented
  14. 14. Functional and Code Reduce the impedance between Our Goal
  15. 15. Orchestration Let’s take an example with our main component
  16. 16. Event Sourcing
  17. 17.  «  Capture all changes to an application state as a sequence of events  » Martin Fowler
  18. 18. Date Money Out Money In 2015/05/14 100 2015/05/14 -20 2015/05/16 -30 2015/05/24 380 2015/06/01 -70 Total -120 480 Balance 360
  19. 19. WithdrawalPerformed accountId: 9387 amount: 30€ BankAccount id: 9387 balance: 0€ WithdrawalPerformed accountId: 9387 amount: 20€ DepositPerformed accountId: 9387 amount: 100€ BankAccount id: 9387 balance: 50€ BankAccount id: 9387 balance: 100€ BankAccount id: 9387 balance: 80€ Inspired by B. Reitzammer & J. Seitz - http://ookami86.github.io/event-sourcing-in-practice Apply to Apply to Apply to Produces Produces Produces
  20. 20. J. Chassaing - http://thinkbeforecoding.com/post/2014/01/04/Event-Sourcing.-Draw-it
  21. 21. BankAccount id: 9387 balance: 0€ WithdrawalPerforme accountId: 9387 amount: 20€ DepositPerformed accountId: 9387 amount: 100€ BankAccount id: 9387 balance: 100€ Bug Inspired by B. Reitzammer & J. Seitz - http://ookami86.github.io/event-sourcing-in-practice Apply to Apply to Produces Produces
  22. 22. WithdrawalPerformed accountId: 9387 amount: 30€ BankAccount id: 9387 balance: 0€ WithdrawalPerformed accountId: 9387 amount: 20€ DepositPerformed accountId: 9387 amount: 100€ BankAccount id: 9387 balance: 100€ BankAccount id: 9387 balance: 70€ Inspired by B. Reitzammer & J. Seitz - http://ookami86.github.io/event-sourcing-in-practice Apply to Apply to Produces Produces
  23. 23. Domain Driven Design
  24. 24.  « DDD is about designing software based on models of the underlying (business) domain » Martin Fowler
  25. 25. Ubiquitous Language RepositoryAggregate Root Entity Value Object
  26. 26. Durable business model Extensibility Clean Architecture Solid Responsibility Segregation
  27. 27. Using Event Sourcing and DDD concepts in Multiplus
  28. 28. Multiplus Business Logic ReceiveQuote {command} QuoteReceived {event} QuoteForwarded {event} Customer EventBus QuoteForwardedHandler {handler} Quote Requestin Quoting QuoteReceived {event} QuoteReceived {event} ForwardQuote {action}
  29. 29. Transaction {aggregate root} Pricing {entity} Execution {entity} Orchestration {entity} ReceiveQuote {command/value object} quoteRequestId: 4563 price: 100€ QuoteReceived {event/value object} accountId: 4563 price: 110€ - Multiplus Business Logic -
  30. 30. What we’ve learned
  31. 31. Be awareof Command Sourcing
  32. 32. Multiplus Business Logic ReceiveQuote {command} quoteRequestId: 4563 price: 100€ QuoteForwarded {event} accountId: 4563 price: 101€ Multiplus Business Logic ReceiveQuote {command} quoteRequestId: 4563 price: 100€ QuoteForwarded {event} accountId: 4563 price: 102€ 2015/06/01 Margin: 1% 2015/11/01 Margin: 2%
  33. 33. Multiplus Business Logic ReceiveQuote {command} QuoteForwarded {event} Customer EventBus QuoteForwardedHandler {handler} {Quote n° 65746} {Quote n° 65746} ?? QuoteReceived {event} ForwardQuote {action}
  34. 34. Multiplus Business Logic ReceiveQuote {command} QuoteForwarded {event} Customer EventBus QuoteForwardedHandler {handler} Customer gateway {Quote n° 65746} {Quote n° 65746} QuoteReceived {event} ForwardQuote {action}
  35. 35. Store the events produced by the Decide function
  36. 36. Multiplus Business Logic ReceiveQuote {command} quoteRequestId: 4563 price: 100€ QuoteForwarded {event} accountId: 4563 price: 101€ Multiplus Business Logic 2015/06/01 Margin: 1% 2015/11/01 Margin: 2% QuoteForwarded {event} accountId: 4563 price: 101€
  37. 37. Multiplus Business Logic ReceiveQuote {command} QuoteForwarded {event} Customer EventBus QuoteForwardedHandler {handler} QuoteReceived {event} ForwardQuote {action}
  38. 38. It’s all in the past !
  39. 39. Date Money Out Money In 2015/05/14 100 2015/05/14 -20 2015/05/16 -30 2015/05/24 30 2015/06/01 -70 Total -120 130 Balance 10
  40. 40. Behavior Driven Development Conversation Collaboration Specifications By Examples Three Amigos Automation Ubiquitous Language
  41. 41. deliver theright software
  42. 42. Your documentation will become alive
  43. 43. you will new comers thank
  44. 44. you will new comers thank … but you’ll enjoy it too !
  45. 45. warning
  46. 46. doing BDD right easy is not
  47. 47. BDD Common Issues Business and developper faces collaboration difficulties Mess with the scenario writing Automation Nightmare
  48. 48. BDD Common Issues Business and developper faces collaboration difficulties Mess with the scenario writing Automation Nightmare
  49. 49. our complex application are often
  50. 50. we tend to let everywhere business rules being dispatch
  51. 51. … making them hard to test
  52. 52. Hexagonal Architecture the onion architecture the clean architecture ports and adapters
  53. 53. Advantages Testability Flexibility Business Centric
  54. 54. domain driven app structure
  55. 55. that’s not enough !
  56. 56. use different granularity business scenarios when expressing your levels
  57. 57. Given a quantity value of 1000 in G When the quantity is converted in OZ Then the converted quantity is 32.1507 OZ Given a quote request with a way BUY And the credit check request has been sent When the credit check response is in error Then the pricer does not receive a quote request And the platform quote status is REJECTED Given an authorized product type When the customer sends the rfs Then the pricer receives the rfs When the pricer sends a quote Then the customer receives the quote Workflow Feature Unit
  58. 58. « l’enfer c’est les autres » Jean-Paul Sartre
  59. 59. at any time business validation
  60. 60. steroids integration testing on
  61. 61. care about the contract between your app and another
  62. 62. avoid accidental complexity
  63. 63. there’s always implicit a schema even if it’s
  64. 64. Hexagonal Architecture DDD Event Sourcing BDD State Machine
  65. 65. Hexagonal Architecture Java DDD Event Sourcing BDD State Machine
  66. 66. Hexagonal Architecture DaggerJava DDD Event Sourcing BDD State Machine
  67. 67. Hexagonal Architecture DaggerJava Guava DDD Event Sourcing BDD State Machine
  68. 68. Our architecture is easy to deploy !
  69. 69. Simple
  70. 70. Simple No More Technologies Than Required
  71. 71. Simple No More Technologies Than Required Business Centric
  72. 72. Simple No More Technologies Than Required Business Centric Code Understanding is Key
  73. 73. Simple No More Technologies Than Required Business Centric CourageCode Understanding is Key
  74. 74. Any Questions ?

×