Reuse-based & Choreography-based Distributed Systems - - PowerPoint PPT Presentation

reuse based choreography based distributed systems
SMART_READER_LITE
LIVE PREVIEW

Reuse-based & Choreography-based Distributed Systems - - PowerPoint PPT Presentation

Reuse-based & Choreography-based Distributed Systems Reuse-based Software Engineering Distributed Systems Mar Marco Autili BPMN2 Choreographies basics University of LAquila Invited Seminar Lecture 1 Course: Advanced


slide-1
SLIDE 1

Reuse-based & Choreography-based Distributed Systems

Invited Seminar Lecture № 1 Course: Advanced Service-oriented Software Engineering 08 May 2017 – University of L’Aquila (IT)

Mar Marco Autili

University of L’Aquila Reuse-based Software Engineering Distributed Systems BPMN2 Choreographies basics

slide-2
SLIDE 2

Where do we come from?

Automated Synthesis of Dynamic and Secured Choreographies for the Future Internet (H2020 project)

(FP7 project) (H2020 project)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 2

slide-3
SLIDE 3

CHOReVOLUTION

  • Title: Automated Synthesis of Dynamic and Secured

Choreographies for the Future Internet

  • Follow up FP7 EU project CHOReOS
  • Period: January 2015 - January 2018
  • Site: http://www.chorevolution.eu

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 3

slide-4
SLIDE 4

Outline

  • Reuse-based Service-oriented Distributed systems
  • Setting the context
  • Development scenario (high-level view)
  • BPMN2 Choreographies basics

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 4

slide-5
SLIDE 5

Outline

  • Re

Reuse use-ba based ed Ser ervice ce-or

  • riented D

Distribut uted s systems

  • Setting the context
  • Development scenario (high-level view)
  • BPMN2 Choreographies basics

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 5

slide-6
SLIDE 6

Distributed systems

  • Virtually all large computer-based systems are now

distributed systems

  • “… a collection of independent computers that appears to

the user as a single coherent system”

  • Information processing is distributed over several

computers rather than confined to a single machine

  • Distributed Software Engineering is therefore very

important for enterprise computing systems

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 6

slide-7
SLIDE 7

Distributed systems

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 7

slide-8
SLIDE 8

Distributed system characteristics

  • Resource sharing
  • Sharing of hardware and software resources
  • Openness
  • Use of equipment and software from different vendors
  • Concurrency
  • Concurrent processing to enhance performance
  • Scalability
  • Increased throughput by adding new resources
  • Fault tolerance
  • The ability to continue in operation after a fault has
  • ccurred

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 8

slide-9
SLIDE 9

Ideal Distributed System

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 9

slide-10
SLIDE 10

Distributed systems issues

  • Distributed systems are more complex than

systems that run on a single processor

  • Complexity arises because different parts of the

system are independently managed as is the network

  • There might be no single authority in charge of the

system so top-down control is impossible

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 10

slide-11
SLIDE 11

Ports and sockets

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 11

slide-12
SLIDE 12

RPC communication

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 12

slide-13
SLIDE 13

Message passing

  • Message-based interaction normally involves one component

creating a message that details the services required from another component

  • Through the system middleware, this is sent to the receiving

component

  • The receiver parses the message, carries out the computations

and (if needed) creates a response message for the sending component with the required results

  • In a message-based approach, it is not always necessary for the

sender and receiver of the message to be aware of each other. They simply communicate with the middleware

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 13

slide-14
SLIDE 14

Synchronous messaging

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 14

slide-15
SLIDE 15

The evolution of computing paradigms

  • Re

Req.mts Ch Chan ange

  • Dy

Dynami misms ms

  • Evo

Evolutio ion

Components Services

Abs Abstraction Mo Modul dularity for Re Reuse & RO ROI

Monolithic Functions/ procedures Objects

SO SOC

  • St

Static ic

  • Fr

Frozen

  • Fr

