Enterprise Application Integration - System Integration Methods

Embed Size (px)

Citation preview

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    1/27

    Enterprise ApplicationIntegration

    Paulo MarquesInformatics Engineering DepartmentUniversity of Coimbra

    [email protected]

    v/2009

    Systems IntegrationMethodologies

    mailto:[email protected]:[email protected]
  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    2/27

    2

    Whats this about?

    Network

    Presentation

    Web Server

    Business LogicApp Server

    Data Tier

    Database Server

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    3/27

    3

    Motivating Example

    Warehouse

    (Amazon)

    1

    3

    2

    4

    5

    6

    7

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    4/27

    4

    How the Software Engineering world should look like

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    5/27

    5

    The ugly reality

    Spaghetti Code

    Just-in-time Ad Hoc Construction

    http://boone.calstatela.edu/spring476/prasarangkul.htm
  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    6/27

    6

    Ball-of-Mud Enterprise Application Integration

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    7/277

    Why Structured Enterprise Application Integration?

    Information systems are getting more and more complex!

    InterconnectedNowadays systems are not isolated: networks play a vital role! Also, newcommunication channels complicate issues (e.g. WAP, SMS, iPhone)

    Constantly EvolvingTodays systems are stressed beyond their limits. People want more andmore functionality of the infrastructure in place. Thus, the size of systemscontinues to increase. Centralized monolithic solutions are no longer viable:cooperation among systems is paramount. Nevertheless, heterogeneitycomplicates things (e.g. J2EE, .NET, SAP)

    Adhoc IS NOT AN OPTION- 70 to 90% of the software costs are maintenance- 40% of the code is within the databases- 1.000.000 lines of code is now low medium scale- How to create systems so that they can be easily integrated?

    - How to create software that is reusable? And at what granularity?

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    8/278

    Enterprise Application Integration in Context

    Databases

    Networks Software Engineering

    Programming Languages

    Enterprise Application Integration

    Service Oriented Architecture

    Enterprise Service Bus

    How to buildApplications

    How to integrate applications

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    9/279

    Issues that need to be addressed

    Any means used for Enterprise Application Integration must address,at least, the following issues:

    How is Data Represented Each application has its own data modeland information schema. There may be shared concepts betweenapplications but, typically, they are represented in different ways. Itsessential to have ways ofmapping and transforming data.

    Localization of Services Each application was developed as a

    software silo. Thus, it can unexpectedly change localization. Itsessential to have ways oflocalizing and remotely accessing applicationsthat are executing autonomously.

    Time and Synchronicity The RPC model is synchronous. This meansthat both parties have to be present when a call is made. Such constraintis not viable when communicating among autonomous independent

    systems. Typically, its necessary to use an asynchronous and robustcommunication model between systems.

    Fault Tolerance Networks are inherently fallible. Simplisticapproaches like re-trying operations do not work. Its necessary to haverobust mechanisms for tolerating faults and, in many cases, distributed

    transactions (ACID or not).

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    10/27

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    11/2711

    SOA in a nutshell

    SystemA

    Service

    Interface

    SystemB

    Service

    Interface

    SystemC

    Service

    Interface

    SystemD

    Service

    Interface

    EnterpriseService Bus

    ProcessOrchestrator

    ServiceDirectory

    A Service Oriented

    Architecture

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    12/2712

    Process Orchestrator?

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    13/2713

    Why use a SOA?

    Future, Scalability and Evolution!

    An organization is made up of many different systems.Sooner or later they will have to talk to each other.(typically, sooner than latter!)

    If systems are not thought from the beginning for integration, the

    solutions found for doing so will be ad-hoc, without possibilityof evolution, and with high development and maintenancecosts

    Using a Service Bus and a Service Oriented Architecture allows for

    future evolution, both by easily adding new services and, ifnecessary, replacing existing service implementations

    A SOA allows to do so with minimal disruption of the businessprocesses of an organization.

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    14/2714

    IMPORTANT CONCEPT: Evolving Systems!

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    15/2715

    Progressive Deployment

    EnterpriseService Bus

    Phase 1 Phase 2 Phase 3

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    16/2716

    The importance of Open Standards

    Its absolutely important that a SOA is based on Open

    Standards It allows the architecture to stay in place on the long-run

    Allows external services to be easily integrated into theorganizations infrastructure

    Allows for the substitution of existing systems by better ones (e.g.

    better technology, with a lower cost of ownership, or that aremore adequate to the organizations strategy)

    Technologies like XML, HTTP, SOAP play a vital role

    It allows applications to bind to servicesthat evolve and improve over time withoutrequiring modification to the applicationsthat consume them

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    17/2717

    Some Challenges

    Nave Implementations use WebServices for Everything!

    Web Services are Sexy!

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    18/2718

    Problems associated to the Client/Server model

    Synchronous interaction which forces both parties to be

    present at the same time Normally blocking: who calls is forced to wait for the

    server processing to be over

    Maintaining sessions is expensive in terms of resources,

    limiting the number of simultaneous clients Use ofconnection-pools

    Use ofthread-pools

    Use of Asynchronous I/O

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    19/2719

    Faults affecting the synchronous model (Client/Server)

    If a fault occurs, the session contextis lost

    Re-synchronizing systems can beEXTREMELY complicated!

    Especially so when nested calls areperformed.

    Some examples of faults:

    If a fault occurs before (1), havinghas actually happen.

    If the fault takes place between (1)and (2) server fault the requestis lost

    If the fault takes place between (2)and (3) subsystems fault datainconsistencies may occur

    If the fault happens after (3),corresponding to a lost response,the client will retry the operation

    Possible Solution:2PC

    But its so

    SLOW

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    20/2720

    Motivating Example

    Transfer 5000 from theCGD account to the MGaccount

    (Application Server) (BD Server)

    (DB Server)

    (DB Server)

    widraw(5000, #4598)

    (Application Server)

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    21/27

    21

    How to address this?

    Transfer 5000 from theCGD account to the MGaccount

    deposit(5000, #7653)

    The server cashes after having

    taken the money out, but beforethe money has been deposited.What now?

    (Application Server) (BD Server)

    (DB Server)

    (DB Server)

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    22/27

    22

    Bank Transfer using a Two-Phase Commit

    Bank A Bank B

    StartTransaction

    Withdraw fromacct. A

    Transfer

    Credit onaccount B

    Two-Phase Commit

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    23/27

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    24/27

    24

    SOA Revisited

    SystemA

    Service

    Interface

    SystemB

    Service

    Interface

    SystemC

    Service

    Interface

    SystemD

    Service

    Interface

    EnterpriseService Bus

    ProcessOrchestrator

    ServiceDirectory

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    25/27

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    26/27

    26

    Conclusion

    Large Scale Enterprise Application Integration is much

    more than simply writing network code

    Service Oriented Architecture (SOA) is critical fordesigning systems that:

    Are maintainable in the future with low costs Can adapt to the new business needs of organizations

    Are reliable and easy to use

    Creating an SOA is much more than simply calling webservices scattered throughout the organization (or inter-organizations)

    Beware of the hype!

  • 8/14/2019 Enterprise Application Integration - System Integration Methods

    27/27