LEGACY APPLICATION INTO HIGH SCALABLE ARCHITECTURE Morten Jokumsen - - PowerPoint PPT Presentation

legacy application into high
SMART_READER_LITE
LIVE PREVIEW

LEGACY APPLICATION INTO HIGH SCALABLE ARCHITECTURE Morten Jokumsen - - PowerPoint PPT Presentation

TRANSFORMING A RUNNING LEGACY APPLICATION INTO HIGH SCALABLE ARCHITECTURE Morten Jokumsen eBay classifieds eBay Inc. confidential Morten Jokumsen Software Architech Email: mjokumsen@ebay.com Skype: guidmaster Twitter:


slide-1
SLIDE 1

eBay Inc. confidential

TRANSFORMING A RUNNING LEGACY APPLICATION INTO HIGH SCALABLE ARCHITECTURE

Morten Jokumsen eBay classifieds

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

eBay Inc. confidential

Who and what is DBA?

  • Old classifieds news paper started in 1981
  • First website launched in 1995
  • Sold to eBay in 2008

– Price: 370 mill UDS

3

slide-4
SLIDE 4

eBay Inc. confidential

DBA 1996

4

slide-5
SLIDE 5

eBay Inc. confidential

DBA 1997

5

slide-6
SLIDE 6

eBay Inc. confidential

DBA 1999

6

slide-7
SLIDE 7

eBay Inc. confidential

DBA 2000

7

slide-8
SLIDE 8

eBay Inc. confidential

DBA 2002

8

slide-9
SLIDE 9

eBay Inc. confidential

DBA 2004

9

slide-10
SLIDE 10

eBay Inc. confidential

DBA 2005

10

slide-11
SLIDE 11

eBay Inc. confidential

DBA 2007

11

slide-12
SLIDE 12

eBay Inc. confidential

DBA 2008

12

slide-13
SLIDE 13

eBay Inc. confidential

DBA 2010

13

slide-14
SLIDE 14

eBay Inc. confidential

DBA 2012

14

slide-15
SLIDE 15

eBay Inc. confidential

Who is DBA

  • One of the largest websites in DK
  • Grows 20% each year
  • Mobile traffic goes crazy!

15

slide-16
SLIDE 16

eBay Inc. confidential

THE CHALLENGE

16

slide-17
SLIDE 17

eBay Inc. confidential

Get rid of this!

17

slide-18
SLIDE 18

eBay Inc. confidential

Project Mercury

18

slide-19
SLIDE 19

eBay Inc. confidential

Why Mercury?

19

Within the realm of astrology the planet Mercury is the ruler of the star sign Gemini. Gemini means twins. This is what we want to do here seen from a business perspective: create a twin of dba.dk running on a more efficient, productive and high-quality platform.

slide-20
SLIDE 20

eBay Inc. confidential

What we wanted

20

slide-21
SLIDE 21

eBay Inc. confidential

Initial guidelines

  • The architecture must be simple and uniform
  • Use the Domain Driven Design patterns to gain uniform code and design of the

architecture

  • Code should be high quality which means low bug count and high maintainability
  • Performance need to be part of the architecture from the start
  • The architecture is scalable, which made it's easy to scale horizontal by append more

servers to make higher throughput

  • To ensure high quality and clean code, we migrate the existing database in steps to a

new database

  • We migrate with a business scope one to one

21

slide-22
SLIDE 22

eBay Inc. confidential

The challenges

  • Move the architecture from 1999
  • Totally new team

– Understand the business

  • Move existing developers to .NET
  • Totally new technology stack

22

slide-23
SLIDE 23

eBay Inc. confidential

And how we did it the first time

23

slide-24
SLIDE 24

eBay Inc. confidential

Why did it suck?

24

slide-25
SLIDE 25

eBay Inc. confidential

AND WE DID THE SAME MISTAKE IN THE NEXT PHASE

25

slide-26
SLIDE 26

eBay Inc. confidential

The first write side

  • Fighting the O/RM
  • Anemic Domain Model

– Where did the logic go?

  • Did we do it wrong?

– Layered architecture failed?

26

slide-27
SLIDE 27

eBay Inc. confidential

LET´S SCALE

Evolve the code base

27

slide-28
SLIDE 28

eBay Inc. confidential

The problems

  • We could not scale
  • We could not implement new stuff fast enough
  • New developers had a hard time to understand the code base
  • We said we we did DDD – but we didn´t

28

slide-29
SLIDE 29

eBay Inc. confidential

CQRS TO THE RESCUE

29

slide-30
SLIDE 30

eBay Inc. confidential

Our implementation of CQRS

30

slide-31
SLIDE 31

eBay Inc. confidential 31

slide-32
SLIDE 32

eBay Inc. confidential 32

slide-33
SLIDE 33

eBay Inc. confidential

The advantage of CQRS

  • We can scale
  • We can implement new stuff fast!
  • We have a clean code base
  • New developers can easily follow the code base
  • We know where logic should go

33

slide-34
SLIDE 34

eBay Inc. confidential

The advantage of ES

  • We can change the implementation of the domain
  • We can scale
  • Replay the stream
  • We can debug and fix live bugs
  • We have better business insight

34

slide-35
SLIDE 35

eBay Inc. confidential

The new platform

35

ASP.NET MVC MS SQL Server jQuery DDD FAST Nagios Memcached LINQ2SQL ADO.NET Entity Framework Dapper Miniprofiler CQRS Event Store RabbitMQ

slide-36
SLIDE 36

eBay Inc. confidential

Where we ended

36

slide-37
SLIDE 37

eBay Inc. confidential

Q&A

37

slide-38
SLIDE 38

eBay Inc. confidential 38