41
And what if microservices are just the beginning? Micro... frontends? Aleksander Orchowski October 23, 2019 Aleksander Orchowski And what if microservices are just the beginning? 1 / 24

And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

And what if microservices are just the beginning?Micro... frontends?

Aleksander Orchowski

October 23, 2019

Aleksander Orchowski And what if microservices are just the beginning? 1 / 24

Page 2: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Frontend that we know

Now we are going to talk about approaches used at today’ssystems.

I use the example of the blog app:

I Service which manage users, authentication etc.

I Service for articles (listing, creating, editing, etc.)

I Frontend is SPA/SPA like

Aleksander Orchowski And what if microservices are just the beginning? 2 / 24

Page 3: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Monolith

It’s important to understand something about structure ofapplication. So, we have one big block of code:

Aleksander Orchowski And what if microservices are just the beginning? 3 / 24

Page 4: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Everything at one place

I Probably - at one pullrequest we can add newfeature

I Deployed once with afrontend. We are sure thatboth layers work finetogether

I Vertical scalability

I Complex inside

I A lot of legacy code canexist

I High entry threshold

Aleksander Orchowski And what if microservices are just the beginning? 4 / 24

Page 5: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Everything at one place

I Probably - at one pullrequest we can add newfeature

I Deployed once with afrontend. We are sure thatboth layers work finetogether

I Vertical scalability

I Complex inside

I A lot of legacy code canexist

I High entry threshold

Aleksander Orchowski And what if microservices are just the beginning? 4 / 24

Page 6: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Microservices

Aleksander Orchowski And what if microservices are just the beginning? 5 / 24

Page 7: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 8: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 9: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 10: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 11: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 12: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 13: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Pros&Cons

+

I Working parallel

I Many smaller codebases

I This codebases are reallysmall

I Microservices are trendy now

I We can use a lot of cooltools

I We are skippingperformance and scalability

I Many codebases - additionalautomation costs

I Integration needed (+ moretesting etc.)

I Infrastructural costs

I Eventual consistency

I ...

I Just a lot of work more

Aleksander Orchowski And what if microservices are just the beginning? 6 / 24

Page 14: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 15: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 16: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 17: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 18: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 19: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 20: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Why do we want to decouple everything?

Or in other words what’s wrong with monolithic systems?

I We can’t understand a big amount of code

I So, we can’t easily add new features

I They are complex

I One codebase can be developed effectively by 100 people?

I Let’s skip performance and scalability

Always? It depends. The good architecture also relates tomonoliths.

Aleksander Orchowski And what if microservices are just the beginning? 7 / 24

Page 21: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

One of the biggest advantages of distributed systems is thatknowledge is also distributed through teams. They can focus on asingle part of business requirements.Also, It’s possible to easily replace each part.

Aleksander Orchowski And what if microservices are just the beginning? 8 / 24

Page 22: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

But, everything is loosely coupled...

Aleksander Orchowski And what if microservices are just the beginning? 9 / 24

Page 23: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Architectuure!Do microservices solve your problems? ARE YOU SURE?

Aleksander Orchowski And what if microservices are just the beginning? 10 / 24

Page 24: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Okay... 500 Microservices but...

Let’s connect everything on UI...

Aleksander Orchowski And what if microservices are just the beginning? 11 / 24

Page 25: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Okay... 500 Microservices but...

Let’s connect everything on UI...

Aleksander Orchowski And what if microservices are just the beginning? 11 / 24

Page 26: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Microfrontends

Aleksander Orchowski And what if microservices are just the beginning? 12 / 24

Page 27: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Webcomponents

Additional HTML tags defined in java script files, which can beshared between a lot of pages.

Aleksander Orchowski And what if microservices are just the beginning? 13 / 24

Page 28: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Comparison

Aleksander Orchowski And what if microservices are just the beginning? 14 / 24

Page 29: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Multi-framework

Aleksander Orchowski And what if microservices are just the beginning? 15 / 24

Page 30: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Multi-framework

Aleksander Orchowski And what if microservices are just the beginning? 15 / 24

Page 31: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

DEMO TIME

Aleksander Orchowski And what if microservices are just the beginning? 16 / 24

Page 32: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Components messaging

Aleksander Orchowski And what if microservices are just the beginning? 17 / 24

Page 33: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Component loading

Aleksander Orchowski And what if microservices are just the beginning? 18 / 24

Page 34: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

UI Consistency

Many teams, many components. How to manage this mess?

Figure: IBM - color anatomy

Aleksander Orchowski And what if microservices are just the beginning? 19 / 24

Page 35: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

UI Consistency

Many teams, many components. How to manage this mess?

Figure: IBM - color anatomy

Aleksander Orchowski And what if microservices are just the beginning? 19 / 24

Page 36: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

UI Consistency

Figure: Material UI - menu height

Aleksander Orchowski And what if microservices are just the beginning? 20 / 24

Page 37: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

For that - DevOps

Aleksander Orchowski And what if microservices are just the beginning? 21 / 24

Page 38: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Dev & Ops

DevOps culture is mandatory at the microservices environment,but is it sufficient with microfrontends?

Aleksander Orchowski And what if microservices are just the beginning? 22 / 24

Page 39: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Cross functional teams/Cross functional people

Aleksander Orchowski And what if microservices are just the beginning? 23 / 24

Page 40: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Cross functional teams/Cross functional people

Aleksander Orchowski And what if microservices are just the beginning? 23 / 24

Page 41: And what if microservices are just the beginning? - Micro ...zielona-gora-jug.github.io/files/mikrofrontendy.pdf · Pros&Cons + I Everything at one place I Probably - at one pull

Questions?

I My blog page: https://orchowskia.com

I Twitter: @orchowski

Aleksander Orchowski And what if microservices are just the beginning? 24 / 24