MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011:...

31
MTAT.03.229 Enterprise System Integration Lecture 1: Introduction Luciano García-Bañuelos University of Tartu

Transcript of MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011:...

Page 1: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

MTAT.03.229Enterprise System Integration

Lecture 1: IntroductionLucianoGarcía-BañuelosUnivers i tyof Tartu

Page 2: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

CourseDescriptionThe course introduces modern approaches to enterprise system integration.Its objective is to survey principles and methods of software architecture in an enterprise environment.In addition to technical aspects, the course covers organizational aspects of enterprise system integration, including architecture governance and Business-IT alignment.

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 1

Page 3: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Scopeofthecourse:Thelongandwinding road…

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 2

Analysis&Design

Middleware&Infrastructure

SoftwareFrameworks

ArchitecturalStyles

WS

Capability-driven,data-driven,process-

drivendesign

Messageorientedmiddleware

JEE .NET

SpringRoo

REST

Page 4: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Scopeofthecourse

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 3

Analysis&Design

Middleware&Infrastructure

SoftwareFrameworks

ArchitecturalStyles

MOM Docker

Springboot

REST

Domain-drivendesign

Microservices

Designpatterns

Agilepractices

ServiceandAPIdesign

REST

Page 5: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Structure of the Course• 14 Lectures◦ 3 guest lecturers (practitioners)

• 14 Practicals• Project

◦ Presentations on 26 May◦ Report due on 26 May

• See details on the Wiki pages:◦ https://courses.cs.ut.ee/2017/esi

• Make sure you check the message board!

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 4

Page 6: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Grading• 10 Assignments: 20 points◦ 4-8 hours per homework ~ 70 hours

• Project: 20 points (~ 30 hours)◦ 10 points for the product◦ Soundness of design and architectural choices◦ Scope of the solution (how much was implemented?)◦ Degree of heterogeneity of the system◦ Functional correctness/validation (does it work?)

◦ 5 points for written documentation◦ 5 points for presentation

• Exam: 60 points

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 5

Inteamsof3-4

members

Page 7: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

People• LucianoGarcía-Bañuelos<luciano.garciaatut.ee>◦ Lectureson◦ ArchitecturalStyles&Middleware◦ Domain-DrivenDesign◦ ServiceDesign&Enterprise IntegrationPatterns◦ Containerization

•MarlonDumas<marlon.dumas atut.ee>◦ ServiceAnalysis&Design

• Orlenys López-Pintado &Mykhailo Dorokov◦ Labassistants

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 6

Page 8: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

PartIPROBLEMSTATEMENTAND

INTRODUCTORYSCENARIO

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 7

Page 9: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Theproblematglance• Users want to execute business

functions that span multiple applications

• Requires disparate applications to be connected to a common integration solution

• However:◦ No two applications are alike◦ Change is inevitable

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 8

Isolated Systems

Unified Access

Copyright © 2003 Gregor Hohpe

Page 10: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Whychangeisimportant?

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 9

InformationTechnology

Changeandinnovation

Yields

Yields

BusinessValue

Index Group (1982)

Enables

Page 11: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

EnterprisesystemscenarioInformation system of a small hotelThree functional areas:◦ Guest management: reservations, check-in (including room

assignment), charges to room (e.g., room service), check-out, closing of bill

◦ Keeping track of room availability, status – how many rooms still available for a given night, forecasting how many guests will stay beyond their reservation, forecasting occupancy of hotel at a future date

◦ Scheduling room cleaning & maintenance: managing maid & maintenance staff, cleaning rooms after late check-out

• Can you see dependencies across functional areas?

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 10Based on scenario by Richard Hull

Page 12: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

EnterprisesystemscenarioChange # 1: A restaurant is opened for hotel guests and external customers:

• External customer pays for meal directly• Hotel guest has option to pay for meal directly or

charge to room◦ In either case, hotel likes to keep a record of the guest eating in

the restaurant, if guest is willing to reveal his room number◦ Restaurant offers breakfast for guests

èRestaurant billing system has touch-points with hotel guest system

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 11

Page 13: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

EnterprisesystemscenarioChange # 2: A loyalty program is introduced:• Set up new system to keep track of customers who

are in loyalty program• Loyalty program has multiple touch-points with hotel

system and restaurant system, e.g.,◦ At reservation time, inquiring if customer is a member of loyalty

