alberto lagna soa that works

35
SOA that works By Alberto Lagna CTO Biznology srl

Upload: alberto-lagna

Post on 14-Jun-2015

172 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Alberto lagna   soa that works

SOA that worksBy Alberto LagnaCTO Biznology srl

Page 2: Alberto lagna   soa that works

2

>apropos alberto.lagna• Computer Science graduate, Telco master• CTO of Biznology• Working as software architect / team leader• Consulting on design and development of enterprise systems

mainly based on JavaEE and mobile• UML, XML, BPM expert• 18 years of working experience in Europe and USA• JUGTorino member• Promoting the use of free software and supporting the open

source movement

Page 3: Alberto lagna   soa that works

3

>apropos biznology.it• Consulting Company• Defined a SOA at 360° approach:

– Methodology and tools– Reference Architecture– Communication– Integration and Program Management– Economical Goal and Result Measurement– Organization Model and Training Plans

• Because Applying the SOA approach is not ONLY using the right technology

Methodology and tools

Reference Architecture

Communica-tion

Integration and Program Man-

agement

Economical Goal and Result measurements

Organization Model and

Training Plans

Page 4: Alberto lagna   soa that works

4

Agenda• Complex integration system developed

– Electronic Health Folder– Regional Administration Accounting System

• System requirements• Pattern applied:

– Data dictionary– Service Interface Design– Materialisation / Dematerialisation– Business Object Views– Divide et Impera between services– Versioning– Logging and Monitoring

Page 5: Alberto lagna   soa that works

5

Warning

UML - ACTIVE

Page 6: Alberto lagna   soa that works

6

Complex Integration Systems (1)

Electronic Health FolderASO

OSP 1

ASOOSP 1

ASOOSP 1

Page 7: Alberto lagna   soa that works

7

Complex Integration Systems (2)

Regional Administration Accounting System

Page 8: Alberto lagna   soa that works

8

System Requirements (1)

• Integrate many (existing) systems– Consume eterogeneous interfaces

• Exposed even by legacy C, C++, VB, systems– Expose long lasting interfaces

• They cannot change too often: consumed by systems developed in different projects, by different vendors

Page 9: Alberto lagna   soa that works

9

System Requirements (2a)

• Integrate the Service Oriented world (mainly wso2) with the BPMS world (not wso2)– BPMN processes call Service interfaces– Provide a way to decouple the lifecycle of the BPMN

processes with the service business entities

Page 10: Alberto lagna   soa that works

10

System Requirements (2b)

Page 11: Alberto lagna   soa that works

11

System Requirements (3)

• Services could exchange Business Object that can be part of a big forest in a selective way– I don’t want to transport the whole Amazonian if I need

just to transport a small tree

Page 12: Alberto lagna   soa that works

12

System Requirements (4)

• Big Bang strategy must be avoided, therefore we need to define:– a way to develop, test and deploy the system in small

parts– a roadmap to program when to roll out every part

Page 13: Alberto lagna   soa that works

13

System Requirements (5a)

• What if something goes wrong?– Need a way to understand

• Why a component XYZ did a certain call to a service (that went in error for example)

• What were the calls that brought to the error

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams; at org.apache.axis2.transport.http.AbstractHTTPSender.initializeTimeouts(AbstractHTTPSender.java:454) at org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:514) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:156)

Page 14: Alberto lagna   soa that works

14

System Requirements (5b)

Page 15: Alberto lagna   soa that works

15

System Architecture

• Regional Administration Accounting System BIL module

siac

Page 16: Alberto lagna   soa that works

16

Patterns Applied

• To fulfill all the given requirements, the following patterns were applied:

– Business Objects level• Data Dictionary• Service Interface Design• Materialisation / Dematerialisation• Business Object Views

– Service Level• Divide et Impera between Services• Versioning• Logging and Monitoring

Page 17: Alberto lagna   soa that works

17

Pattern 1: Data Dictionary (1)

• To integrate with differents systems, technologies• Divided the whole system into

– Functional areas– Integration areas

• Every area is responsible of a– Subset of Business Objects– Subset of (homogeneous) services

• Business Objects – are the ONLY objects used within the system– They become the Lingua Franca of the system– Need MAXIMUM care to be designed

Page 18: Alberto lagna   soa that works

18

Pattern 1: Data Dictionary (2)

BIL - Bilancio di previsione e pluriennale

FIN – Contabilità finanziaria

FIS – Adempimenti Fiscali

GEN - Contabilità Generale

ATT - Atti Amministrativi

APJ - Approvvigionamenti

SCD - Contabilità DivisionalePER Gestione Personale

GSA SocioAssistenziale

FPR Formazione Professionale

ALI Atti Liquidazione

IVA Contabilità IVA

SIAC

Page 19: Alberto lagna   soa that works

19