Frozen Re Req.mts

Towards Service-oriented Computing (SOC)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 15

slide-16
SLIDE 16

Software reuse

  • Software Engineering has been more focused on
  • riginal development but ...
  • it is now recognised that to achieve better software,

more quickly and at lower cost, we need a design process that is based on Sys ystem ematic S c Software R e Reu euse

  • Nowadays, in most engineering disciplines, systems are

designed by composing existing “software” that have already been used/experimented in other systems

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 16

slide-17
SLIDE 17

Software reuse

  • There has been a major switch to reuse-based development over the

past 10 years.

  • Indeed, over the past 20 years, many techniques have been developed to

support software reuse

  • The move to reuse-based development has been in response to

demands for

  • lower software production costs
  • lower maintenance cost
  • faster delivery of systems
  • increased software quality
  • More and more companies see their software as a valuable asset
  • Companies are promoting reuse to increase their return on software

investments

  • One of the more recent trends is that standards, such as Web

eb Ser ervice e st stan andar ards, have made it easier to develop general services and reuse them across a range of applications

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 17

slide-18
SLIDE 18

Reuse-based software engineering

Sof

  • ftware uni

units ts tha that t ca can be re reused ma may y be of f ra radica cally y diffe ffere rent sizes

System reuse

  • Complete systems, which may include several application programs may be reused.

Application reuse

  • An application may be reused either by incorporating it without change into other or by

developing application families.

Se Servic vice re reuse

  • Standards, such as Web Service standards, have made it easier to develop general services

and reuse them across a range of applications.

Component reuse

  • Components of an application from sub-systems to single objects may be reused.

Object and function reuse

  • Small-scale software components that implement a single well-defined object or function

may be reused. This form of reuse, based around standard libraries, has been common for the past 40 years.

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 18

slide-19
SLIDE 19

Implementing software reuse

Design patterns Architectural patterns Application frameworks Software product lines Application system integration ERP systems Systems of systems Configurable application systems Legacy system wrapping Component-based software engineering Model-driven engineering Service-oriented systems Aspect-oriented software engineering Program generators Program libraries

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 19

slide-20
SLIDE 20

The Encyclopedia of SOA FACTS

  • SOA is being used in the developing world to solve hunger. Entire populations will be fed on

future business value

  • SOA can write and compile itself
  • SOA is not complex. You are just dumb
  • SOA in a Nutshell is 7,351 pages spread over 10 volumes
  • One person successfully described SOA completely, and immediately died
  • Another person successfully described SOA completely, and was immediately outsourced
  • Larry Ellison once died in a terrible accident, but was quickly given SOA. He came back to life,

built a multibillion dollar software company, and now flies fighter jets

  • SOA is the only thing Chuck Norris can't kill

http://www.guj.com.br/t/soa-facts/6917

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 20

slide-21
SLIDE 21

Web services

  • A web service is an ins

instanc nce of a more re gene nera ral (hig highe her r le level) l) notion of a a service:

  • “An act or performance offered by one party to another.

Although the process may be tied to a physical product, the performance is essentially intangible and does not normally result in ownership of any of the factors of production”

  • The es

essen ence ce of a service, therefore, is that the provision

  • f the service is ind

independ ndent nt of the he applic icatio ion n using ing th the service

  • Service providers can develop specialized services and
  • ffer these to a range of service users from different
  • rganizations

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 21

slide-22
SLIDE 22

Reusable services

  • In its simplest acceptation (only provider)
  • a service is a reusable component that is independent (no required interface) and

is loosely coupled

  • In its more complex acceptation (prosumer),
  • a service can also have required interfaces, still being reusable, loosely coupled,

and still keeping independence (e.g., using late binding to “attach” required interfaces)

  • Services are platform and implementation-language independent
  • A web service is:
  • A lo

loosely ely coupled pled, reu eusable ble soft ftware e compo ponent nent that encapsulates discrete functionality, which may be geographically distributed and programmatically accessed

  • It is a service that is ac

