reactive architecture (phpcon pl 2015)

31
Reactive Architecture Marek Sokół IT Architect

Upload: marek-sokol

Post on 16-Apr-2017

630 views

Category:

Technology


6 download

TRANSCRIPT

Reactive ArchitectureMarek Sokół

IT Architect

The demands and expectations for web applications have changed in recent years...

2Marek Sokół – Reactive Architecture

• React to events – Event-driven

3

• React to users – Responsive

• React to load – Scalable

• React to failure – Resilient

We need to build software that...

Marek Sokół – Reactive Architecture

But there is more...

4

robustnessflexibility

resilienceMarek Sokół – Reactive Architecture

5

So we have got an application

Marek Sokół – Reactive Architecture

Why the codebaseof your companyis all in one repository?

6Marek Sokół – Reactive Architecture

Numerousdevelopers work on the same repository at the same time...

7Marek Sokół – Reactive Architecture

Daily stand-up meeting is too long... and boring...

8Marek Sokół – Reactive Architecture

Why are there so many tablesin this database?

9Marek Sokół – Reactive Architecture

Database backupcannot be donewithin 24h...

10Marek Sokół – Reactive Architecture

...and what if the administratorhas never tested

a backup file?

11Marek Sokół – Reactive Architecture

The choice of architectureis more importantthan any framework

12Marek Sokół – Reactive Architecture

Monolith

113Marek Sokół – Reactive Architecture

SOA

14Marek Sokół – Reactive Architecture

15Marek Sokół – Reactive Architecture

Now we cancreate the code fasterand it’s easier to maintain

Developers can be dividedinto smaller teamsto build microservicesof our SOA system

16Marek Sokół – Reactive Architecture

Each microservicecan be implementedwith the most suitablemethods and technologies

17Marek Sokół – Reactive Architecture

Scaling microservicesinstead of the whole system is now possible

18Marek Sokół – Reactive Architecture

Reactive ManifestoPrinciples

19Marek Sokół – Reactive Architecture

• Drop synchronous HTTP requests

• Communicate services via asynchronous events

• RESTful messagesconsumers operate only on data in message

20Marek Sokół – Reactive Architecture

Event Driven

21Marek Sokół – Reactive Architecture

22Marek Sokół – Reactive Architecture

• Websockets

23

Responsive

Marek Sokół – Reactive Architecture

• Asynchronousand non-blocking requests

• Back-pressure

24

Scalable

Marek Sokół – Reactive Architecture

25

Resilient

• Avoid cascading failures• Isolate failures

Marek Sokół – Reactive Architecture

• Loose coupling• Replicate data

25Marek Sokół – Reactive Architecture

Robustness

27Marek Sokół – Reactive Architecture

28Marek Sokół – Reactive Architecture

Flexibility

Resilience

29Marek Sokół – Reactive Architecture

Thank you

Marek Sokół[email protected]