microservices - saveriogiallorenzo.com€¦ · - choreographies, session - types and process...

Post on 06-Oct-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Microservices scenarios of the near and far future

1

Saverio Giallorenzo

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Howdy

2

Saverio

Post-doc at the Department ofComputer Science andEngineering of University ofBologna.

Research topics:- Concurrent and distributed

programming;- Choreographies, Session- Types and Process Algebras.- Microservices;- Jolie;

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016 3

Saverio Giallorenzo

WARNINGMAY CONTAIN

CHOREOGRAPHIES

Microservices scenarios of near and far future

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Today’s Limits

4

There is no effort without error and

shortcoming.“Citizenship in a Republic”, Theodore Roosevelt, 1910

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Today’s Limits

4

There is no effort without error and

shortcoming.

innovation

“Citizenship in a Republic”, Theodore Roosevelt, 1910

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Distributed Programming5

Sales Storage Delivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Distributed Programming5

What’s here inside (e.g., error tracing)?

Sales Storage Delivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Distributed Programming5

What’s here inside (e.g., error tracing)?

Internal functionality?Does the deliverer provide it? Docs/APIs?

Sales Storage Delivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Distributed Programming5

What’s here inside (e.g., error tracing)?

Internal functionality?Does the deliverer provide it? Docs/APIs?

Sales Storage Delivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Distributed Programming5

What’s here inside (e.g., error tracing)?

Internal functionality?Does the deliverer provide it? Docs/APIs?

Sequential (in which order) or in parallel?

Sales Storage Delivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

Gulf of execution

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

Micro-management

Gulf of execution

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

Micro-management

Gulf of execution

Coordination?Accountability?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

Micro-management

Gulf of execution Gulf of

Evaluation

Coordination?Accountability?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

“Not my problem”6

Direction

Sales

StorageDelivery

Big Picture

Micro-management

Gulf of execution Gulf of

Evaluation

Coordination?Accountability?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Scalable Architectures7

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

GestioneOrdini

DeliveryManag.

Delivery Tracking

WebServer

WebServer

GestoreOrdiniOrder

Manag.

GestioneOrdiniOrder

Manag.

quote

tracking

?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Scalable Architectures7

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

GestioneOrdini

DeliveryManag.

Delivery Tracking

WebServer

WebServer

GestoreOrdiniOrder

Manag.

GestioneOrdiniOrder

Manag.

quote

tracking

?

=

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Scalable Architectures7

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

GestioneOrdini

DeliveryManag.

Delivery Tracking

WebServer

WebServer

GestoreOrdiniOrder

Manag.

GestioneOrdiniOrder

Manag.

quote

tracking

?

rebind the arrowsat each “scaling”=

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Scalable Architectures7

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

GestioneOrdini

DeliveryManag.

Delivery Tracking

WebServer

WebServer

GestoreOrdiniOrder

Manag.

GestioneOrdiniOrder

Manag.

quote

tracking

?

rebind the arrowsat each “scaling”=

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Scalable Architectures7

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

GestioneOrdini

DeliveryManag.

Delivery Tracking

WebServer

WebServer

GestoreOrdiniOrder

Manag.

GestioneOrdiniOrder

Manag.

quote

tracking

?

rebind the arrowsat each “scaling”=

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

A look at the future Choreographic Programming

8

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

Enter AIOCJ

9

Sales Storage Delivery

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects )

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision

10

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects )

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision

10

Client Sales DeliveryStorage

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects )

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision

10

Client Sales DeliveryStorage

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects )

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

11

Sales Storage Delivery

include checkAvail from “socket://storage:8000"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

11

Sales Storage Delivery

include checkAvail from “socket://storage:8000"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

What’s here inside

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

11

Sales Storage Delivery

include checkAvail from “socket://storage:8000"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

What’s here inside

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

11

Sales Storage Delivery

include checkAvail from “socket://storage:8000"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

What’s here inside

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

11

Sales Storage Delivery

include checkAvail from “socket://storage:8000"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

What’s here inside

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision

12

Sales Storage Delivery

WebServer

CRM

Order Manag.

HardwareManag.

OrderManag.

DeliveryManag.

Delivery Tracking

Client Sales DeliveryStorageClient

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision

12

Sales Storage Delivery

WebServer

CRM

Order Manag.

HardwareManag.

OrderManag.

DeliveryManag.

Delivery Tracking

Client Sales DeliveryStorage