accessed u using s stan andar ard I Internet an and X XML-ba based ed pr protocols ls

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 22

slide-23
SLIDE 23

Service-oriented software engineering

  • Building applications based on services allows

companies and other organizations to cooperate and make use of each other’s business functions

  • Service-based applications may be constructed by

linking/composing services from various providers using:

  • either a standard programming language (e.

e.g., , JA JAVA)

  • or a specialized workflow language (e.

e.g., , WS WS-BP BPEL)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 23

slide-24
SLIDE 24

Service-oriented architectures

  • A means of de

developing di dist stributed d sy syst stems s where the co compo ponen ents are e stand-alo alone serv rvices

  • Services may execute on different (geo

geogr graph phica cally y di dist stributed d ) computers from different service providers

  • Standard protocols have been developed to support

service communication (e.g., SOAP) and information exchange (e.g., WSDL)

  • Services are platform and implementation-language

independent

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 24

slide-25
SLIDE 25

Service-oriented Interaction Pattern

Service registry Service requestor Service provider Service Find Publish Bind (SOAP) (WSDL)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 25

slide-26
SLIDE 26

Service-oriented Interaction Pattern

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 26

slide-27
SLIDE 27

Benefits of SOA

  • Services can be provided locally or outsourced to

external providers

  • Services are language-independent
  • Investment in legacy systems can be preserved
  • Inter-organisational computing is facilitated through

simplified information exchange

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 27

slide-28
SLIDE 28

Key standards

  • XML Schema
  • A schema describes the structure of an XML document
  • SOAP
  • A message exchange standard that supports service communication
  • WSDL (Web Service Definition Language)
  • This standard allows a service interface and its bindings to be defined
  • WS-*
  • A variety of specifications associated with web services

(e.g., WS-Addressing, WS-Discovery, WS-Federation, WS-Policy, WS-Security, and WS-Trust)

  • WS-Policy

It is a specification that allows web services to use XML to advertise their policies (on security, quality of service, etc.) and for web service consumers to specify their policy requirements

  • WS-BPEL
  • A standard for workflow languages used to define service composition

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 28

slide-29
SLIDE 29

Key Web service standards

Transport (HTTP, HTTPS, SMTP, ...) Messaging (SOAP) Service definition (UDDI, WSDL) Process (WS-BPEL) Support (WS-Security, WS-Addressing, ...) XML technologies (XML, XSD, XSLT, ....)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 29

slide-30
SLIDE 30

The most important aspects of SOA

Se Servic ice Implementat atio ion an and d Se Servic ice Pr Provide ider Se Servic ice Contrac actual al De Description

HOW HOW WH WHAT

Do Do not worry y about ut HO HOW … … … only ly ex expec ect that it it wi will

ST STOP ST STOP ST STOP

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 30

slide-31
SLIDE 31

Outline

  • Reuse-based Service-oriented Distributed systems
  • Se

Setting ng th the conte text

  • Development scenario (high-level view)
  • BPMN2 Choreographies basics

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 31

slide-32
SLIDE 32

Application context (cont’d)

We are in the Future Internet (FI) era distributed computing environment large number of available software systems that can be composed to meet user needs

* * European Co

  • Commission. Digital Agenda for

Eu Europe pe - Fu Futu ture Inte nterne net t Research h and nd Ex Expe perimentation (FI FIRE) E) initiative, 20 2015

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 32

slide-33
SLIDE 33

dy dynamic evol

  • lution
  • n accor
  • rdi

ding to to... ... ... changing us user preferences ... ... changing en environmen ental al co contex ext ... ... new bu busin iness needs

Application context

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 33

slide-34
SLIDE 34

Gr Grow

  • wth of
  • f i

innov

  • vative a

and r revol

  • lution
  • nary e

everyday-li life sce cenarios within smart ci cities

