CQRS AT DBA Morten Jokumsen eBay classifieds Morten Jokumsen - - PowerPoint PPT Presentation

cqrs at dba
SMART_READER_LITE
LIVE PREVIEW

CQRS AT DBA Morten Jokumsen eBay classifieds Morten Jokumsen - - PowerPoint PPT Presentation

CQRS AT DBA Morten Jokumsen eBay classifieds Morten Jokumsen Software Architect @ eBay Classifieds Email: mjokumsen@ebay.com Skype: guidmaster Twitter: guidmaster The company Part of eBay Classifieds Bilbasen DBA


slide-1
SLIDE 1

CQRS AT DBA

Morten Jokumsen eBay classifieds

slide-2
SLIDE 2
  • Morten Jokumsen
  • Software Architect @ eBay Classifieds
  • Email: mjokumsen@ebay.com
  • Skype: guidmaster
  • Twitter: guidmaster
slide-3
SLIDE 3

The company

  • Part of eBay Classifieds
  • Bilbasen
  • DBA
  • Bilinfo
  • All leaders in their respective markets
slide-4
SLIDE 4

What is DBA

  • Started as a printed paper
  • By fare the largest classifieds site in DK
slide-5
SLIDE 5

How DBA looked like before

  • An old legacy platform
slide-6
SLIDE 6

On big monolithic platform

slide-7
SLIDE 7

Where we what to be?

  • Domain Driven Development
  • Build scalable solutions
  • Be able to innovate our business
slide-8
SLIDE 8

What is CQRS?

“CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation: a command is any method that mutates state and a query is any method that returns a value).”

  • Greg Young
slide-9
SLIDE 9

… and when to use it

  • Scalability matters
  • Large team
  • Difficult business logic
slide-10
SLIDE 10

Why did we choose CQRS?

  • We need to scale our application
  • We need to integrate with other services
  • We have limited developer resources
  • We need to innovate
  • We wanted small manageable solutions
slide-11
SLIDE 11

How we started

slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15

The results

  • Initial benefits
  • Scaling developer productivity
  • Scaling our read-side
  • ….. and the first problems
slide-16
SLIDE 16

But we saw the potential

slide-17
SLIDE 17
slide-18
SLIDE 18

SYI

  • This is where we make revenue
  • This is where we can innovate
  • This is where our real business is
slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21

The good

  • Introducing Event Sourcing
  • Introducing Sagas or Process Managers
  • Async events
  • Debugging live problems
slide-22
SLIDE 22
slide-23
SLIDE 23

The bad

  • Introducing Event Sourcing
  • Async events
slide-24
SLIDE 24

Notes from a developer

  • The good
  • SRP
  • Addition instead of modification
  • The bad
  • Mental shift
  • Easy to fall back to just doing crud
slide-25
SLIDE 25

And the problems we faced

  • Upgrading events
  • Inconsistency between read-models and ES
  • Operations

– Date retention

slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28

Key points

  • CQRS is not complicated
  • Smaller is better
  • Take the principals and apply elsewhere
  • Remember the mental changes
slide-29
SLIDE 29

Backup

slide-30
SLIDE 30

Integration with Events

slide-31
SLIDE 31

Method Chaining