Function checkAvail

Client

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

13

Sales Storage Delivery

include checkAvail from “socket://storage:8000”

include calcQuote from “socket://sales:8001"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

if ( avail )@Storage {

quote@Sales = calcQuote( order );

send_quote: Sales( quote ) -> Client( quote );

} else {

product_unavailable: Sales() -> Client()

}

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

13

Sales Storage Delivery

include checkAvail from “socket://storage:8000”

include calcQuote from “socket://sales:8001"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

if ( avail )@Storage {

quote@Sales = calcQuote( order );

send_quote: Sales( quote ) -> Client( quote );

} else {

product_unavailable: Sales() -> Client()

}

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Vendite Magazzino Spedizioni

requestquote

confirmavailability

optsendquote

productsunavailable

optapprovequote

refusequote

forward ordersend order

send tracking code

confirm reception

confirmdelivery

13

Sales Storage Delivery

include checkAvail from “socket://storage:8000”

include calcQuote from “socket://sales:8001"

order@Client = getInput( "Insert products" );

request_quote: Client( order ) -> Sales( order );

confirm_avail: Sales( order ) -> Storage( objects );

avail@Storage = checkAvail( objects )

if ( avail )@Storage {

quote@Sales = calcQuote( order );

send_quote: Sales( quote ) -> Client( quote );

} else {

product_unavailable: Sales() -> Client()

}

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix

14

Why not peer to peer choreography?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

14

Why not peer to peer choreography?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.

14

Why not peer to peer choreography?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

14

Why not peer to peer choreography?

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix (cont’d)

15

Why not peer to peer choreography?

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix (cont’d)

15

Why not peer to peer choreography? True if you leave the

choreographic domain. It is like writing C code and trying to change the program by changing the compiled assembly code.

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix (cont’d)

15

Why not peer to peer choreography? True if you leave the

choreographic domain. It is like writing C code and trying to change the program by changing the compiled assembly code.

On the contrary. Choreographies help to clarify public functions and their APIs (I/Os).

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix (cont’d)

15

Why not peer to peer choreography? True if you leave the

choreographic domain. It is like writing C code and trying to change the program by changing the compiled assembly code.

On the contrary. Choreographies help to clarify public functions and their APIs (I/Os). Choreographies written in AIOCJ are adaptable at runtime!

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Netflix (cont’d)

15

Why not peer to peer choreography? True if you leave the

choreographic domain. It is like writing C code and trying to change the program by changing the compiled assembly code.

On the contrary. Choreographies help to clarify public functions and their APIs (I/Os). Choreographies written in AIOCJ are adaptable at runtime!

We found it was harder to scale with growing business needs and complexities. Some of the issues associated with the approach are:

Process flows are “embedded” within the code of multiple application.Often, there is tight coupling and assumptions around input/output, SLAs etc, making it harder to adapt to changing needs.

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Architectural Vision (Part II)

16

Sales Storage Delivery

WebServer

CRM

Order Manag.

HardwareManag.

OrderManag.

DeliveryManag.

Delivery Tracking

Client Sales DeliveryStorageClient

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016 17

Sales Storage Delivery

WebServer

CRM

GestoreOrdini

HardwareManag.

OrderManag.

DeliveryManag.

Delivery Tracking

Client Sales DeliveryStorage

WebServerWeb

Server

GestoreOrdiniOrder

Manag.Load

Balancer

Circuit Breaker

WebGateway

Architectural Vision (Part III)

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Today’s Limits

18

There is no effort without error and

shortcoming.

innovation

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016 18

There is no effort without error and

shortcoming.

innovation

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016 18

There is no effort without error and

shortcoming.

innovation

Tomorrow’sStandards

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016 18

There is no effort without error and

shortcoming.

innovation

Tomorrow’sStandards

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Distributed programming becomes easier;

18

There is no effort without error and

shortcoming.

innovation

Tomorrow’sStandards

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Distributed programming becomes easier;

Accountability and formal APIs;

18

There is no effort without error and

shortcoming.

innovation

Tomorrow’sStandards

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Distributed programming becomes easier;

Accountability and formal APIs;

Scalable and reliable architectures.

18

There is no effort without error and

shortcoming.

innovation

Tomorrow’sStandards

saverio.giallorenzo@gmail.com | DISI at Unibo | Bologna | Meeting on Microservices 2016

Thanks for the attention

19

Questions: Saverio( ? ) -> MoM2016( ! )

top related