Smart Mobility ecosystems

th the futu ture sm smart t mobili lity ty ecosy syste stem sc scenario

di different u users di different e environments di different s stakeholde ders fu fully connected fu fully connected

  • Dy

Dynamism

  • He

Heterogeneity

  • Ne

New value added services e. e.g., ro route e guidance, e, speed eed advi visory ry, pa parkin ing g avail ilabil bilit ity, , POI sugge ggestio ions

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 34

slide-35
SLIDE 35

Composition approaches

Or Orchest strat ation (central alized) Ch Chore

  • reog
  • grap

raphy (fully distri stribute ted)

Local centralized view from the perspective of

  • ne participant

Global decentralized view from a multi-participant perspective (albeit without a central controller)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 35

slide-36
SLIDE 36

Why choreographies?

  • Services will be increasingly active software entities
  • Communicating in a peer-to-peer style
  • Autonomously take decisions
  • Proactively engage in (business) tasks
  • Owned by different organizations
  • It is not possible (or desirable) to centralize responsibilities
  • Multi-participant specification perspective is more appropriate
  • Fully distributed deployment and execution of the

composition code

  • No single point of information flow
  • No single point of failure

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 36

slide-37
SLIDE 37

The need for automated support

Building applications by re reusing existing (third-party) services (often black-box) Composing services in a dis distrib ibuted d way ay

Support for auto automati ation is needed (time-to-market, correctness by construction, etc.) Ai Aiding ng software producers to re realize, de deploy, exec execute, and mo monitor choreography-based systems by re reusing existing services

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 37

slide-38
SLIDE 38

Desirable Development Support

  • Automated tool support for, e.g.,
  • making easier the creation of smart apps on top of existing

things/services/systems

  • “easily” dealing with distributed workflow management
  • taking care of service/data binding and protocol

adaptation

  • enforcing security policies
  • ... ...

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 38

slide-39
SLIDE 39

Outline

  • Reuse-based Service-oriented Distributed systems
  • Setting the context
  • De