Pattern 2: Service Interface Design• The service messages are containers of Business Objects• The integration services do translation to/from the Business

Objects

Page 20: Alberto lagna   soa that works

20

Pattern 3: Materialisation / Dematerialisation (1)• To decouple The BPMN Process lifecycles with the Business

Objects lifecicles• The Proxy before the Processes Dematerialise the objects• The Proxy after the Processes Materialise the objects

siac

Page 21: Alberto lagna   soa that works

21

• The BPMN Processes use Dematerialised Entities

Pattern 3: Materialisation / Dematerialisation (2)

EntitaDem (instead of VariazioneCapitolo) with the following attributes:• uuid = 1234• nome = acme• className = “it.csi.siac.siacbilser.interfacews.dd.VariazioneCapitolo”• attributes ={

• {“tipo”, DIFFICULT}}

Page 22: Alberto lagna   soa that works

22

• The BPMN Processes use Dematerialised Entities

Pattern 3: Materialisation / Dematerialisation (3)

Page 23: Alberto lagna   soa that works

23

Pattern 4: Business Object Views (1)

• Not to always move the whole Amazonian Forest if only a tree is needed

• Data Services also accept the View parameter that tells which part of the forest to carry.

Page 24: Alberto lagna   soa that works

24

Pattern 4: Business Object Views (2)

Page 25: Alberto lagna   soa that works

25

Pattern 4: Business Object Views (3)

• The view object:– name: VariazioneCapitolo4BPM– className: VariazioneCapitolo– attributiVisibili:

• descrizione• competenza• provvediamento,

Provvedimento4BPM

Page 26: Alberto lagna   soa that works

27

Pattern 5: Divide et Impera (1)

• To be able to Manage (=Imperare) the whole systemevery Area provides his Data Dictionary library with – The service interfaces– The service clients– A fake service implementation

• Divide– Every service can be tested stand alone,

with the fake services of the other areas that it needs– Some real services can be added and a limited

integration test can be run

Page 27: Alberto lagna   soa that works

28

Pattern 5: Divide et Impera (2)

BIL - Bilancio di previsione e pluriennale

FIN – Contabilità finanziaria

FIS – Adempimenti Fiscali

GEN - Contabilità Generale

ATT - Atti Amministrativi

APJ - Approvvigionamenti

SCD - Contabilità DivisionalePER Gestione Personale

GSA SocioAssistenziale

FPR Formazione Professionale

ALI Atti Liquidazione

IVA Contabilità IVA

SIAC

Page 28: Alberto lagna   soa that works

29

Pattern 6: Versioning (1)

• Service Versioning options:– use an (optional) attribute at the xs:schema element– denoting the schema version in XML namespaces– keep XML namespace values constant and add a special

element for grouping custom extensions@see B. Lublinsky, Versioning in SOAhttp://msdn.microsoft.com/en-us/library/bb491124.aspx

• We choose the namespace level • The Data Dictionary (jar)

– Is of a specific Area of a specific Version – Contains Service Interfaces and Clients

Page 29: Alberto lagna   soa that works

30

Pattern 6: Versioning (2)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><definitions targetNamespace="http://siac.it/fin/svc/1.0" name="ImpegnoService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://siac.it/fin/svc/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <xsd:schema> <xsd:import namespace="http://siac.csi.it/fin/svc/1.0" schemaLocation="ImpegnoService-1.0.xsd"/> </xsd:schema> <xsd:schema> <xsd:import namespace="http://siac.it/fin/data/1.0" schemaLocation=fin-1.0.xsd"/> </xsd:schema> <xsd:schema> <xsd:import namespace="http://siac.it/cor/data/1.0" schemaLocation=”cor-1.0.xsd"/> </xsd:schema> </types>

Page 30: Alberto lagna   soa that works

31

Pattern 7: Logging and Monitoring (1)• Every request and response contains at least

– User, with his profile– Operation Token (TokenOperazione class below)

• No SOAP Fault

Page 31: Alberto lagna   soa that works

32

Pattern 7: Logging and Monitoring (2)

• How does the Operation Token work?

siac

Page 32: Alberto lagna   soa that works

33

Pattern 7: Logging and Monitoring (3)• Using a log aggregator the logs can be easily read and

composed

Page 33: Alberto lagna   soa that works

34

The patterns are related together

• Business Objects level– Data Dictionary– Service Interface Design– Materialisation / Dematerialisation– Business Object Views

• Service Level– Divide et Impera between Services– Versioning– Logging and Monitoring

Page 34: Alberto lagna   soa that works

35

Good book to read

• Applied SOA, Mike Rosenhttp://www.amazon.com/Applied-SOA-Service-Oriented-Architecture-Strategies/dp/0470223650

• BPMN Method & Style, Bruce Silverwww.bpmessentials.com

Page 35: Alberto lagna   soa that works

Thank [email protected]