Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Migrating N-tier applications to µServices Lessons learned Roy Cornelissen Lead Consultant @ Xpirit

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Services as a network of independent parts

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

It depends

Slide 10

Slide 10 text

If you expect (or know) that your system is complex and/or has to scale in multiple dimensions

Slide 11

Slide 11 text

http://martinfowler.com/bliki/MicroservicePremium.html

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

User interface Views, ViewModels, DTO’s over HTTP Business layer ORM, business rules, mapping to DTO Database

Slide 14

Slide 14 text

Big Ol’ Database Integration Layer Service Layer Presentation Layer Silverlight Planning UI Integration Service WCF Application Logic Webservices

Slide 15

Slide 15 text

Layers

Slide 16

Slide 16 text

Remove a field here

Slide 17

Slide 17 text

Big Ol’ Database Integration Layer Service Layer Presentation Layer Silverlight Planning UI Integration Service WCF Application Logic Webservices horizontal Common Budget Payment Schedule

Slide 18

Slide 18 text

temporal response

Slide 19

Slide 19 text

temporal

Slide 20

Slide 20 text

Reliability Scalability Stability

Slide 21

Slide 21 text

RPC Throughput Load

Slide 22

Slide 22 text

Services keep their own state Events are used to notify changes Each service will have its own database Services use events to replicate data

Slide 23

Slide 23 text

Sales Billing Shipping SubmitOrder OrderAccepted OrderBilled OrderShipped

Slide 24

Slide 24 text

Messaging

Slide 25

Slide 25 text

applying async

Slide 26

Slide 26 text

RPC Throughput Load Messaging

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

get there?

Slide 29

Slide 29 text

step

Slide 30

Slide 30 text

Find module boundaries and define business events…

Slide 31

Slide 31 text

…and publish these events from existing code

Slide 32

Slide 32 text

Message Bus Big Ol’ Database Legacy logic Common Budget Payment Schedule Presentation Layer Budget UI Scheduling UI Organization UI Payment UI Budget Webservice Scheduling Webservice Organization Webservice Payment Webservice

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Develop new features, on top of these events

Slide 35

Slide 35 text

Message Bus Big Ol’ Database Legacy logic Common Budget Payment Schedule Presentation Layer Budget UI Scheduling UI Organization UI Payment UI Budget Webservice Scheduling Webservice Organization Webservice Payment Webservice Export

Slide 36

Slide 36 text

Think about UI composition

Slide 37

Slide 37 text

Message Bus Big Ol’ Database Legacy logic Common Budget Payment Schedule Presentation Layer Budget UI Scheduling UI Organization UI Payment UI Budget Webservice Scheduling Webservice Organization Webservice Payment Webservice Export Composite UI

Slide 38

Slide 38 text

Migrate existing logic to the background

Slide 39

Slide 39 text

Message Bus Big Ol’ Database Legacy logic Common Budget Payment Schedule Presentation Layer Budget UI Scheduling UI Organization UI Payment UI Budget Webservice Scheduling Webservice Organization Webservice Payment Webservice Export

Slide 40

Slide 40 text

Split up the database

Slide 41

Slide 41 text

Service endpoints Presentation Layer Budget Scheduling Payment Organization Budget UI Scheduling UI Organization UI Payment UI Budget Webservice Scheduling Webservice Organization Webservice Payment Webservice Message Bus

Slide 42

Slide 42 text

1. Define boundaries and publish events 2.Use these events to develop new features 3.Think about composite UI 4.Migrate existing logic to background 5.Split up the database

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

learned Microservices

Slide 45

Slide 45 text

Keep your transactions on a diet Design with parallelism in mind {Tx} {Tx} {Tx}

Slide 46

Slide 46 text

Prepare to make concessions at first Clean up later learned

Slide 47

Slide 47 text

Messaging makes totally different use cases possible Requires a new mindset for everyone learned

Slide 48

Slide 48 text

Take your time Prepare to take ~1 year for a transition learned

Slide 49

Slide 49 text

More moving parts means more complexity Evaluate whether you really need microservices learned

Slide 50

Slide 50 text

Get access to 2 full days of Udi Dahan's Advanced Distributed Systems Design video course. Sign up here: http://go.particular.net/DutchTechDays Access code: HIHIWE Expiration date: 15/6/2015

Slide 51

Slide 51 text

@roycornelissen roycornelissen.wordpress.com [email protected] bit.ly/XpiritMagazine

Slide 52

Slide 52 text

Your feedback is important! Scan the QR Code and let us know via the TechDays App. Laat ons weten wat u van de sessie vindt! Scan de QR Code via de TechDays App. Bent u al lid van de Microsoft Virtual Academy?! Op MVA kunt u altijd iets nieuws leren over de laatste technologie van Microsoft. Meld u vandaag aan op de MVA Stand. MVA biedt 7/24 gratis online training on-demand voor IT- Professionals en Ontwikkelaars.

Slide 53

Slide 53 text

No content