program, offering promotions, giving priority for room allocation to loyalty club members

◦ At check-in, inquire if customer is in loyalty program, if not offer sign-up, if yes offer better room

◦ Offer discounts at restaurant◦ Offer discounts on other services at check-out and record

length of stay and points earned

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 12

Page 14: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

EnterprisesystemscenarioChange # 3: Hotel is bought out by a franchise:• Reservations can be made either through the

franchise system or by calling the hotel◦ Room availability have to deal with this dual sourcing◦ Forecasting & pricing outsourced to franchise’s system

• Loyalty program merged into franchise’s program ◦ Hotel no longer operates the loyalty program, but must

interoperate with loyalty program system of franchise◦ Benefits of existing loyal customer must be honored◦ The franchise loyalty program gives points for all expenses

paid, whereas the original loyalty program looked only at nights stayed in hotel

• Room cleaning/maintenance still managed locally

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 13

Page 15: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

PartIIEVOLUTIONOFENTERPRISESOFTWARE

14

Page 16: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

TheAnatomyofanEnterpriseSystem

15

Enterprisesoftw

are Presentation

Applicationlogic

Dataaccess

Applicationlayers

• Usersinteractwiththesystemthroughapresentationlayer(akauserinterface orUI)

• Theapplicationlogic (akabusiness logic)determineswhatthesystemactuallydoes:◦ Enforcesbusinessrules◦ Coordinatesbusinessprocesses

• Thedataaccesslayer facilitatestheaccesstopersistentdatamanipulatedbytheapplicationlogic.◦ Includesaccesstodatabases,searchengines,documentmanagersand/orafilesystem.

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 17: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

TiersorLayers?• N-tierarchitecturesaimatsplittingtheapplicationincomponents intodifferenttiers/layers

• Tiersrefertophysicaldistribution ofcomponents◦ Componentscanbeexecutedoveracollectionofcomputers

• Layersrefertologicalseparationofcomponents◦ Layeredarchitecture:Communicationshouldonlyhappenwiththecontiguouslayers

◦ Promotesreuseandlogicindependence (componentsshouldbeseamlesslyreplaceable)

☛ Thenumberoftiersinthesystemsomehowreflectstheevolutionofsoftwarearchitecturesw.r.t. distribution

16INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 18: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Evolutionofcomputation60’s 70’s 80’s 90’s 00’s 10’

IBMmainframes

IBM, DECMini-comp.Unix,VAX

PC, DOSMac,MacOSWANs&LANs

WindowsInternetWeb &HTTP

Web2.0Mac OSXWindows XP

iOS, AndroidHTML5SaaS, PaaS,IaaS

Monolithicapplications

Batchprocessing

Dumbterminals

Time-sharing

Client-Server

RelationalDBMSs

CORBA&Browsers

CGI

Applicationservers

SOA&ROA

Cloudcomputing

MicroservicesNoSQL

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 17

Page 19: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

1-tierarchitecture• Alllayersarebundledinamonolithicentity

• Typical“mainframe”architecture◦ Usersaccessthesystemthroughdumbterminals

◦ Allcomputationhappens inasinglecomputer

18

Enterprisesoftw

are Presentation

Applicationlogic

Dataaccess Pros ConsNocontextswitching inthecontrolflow

Limitedscalabilityduetorestrictionsinthenumberofprocessors

Centralization easesresourcemanagement/sharing

Oftentimesthecodeisplatformspecific,limitingportability

Code highlyoptimisable Intertwined codehinderingmaintenance

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 20: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

2-tierarchitecture (1/2)• Withtheintroductionofcomputernetworks,computationstartedtobephysicallydistributed

• Applicationlayersaredistributeddependingonthecomputingpowerofclients:◦ Thinclientsexecuteonlypresentationlayer◦ Fatclientsexecutebothpresentationandapplicationlogiclayers

• TheconceptofAPImakesitsappearance

• Notableexample:Databasemanagementsystems◦ Theseparationofdataaccesslayerpromoteslogicalindependence, reducingtheimpactofreplacingadatabasetechnology onthepresentationapplicationlogiclayers

19

Presentation

Applicationlogic

DataaccessEnterprisesoftw

are

Client

Server

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 21: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

2-tierarchitecture (2/2)• WiththearrivalofPCs,thepresentationlayermovedtotheclient◦ Smartphones?

