coolblue behind the scenes | pat hermens - on the shoulders of giants

40
ON THE SHOULDERS OF GIANTS. Evolving a legacy system using C# micro-services and RabbitMQ By Pat Hermens

Upload: coolblue

Post on 16-Apr-2017

393 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

ON THE SHOULDERS OF GIANTS.Evolving a legacy system using C# micro-services and RabbitMQ

By Pat Hermens

Page 2: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• Pat Hermens

• ~15 years of Microsoft development

• Started with VB6 & MS Access - I know, right?

• Snr. WebAPI Developer at Coolblue for ~1.5 years

ME.

Page 3: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

1. Our history

2. Our architecture

3. Our challenges

4. Our solutions (inc. RabbitMQ)

COMING UP.

Page 4: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

A (LITTLE) BIT OF HISTORY.Where has the time gone?

Page 5: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

15 YEARS AGO.

Coolblue built a back office system and called her Vanessa

Page 6: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

15 YEARS AGO.

Coolblue was getting started:

• 1 pick-up point: Pieter’s house!

• 1 online store: mp3man.nl

• ~1 order a day

Vanessa just getting started.

Page 7: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• Your text goes here.

15 YEARS AGO.

Page 8: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

FAST FORWARD.

Page 9: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

10 YEARS AGO.

Coolblue was getting established:

• 1 pick-up point

• 12 online stores

• 350 orders a day

Vanessa was being rapidly developed to handle the load

Page 10: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

10 YEARS AGO.

250 tables50 procedures/functions150 triggers

200 screens50 users

Page 11: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

FAST FORWARD.

Page 12: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

IN 2015.

Coolblue is definitely established:

• 7 physical stores

• 370+ online stores

• 12,000+ orders a day

… and we’re not done yet!

1300%

3000%

3500%

Page 13: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

IN 2015.

1,600+ tables 3,800+ procedures 7500%2,800+ triggers

1,150+ screens 1,250+ active users 2400%

Page 14: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• Your text goes here.

IN 2015.

Page 15: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA.She’s evolved.

Page 16: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.

Page 17: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.Vanessa DuPrix

Vanessa Fixmeister

Vanessa Moneypenny

Vanessa Purchandez

Vanessa Catalovitz

Vanessa Sellswell

Page 18: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.

Page 19: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.

Page 20: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.

Page 21: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA EVOLVED.

Page 22: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

CHALLENGES.We all have them!

Page 23: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

VANESSA.

Let’s face it, it’s an older system…

One clear goal:

Provide historical information.

Page 24: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

“NEW” VANESSA.

Nice and new! and undefined.

One clear goal:

Deliver information.

Page 25: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

Business Restrictions

• Agile

• Reliable

RESTRICTIONS.

Technical restrictions:

() => Testable;

() => Maintainable;

Page 26: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• .NET WPF / UW Applications.

• Continuous Delivery.

• Task-based Workflows.

• Event-based truthfulness.

NEW IDEAS.

Page 27: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

SOLUTIONS.Ta-daaa.

Page 28: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• Messaging Framework.

• Allows us to shout any type of message…

• ...for any reason.

RABBITMQ.

Let’s bring the information to us when it’s produced

rather than when we need to consume it.

Page 29: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

BACKGROUND JOBS.

2. Message goes on RabbitMQ queues.

3. Message is dequeued and processed by any/all interested consumers.

1. Process completion creates a message.

Long-running tasks need to signal when they are complete.

Page 30: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

DEMO.

Page 31: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

INTRA-SERVICE COMMUNICATION.

2. Messages go on RabbitMQ queues.

3. Messages are dequeued and processed by other services.

1. Meaningful events create messages.

Growing number of services need to talk to each other about “the truth”

Page 32: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

DEMO.

Page 33: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

ORACLE.

2. Messages go on RabbitMQ queues.

3. Messages are dequeued and processed by consumers.

1. Triggers in Oracle create messages.

Existing Vanessa processes need to share information with new systems

Page 34: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

DEMO.

Page 35: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

“What should I do?” vs. “What needs to be done?”

TASK-BASED WORKFLOW.

2. Incoming messages are presented as actionable tasks.

3. Tasks are processed by the (happy, event-driven) users.

1. Listeners pick up appropriate messages.

Page 36: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants
Page 37: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

LET’S WRAP THIS UP.Because you want beer just as much as I do.

Page 38: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• Your text goes here.

VANESSA, EVOLVED.

Page 39: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

• RESTful microservices, C# WebApi, background processing jobs?Let’s have a chat! [email protected]

• Message triggers, queues, routing keys & exchanges are your thing? Grab hold of Filipe. [email protected]

• Want to know more about how we’re getting things done? Have a chat with any of the Coolblue’ers hanging around tonight...

WANT TO KNOW MORE.

Page 40: Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants

QUESTIONS.