Developm pment sc scenario (h (high-le level l vie view)

  • BPMN2 Choreographies basics

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 39

slide-40
SLIDE 40

Development scenario (cont’d)

Choreography modelers cooperate each

  • ther to set business goals, e.g.,
  • assisting travelers from arrival, to

staying, to departure

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 40

slide-41
SLIDE 41

Development scenario (cont’d)

Reserve Taxi Find POI Reserve Table Check Flight

… ... … ... … ... Identify tasks and participants required to achieve the goal, e.g.,

  • reserving a taxi from the local taxi

company,

  • purchasing digital tickets at the

train station,

  • performing transactions through

services based on near field communication in a shop

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 41

slide-42
SLIDE 42

Development scenario (cont’d)

Reserve Taxi Find POI Reserve Table Check Flight

… ... … ... … ... Specify how participants must collaborate as admissible workflows of the identified business tasks

Model

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 42

slide-43
SLIDE 43

Development scenario (cont’d)

Admissible workflows specified as:

  • BPMN2 Choreography

Diagrams

Mo Model

BPMN2 Specification - http://www.omg.org/spec/BPMN/2.0/

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 43

slide-44
SLIDE 44

inventory contains services/things published by providers, e.g.,

  • transportation companies
  • airport retailers

Development scenario (cont’d)

Mo Model In Inventory

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 44

slide-45
SLIDE 45
  • Out of the specified business goal, and
  • the set of services available in the

inventory ...

Running choreography

Synthesis Processor

CHOReOSynt

Choreography developer

Synthesis Processor automatically produces (if possible) a choreography- based application achieving the specified goal

Synthesis phase Modelling phase

CHOReVOLUTION Cloud Infrastructure Mo Model In Inventory

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 45

slide-46
SLIDE 46

Outline

  • Reuse-based Service-oriented Distributed systems
  • Setting the context
  • Development scenario (high-level view)
  • BP

BPMN2 Cho hore reogra raphie hies basic ics

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 46

slide-47
SLIDE 47

Business Process Model and Notation

  • BPMN Version 2.0.2

OMG MG’s Issue Repo porting g Proce cedure

  • All OMG specifications are subject to continuous

review and improvement

  • As part of this process we encourage readers to

report any ambiguities, inconsistencies, or inaccuracies they may find by completing the Issue Reporting Form listed on the main web page http:// www.omg.org, under Documents, Report a Bug/Issue (http://www.omg.org/report_issue.htm)

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 47

slide-48
SLIDE 48

Business Process Model and Notation

Proce cess

  • A Pr

Process describes a sequence or flow of Ac Activities in an organization with the objective of carrying out work

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 48

slide-49
SLIDE 49

Business Process Model and Notation

Co Collaboratio ion

  • a collection of Participants

shown as Po Pools,

  • whose interactions is defined in terms
  • f Me

Message Fl Flows

  • Collaborations MAY include

Pr Processes wi within the Po Pools

  • A Process, within a Pool, represents

the work of a specific Pa PartnerEntit ity (e.g., “Fe FedEx”), often substituted by a Pa PartnerRole (e.g., “Sh Shipper”) when a PartnerEntity is not identified and can be decided later

  • The PartnerEntity/PartnerRole is

called a Pa Partic icip ipant in BPMN

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 49

slide-50
SLIDE 50

Choreographies

  • A Ch

Choreography is a type of process, but differs in purpose and behavior from a standard BP BPMN Pr Process

  • A standard Pr

Process, or an Orchestration Pr Process is more familiar to most process modelers and de defines the flow of Activi vities of a sp specific Pa PartnerEntity/Pa PartnerRoles or

  • r or
  • rganiz

ization ion

  • In contrast, Ch

Choreography formalizes the way business Participants coordinate their interactions

  • The focus is not on orchestrations of the work performed within

these Participants, but rather on the exchange of information (Me Messages) between these Participants

  • Another way to look at Choreography is to view it as a ty

type pe of bus business contr trac act between two or more organizations.

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 50

slide-51
SLIDE 51
  • A Me

Message ge represents the content of a communication between two Participants

  • When used in a Choreogr

graph phy Diagr gram more than

  • ne Me

Message ge MAY be used for a single Choreogr graph phy Ta Task sk

  • In this case, it is important to know the first

(in init itiat iatin ing) Me Message of the interaction

  • For return (non

non-in init itiat iatin ing) Me Messages the symbol of the Me Message is shaded with a light fill

08/05/2017

Basic Choreography Concepts

Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 51

slide-52
SLIDE 52

Basic Choreography Concepts

  • An Interface

ce defines a set of operations that are implemented by a Service

  • An Ope

peration defines Messages that are consumed and, optionally, produced when the operation is called

  • It can also define zero or more errors that are returned

when operation fails

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 52

slide-53
SLIDE 53

Basic Choreography Concepts

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 53

slide-54
SLIDE 54

08/05/2017

Collaboration VS Choreography

Me Message fl flow

Co Collaboration Diagrams ms VS VS Ch Choreography Diagrams ms

Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 54

slide-55
SLIDE 55

Collaboration VS Choreography

Collabo boration

  • A collaboration MAY also include Ch

Choreographies be betw tween the Po Pools

08/05/2017

Me Message fl flow

Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 55

slide-56
SLIDE 56

Collaboration VS Choreography

  • Another example of a

Ch Choreography be betw tween the Pools of a Co Collaboration

  • and a Pr

Process wi withi hin a Pool

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 56

slide-57
SLIDE 57

A Collaboration and ...

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 57

slide-58
SLIDE 58

... the corresponding Choreography

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 58

slide-59
SLIDE 59

THANK YOU

08/05/2017 Marco Autili - Invited Seminar Lecture - Course: Advanced Service-oriented Software Engineering 59