• Withthisapproach,itispossibletohavemultiplepresentationlayers◦ Text(console)application◦ Graphicaluserinterfaces(e.g.,Javaswing)◦ Webapplications(e.g.,HTML5,Javascript,etc.)

• Webastheuniversalplatformforcomputing?◦ Google’sChromiumOS

20

UI1

Applicationlogic

DataaccessEnterprisesoftw

are

Clients

Server

UI2 UIn

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 22: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

3-tierarchitecture:Themiddlewarearrives• Middlewareisalevelofindirectionbetweenclientsandotherlayers◦ Simplifiesthedesignofclientapplicationsbyreducingthenumberofinterfaces

◦ Encapsulatesintegrationlogicandglobalapplicationlogic

◦ Locatesresources,accessesthem,andintegratesresults(mediatesbetweenapplicationlogic/dataaccesslayers)

21

Presentation

Localapplicationlogic

Localdataaccess

ServerA

Localapplicationlogic

Localdataaccess

ServerB

MiddlewareorglobalapplicationlogicIntegrationlogic

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 23: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

N-tierarchitecture• N-tierarchitecturesresultfromconnectingseveral3- tiersystemsand/oraddingalayertoallowclientstoaccessthesystemthroughaWebserver (“Weblayer”)

• TheWeblayerishostedinaWebapplicationserver:amiddlewareaccessiblethroughtheWeb.

• Webapplicationservers aretakingalsopartsofthefunctionalityoftraditionalmiddleware– theboundarybetween theWeblayerandthemiddlewareisblurred.

22

client

Dataaccesslayer

Applicationlogiclayer middleware

Presentationlayer

Webserver

Webbrowser

HTMLfilter

© Gustavo Alonso, ETH Zurich INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 24: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

FlexibilityversusPerformance• Themoreboxes,themoremodularthesystem:moreopportunities fordistributionandparallelism;moreextensibilitypoints.

• Themoreboxes,themorearrows:moreconnectionsneedtobemaintained,morecoordinationisneeded.Complexityincreases.

• Themoreboxes,thegreaterthenumberofcontextswitchesandintermediatestepstogettothedata.Performancedegrades.

• Systemdesignerstrytobalancetheflexibilityofmodulardesignwithperformancedemands.

23

Thereisnoprobleminsystemdesignthatcannotbesolved

byaddingalevelofindirection.Thereisnoperformance

problemthatcannotbesolvedbyremovingalevelof

indirection.

© Gustavo Alonso, ETH Zurich INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 25: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Backtothe…future?

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 24

Productcatalog

Usermanager

Shoppingcart

Shipping

Payment

Applicationserver

Page 26: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

TheGILTexperience

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS 25

we sell every day at noon

Adrian Trenaman, VP Engineering, GiltMicroservices DublinMeetup,Feb2015

Page 27: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Onceuponatime…

26

2007 - ruby-on-rails monolith

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOSAdrian Trenaman, VP Engineering, GiltMicroservices DublinMeetup,Feb2015

Page 28: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

…breakingapartthemonolith

27

2011: java, scala, loosely-typed services

Hidden linkages; buried business logic

Monolithic Java App; huge bottleneck for innovation.

lots of duplicated code :(

teams focused on business lines

Large loosely-typed JSON/HTTP services

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOSAdrian Trenaman, VP Engineering, GiltMicroservices DublinMeetup,Feb2015

Page 29: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

…andthestorycontinues

28

2015: micro-services

INTRODUCTIONLUCIANOGARCÍA-BAÑUELOSAdrian Trenaman, VP Engineering, GiltMicroservices DublinMeetup,Feb2015

Page 30: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Microservices:Amatterofscale…

29JamesLewis&MartinFowler:Microserviceshttp://martinfowler.com/articles/microservices.html INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS

Page 31: MTAT.03.229 Enterprise System Integration Lecture 1 ...… breaking apart the monolith 27 2011: java, scala, loosely-typed services Hidden linkages; buried business logic Monolithic

Organizational implications

30

Anyorganizationthatdesignsasystem(definedbroadly)willproduceadesignwhosestructureisacopyoftheorganization'scommunicationstructure.

-- MelvynConway,1967

JamesLewis&MartinFowler:Microserviceshttp://martinfowler.com/articles/microservices.html INTRODUCTIONLUCIANOGARCÍA-BAÑUELOS