0% found this document useful (0 votes)
93 views134 pages

CSI ZG524 Middleware Comprehensive 1635583280833

The document discusses middleware technologies and enterprise application integration (EAI). It begins by providing an overview of the rise of middleware over time, from frameworks to services. It then defines different types of middleware, including remote procedure call (RPC), object request broker (ORB), messaging (JMS), and transactional middleware. The document also discusses enterprise applications and defines EAI as a framework that enables integration of systems and applications across an enterprise. It describes some purposes of EAI like data integration and vendor independence. Finally, it outlines common communication architectures for EAI, including a centralized broker, independent data model, connector model, and system model.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views134 pages

CSI ZG524 Middleware Comprehensive 1635583280833

The document discusses middleware technologies and enterprise application integration (EAI). It begins by providing an overview of the rise of middleware over time, from frameworks to services. It then defines different types of middleware, including remote procedure call (RPC), object request broker (ORB), messaging (JMS), and transactional middleware. The document also discusses enterprise applications and defines EAI as a framework that enables integration of systems and applications across an enterprise. It describes some purposes of EAI like data integration and vendor independence. Finally, it outlines common communication architectures for EAI, including a centralized broker, independent data model, connector model, and system model.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 134

CSI ZG524 -

Middleware Technologies
BITS Pilani Ravi Kiran MALLIDI
Pilani|Dubai|Goa|Hyderabad Enterprise Architect

1
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Comprehensive Exam - Preparation


CSI ZG524 Middleware Technologies 2
Raise of Integrations

Raise of
Machines
Raise of (REST, Cloud
Services (SOA, Services, MSA,
SOAP, REST, Serverless
Raise of ESB, BPM) Technologies)
Middleware’s
(MOM, EAI)
Raise Of
Frameworks
(RPC/RMI,
CORBA,
DCOM, EJB’s)
Raise Of
The Web
(TCP/IP,
IPC)

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Middleware Concepts
CSI ZG524 Middleware Technologies 4
Types Middleware
Here are some of the most widely used types of middleware

• Remote Procedure Call (RPC) middleware provides a protocol that allows a program to
request a service from another program located on another computer or network.
• Object or ORB (Object Request Broker) middleware enables software components or
objects to communicate and interact with a programs, such as containers, across
distributed systems.
• Messaging (JMS) middleware facilitates communications between distributed
applications and services
• Data or database middleware enables direct access to, and interaction with, databases;
it typically includes SQL database software
• Transaction or transactional middleware ensures transactions move from one phase
to the next via transaction process monitoring.
• Content-centric middleware allows client-side requests for specific content and
abstracts and delivers it; it's similar to publish / subscribe middleware like Apache
Kafka.
• Embedded middleware facilitates communication and integration between embedded
apps and real-time operating systems 5

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Enterprise Applications Integration


(EAI)
6
Enterprise Applications
According to Microsoft - An enterprise application is a business application, obviously. As
most people use the term, it is a big business application.
Enterprise applications are complex, scalable, distributed, component-based, and mission-
critical.

They may be deployed on a variety of platforms across corporate networks, intranets, or the
Internet.

They are data-centric, user-friendly, and must meet stringent requirements for security,
administration, and maintenance. In short, they are highly complex systems.

According to Gartner - Enterprise application software includes content, communication,


and collaboration software; CRM software; digital and content creation software, ERP
software; office suites; project and portfolio management; and SCM software.

According to Martin Fowler - Enterprise applications are about the display, manipulation,
and storage of large amounts of often complex data and the support or automation of
business processes with that data.

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Enterprise Application
Integration
Enterprise application integration (EAI) is an integration framework composed of a
collection of technologies and services which form a middleware or "middleware framework"
to enable integration of systems and applications across an enterprise.

Many types of business software such as - supply chain management applications, ERP
systems, CRM applications for managing customers, business intelligence applications,
payroll and human resources systems typically cannot communicate with one another in
order to share data or business rules. For this reason, such applications are sometimes
referred to as islands of automation or information silos. This lack of communication leads
to inefficiencies, wherein identical data are stored in multiple locations, or straightforward
processes are unable to be automated.

Enterprise application integration is the process of linking such applications within a single
organization together in order to simplify and automate business processes to the greatest
extent possible. Applications can be linked either at the back-end via APIs or the front-end
GUI

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


EAI - Purpose
EAI can be used for different purposes:

• Data integration - Ensures that information in multiple systems is kept consistent.


This is also known as enterprise information integration (EII).

• Vendor independence - Extracts business policies or rules from applications and


implements them in the EAI system, so that even if one of the business applications
is replaced with a different vendor's application, the business rules do not have to
be re-implemented.

• Common facade - An EAI system can front-end a cluster of applications, providing


a single consistent access interface to these applications and shielding users from
having to learn to use different software packages

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Enterprise Application
Integration (EAI)
• Typical Enterprise Implementation with Business Function-wise Systems
o Implemented in discrete and diverse applications running on disparate platforms across the
organization

• Business Process Driven System Integration


o More aligned to business needs
o Integrating and automating enterprise business functions and processes can be a daunting
challenge

• Integration Drivers
o Increase reuse and reduce duplication of effort
o Need to be agile & flexible
o Real-time operational awareness
o Integration and Interoperability - Internal and External

• Enabling technologies
o ESB – Enterprise Service Bus
o MQ - Message Oriented Middleware, Message Broker
o Web Services – SOAP, REST, WSDL, WS*
o JBI – Java Business Integration
o BPEL – Business Process Execution Language
o SCA – Service Component Architecture 10
o Grid – Java Spaces, Distributed Caching
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Communication Architectures
Currently, there are many variations of thought on what constitutes the best infrastructure,
component model, and standards structure for Enterprise Application Integration. There
seems to be consensus that four components are essential for a modern enterprise
application integration architecture:

• A centralized broker that handles security, access, and communication. This can
be accomplished through integration servers (like the School Interoperability
Framework (SIF) Zone Integration Servers) or through similar software like the
enterprise service bus (ESB) model that acts as a services manager.
• An independent data model based on a standard data structure, also known as a
canonical data model. It appears that XML and the use of XML style sheets has
become the de facto and in some cases de jure standard for this uniform business
language.
• A connector, or agent model where each vendor, application, or interface can build
a single component that can speak natively to that application and communicate
with the centralized broker.
• A system model that defines the APIs, data flow and rules of engagement to the
system such that components can be built to interface with it in a standardized way.
11

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

EAI Patterns
12
EAI Patterns
Bobby Woolf and Addison-Wesley documented a pattern language consisting of 65
integration patterns to establish a technology-independent vocabulary and a visual notation
to design and document integration solutions, ranging from
• connecting applications to a messaging system
• routing messages to the proper destination and
• monitoring the health of a messaging system.

The patterns are brought to life with examples implemented in messaging technologies,
such as JMS, SOAP, MSMQ, .NET, and other EAI Tools.

The solutions are relevant for a wide range of integration tools and platforms, such as IBM
WebSphere MQ, TIBCO, Vitria, WebMethods (Software AG), or Microsoft BizTalk,
messaging systems, such as JMS, WCF, Rabbit MQ, or MSMQ, ESB's such as Apache
Camel, Mule, WSO2, Oracle Service Bus, Open ESB, SonicMQ, Fiorano or Fuse
ServiceMix.

13

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


EAI Patterns - Overview
Message Routing
Message Construction • Content-Based Router
• Message Filter
• Command Message
• Dynamic Router
• Document Message
• Recipient List
• Event Message
• Splitter
• Request-Reply
• Aggregator
• Return Address
• Resequencer
• Correlation Identifier
• Composed Msg. Processor
• Message Sequence
• Scatter-Gather
• Message Expiration
• Routing Slip
• Format Indicator
• Process Manager
• Message Broker
End Point

End Point
Application A Application B

Message End Points Message


Transformation
• Messaging Gateway
• Messaging Mapper Message Channels • Envelope Wrapper
• Transactional Client System Management • Content Enricher
• Polling Consumer • Point-to-Point Channel • Content Filter
• Event-Driven Consumer • Publish-Subscribe Channel • Control Bus • Claim Check
• Competing Consumers • Datatype Channel • Detour • Normalizer
• Message Dispatcher • Invalid Message Channel • Wire Tap • Canonical Data Model
• Selective Consumer • Dead Letter Channel • Message History
• Durable Subscriber • Guaranteed Delivery • Message Store
• Idempotent Receiver • Channel Adapter • Smart Proxy
• Service Activator • Messaging Bridge • Test Message
• Message Bus • Channel Purger
14
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
EAI Patterns - Overview
This pattern catalog describes 65 integration patterns, collected from many integration
projects since 2002. The patterns provide technology-independent design guidance for
developers and architects to describe and develop robust integration solutions

Integration Styles (4 Patterns) - document different ways applications can be integrated,


providing a historical account of integration technologies. All subsequent patterns follow the
Messaging style.

Messaging Systems (6 Patterns) - Messaging makes the messaging system responsible


for transferring data from one application to another, so the applications can focus on what
data they need to share but not worry so much about how to share

Message Channel Patterns (9 Patterns) - describe how messages are transported across
a Message Channel. These patterns are implemented by most commercial and open
source messaging systems.

Message Construction Patterns (9 Patterns) - describe the intent, form and content of
the messages that travel across the messaging system. The base pattern for this section is
the Message pattern.

15
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
EAI Patterns - Overview
Message Routing Patterns (12 Patterns) - discuss how messages are routed from a
sender to the correct receiver. Message routing patterns consume a message from one
channel and republish it message, usually without modification, to another channel based
on a set of conditions. The patterns presented in this section are specializations of the
Message Router pattern.

Message Transformation Patterns (6 Patterns) - change the content of a message, for


example to accommodate different data formats used by the sending and the receiving
system. Data may have to be added, taken away or existing data may have to be
rearranged. The base pattern for this section is the Message Translator.

Message Endpoint Patterns (11 Patterns) - describe how messaging system clients
produce or consume messages.

System Management Patterns (8 Patterns) - describe the tools to keep a complex


message-based system running, including dealing with error conditions, performance
bottlenecks and changes in the participating systems.

Note: All diagrams and content in below slides are from EAI patterns website
https://www.enterpriseintegrationpatterns.com
16
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Integration Styles
17
Integration Style – File
Transfer
Have each application produce files containing information that other applications need to
consume. Integrators take the responsibility of transforming files into different formats.
Produce the files at regular intervals according to the nature of the business.

Related Patterns: Remote Procedure Invocation, Messaging, Shared Database


18
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Integration Style – Shared
Database
Integrate applications by having them store their data in a single Shared Database..

Related Patterns: Remote Procedure Invocation, File Transfer, Messaging


19
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Integration Style – Remote
Procedural Call
Develop each application as a large-scale object or component with encapsulated data.
Provide an interface to allow other applications to interact with the running application.

Remote Procedure Invocation applies the principle of encapsulation to integrating


applications. These calls are based on RPC communication.

Related Patterns: File Transfer, Messaging, Shared Database


20
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Integration Style – Messaging
Use Messaging to transfer packets of data frequently, immediately, reliably, and
asynchronously, using customizable formats.

Asynchronous messaging is fundamentally a pragmatic reaction to the problems of


distributed systems. Sending a message does not require both systems to be up and ready
at the same time

Related Patterns: Remote Procedure Invocation, File Transfer, Message, Message


Channel, Message Endpoint, Message Router, Message Translator, Shared Database
21
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Messaging Styles
22
Messaging Style – Message
Channel
Connect the applications using a Message Channel, where one application writes
information to the channel and the other one reads that information from the channel.
When an application has information to communicate, it doesn't just fling the information
into the messaging system, it adds the information to a particular Message Channel

Related Patterns: Channel Adapter, Datatype Channel, Invalid Message Channel,


Message Bus, Message Endpoint, Selective Consumer, Messaging, Introduction to
Messaging Channels, Point-to-Point Channel, Publish-Subscribe Channel
23
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Style – Message
Package the information into a Message, a data record that the messaging system can
transmit through a message channel.
Any data that is to be transmitted via a messaging system must be converted into one or
more messages that can be sent through messaging channels.

Related Patterns: Canonical Data Model, Command Message, Document Message, Event
Message, Message Channel, Message Expiration, Message Sequence, Messaging,
Request-Reply
24
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Style – Pipes &
Filters
Use the Pipes and Filters architectural style to divide a larger processing task into a
sequence of smaller, independent processing steps (Filters) that are connected by channels
(Pipes).

Each filter exposes a very simple interface: it receives messages on the inbound pipe,
processes the message, and publishes the results to the outbound pipe. The pipe connects
one filter to the next, sending output messages from one filter to the next

Related Patterns: Competing Consumers, Content Filter, Event-Driven Consumer,


Message Filter, Message Channel, Message Router, Messaging, Messaging Gateway,
Point-to-Point Channel, Resequencer, Test Message, Transactional Client
25
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Style – Message
Translator
Use a special filter, a Message Translator, between other filters or applications to translate
one data format into another.

The Message Translator is the messaging equivalent of the Adapter pattern. An adapter
converts the interface of a component into a another interface so it can be used in a
different context.

Related Patterns: Canonical Data Model, Channel Adapter, Content Filter, Content
Enricher, Message Channel, Message Endpoint, Message Router, Message Translator,
Messaging Bridge, Normalizer, Pipes and Filters, Shared Database, Claim Check
26
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Messaging Channels
27
Messaging Channels – Point
to Point
Send the message on a Point-to-Point Channel, which ensures that only one receiver will
receive a particular message.

A Point-to-Point Channel ensures that only one receiver consumes any given message. If
the channel has multiple receivers, only one of them can successfully consume a particular
message. The channel can still have multiple receivers to consume multiple messages
concurrently, but only a single receiver consumes any one message

Related Patterns: Command Message, Competing Consumers, Document Message,


Message, Message Channel, Messaging, Publish-Subscribe Channel, Request-Reply
28
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Channels –
Publisher - Subscriber
Send the event on a Publish-Subscribe Channel, which delivers a copy of a particular event
to each receiver.

It has one input channel that splits into multiple output channels, one for each subscriber.
When an event is published into the channel, the Publish-Subscribe Channel delivers a
copy of the message to each of the output channels..

Related Patterns: Competing Consumers, Durable Subscriber, Event Message, Message,


Message Channel, Message Store, Messaging, JMS Publish/Subscribe Example, Point-to-
Point Channel, Request-Reply
29
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Messaging Construction
30
Messaging Construction –
Command Message
Command Message is use to reliably invoke a procedure in another application.

Command Message is simply a regular message that happens to contain a command. In


JMS, the command message could be any type of message (Ex: ObjectMessage containing
a Serializable command object, a TextMessage containing the command in XML form, etc)
A Simple Object Access Protocol (SOAP) request is a command message

Related Patterns: Remote Procedure Invocation, Message, Message Channel, Messaging,


Point-to-Point Channel
31
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Construction –
Request Replay
Send a pair of Request-Reply messages, each on its own channel.

Request-Reply has two participants:

Related Patterns: Command Message, Correlation Identifier, Document Message, Remote


Procedure Invocation, Event Message, Guaranteed Delivery, Message, Message Channel,
Message Sequence, Messaging, Point-to-Point Channel, Polling Consumer, Publish-
Subscribe Channel, Return Address
32
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Message Routing
33
Messaging Routing – Content
Based Routing
Content-Based Router is used to route each message to the correct recipient based on
message content.

The Content-Based Router examines the message content and routes the message onto a
different channel based on data contained in the message. The Content-Based Router can
take on the form of a configurable rules engine that computes the destination channel
based on a set of configurable rules

Related Patterns: Dynamic Router, Message Filter, Invalid Message Channel, Message
Router, Pipes and Filters, Publish-Subscribe Channel, Routing Slip, Transactional Client
34
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing – Message
Filter
Message Filter is used to eliminate undesired messages from a channel based on a set of
criteria.

The Message Filter has only a single output channel. If the message content matches the
criteria specified by the Message Filter, the message is routed to the output channel. If the
message content does not match the criteria, the message is discarded

Related Patterns: Content-Based Router, Event-Driven Consumer, Message Router,


Selective Consumer, Publish-Subscribe Channel, Recipient List
35
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing – Dynamic
Router
Dynamic Router, a Router that can self-configure based on special configuration messages
from participating destinations.

The Dynamic Router stores the 'preferences' for each participant in a rule base. When a
message arrives, the Dynamic Router evaluates all rules and routes the message to the
recipient whose rules are fulfilled. This allows for efficient, predictive routing without the
maintenance dependency of the Dynamic Router on each potential recipient

Related Patterns: Content-Based Router, Message Filter, Message Router, Publish-


Subscribe Channel, Recipient List, Routing Slip
36
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing –
Recipient List
Recipient List is used to inspect an incoming message, determine the list of desired
recipients, and forward the message to all channels associated with the recipients in the list.

The logic embedded in a Recipient List can be pictured as two separate parts even though
the implementation is often coupled together. The first part computes a list of recipients. The
second part simply traverses the list and sends a copy of the received message to each
recipient. Just like a Content-Based Router, the Recipient List usually does not modify the
message contents

Related Patterns: Aggregator, Scatter-Gather, Introduction to Composed Messaging


Examples, Content-Based Router, Dynamic Router, Message Filter, Idempotent Receiver,
Message Router, Selective Consumer, Point-to-Point Channel, Publish-Subscribe Channel 37
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing – Splitter
Splitter is used to break out the composite message into a series of individual messages,
each containing data related to one item.

Splitter is used to consumes one message containing a list of repeating elements, each of
which can be processed individually. The Splitter publishes a one message for each single
element (or a subset of elements) from the original message

Related Patterns: Aggregator, Content-Based Router, Content Filter, Correlation Identifier,


Envelope Wrapper, Event-Driven Consumer, Pipes and Filters, Publish-Subscribe Channel
38
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing –
Aggregator
Use a stateful filter, an Aggregator, to collect and store individual messages until a complete
set of related messages has been received. Then, the Aggregator publishes a single
message distilled from the individual messages.
The Aggregator is a special Filter that receives a stream of messages and identifies
messages that are correlated. Once a complete set of messages has been received (more
on how to decide when a set is 'complete' below), the Aggregator collects information from
each correlated message and publishes a single, aggregated message to the output
channel for further processing.

Related Patterns: Scatter-Gather, Introduction to Composed Messaging Examples,


Content-Based Router, Control Bus, Correlation Identifier, Composed Message Processor,
Event-Driven Consumer, Event Message, Guaranteed Delivery, Message Expiration, Point-
to-Point Channel, Publish-Subscribe Channel, Recipient List, Resequencer, Splitter,
39
Transactional Client
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing –
Resequencer
Resequencer, to collect and re-order messages so that they can be published to the output
channel in a specified order.

The Resequencer can receive a stream of messages that may not arrive in order. The
Resequencer contains in internal buffer to store out-of-sequence messages until a complete
sequence is obtained. The in-sequence messages are then published to the output channel

Related Patterns: Aggregator, Competing Consumers, Message Router, Message


Sequence, Pipes and Filters, Splitter, Test Message
40
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Routing – Message
Broker
Message Broker receives messages from multiple destinations, determine the correct
destination and route the message to the correct channel. Implement the internals of the
Message Broker using the design patterns presented in this chapter.

Using a central Message Broker is sometimes referred to as hub-and-spoke architectural


style

Related Patterns: Canonical Data Model, Event-Driven Consumer, Message Channel,


Message Endpoint, Message Router, Pipes and Filters, Point-to-Point Channel, Publish-
Subscribe Channel, Recipient List 41
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Message Transformation
42
Messaging Transformation –
Content Filter
Content Filter is used to remove unimportant data items from a message leaving only
important items.

The Content Filter does not necessarily just remove data elements. A Content Filter is also
useful to simplify the structure of the message. Often times, messages are represented as
tree structures. Many messages originating from external systems or packaged applications
contain many levels of nested, repeating groups because they are modeled after generic,
normalized database structures

Related Patterns: Channel Adapter, Content Enricher, Splitter


43
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Messaging Transformation –
Content Enricher
Content Enricher is to access an external data source in order to augment a message with
missing information.

The Content Enricher uses information inside the incoming message (e.g. key fields) to
retrieve data from an external source. After the Content Enricher retrieves the required data
from the resource, it appends the data to the message. The original information from the
incoming message may be carried over into the resulting message or may no longer be
needed, depending on the specific needs of the receiving application

Related Patterns: Content Filter, Event Message, Message Channel, Message Translator,
Claim Check 44
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Enterprise Service Bus (ESB)


45
What is an ESB (IBM)
An Enterprise Service Bus (ESB) is a flexible connectivity infrastructure for integrating
applications and services

46
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ESB Overview
• ESB is fundamentally an architecture

• ESB is a set of rules and principals for integrating applications together over a bus-
like infrastructure

• The concept of the ESB architecture is that you integrate different applications by putting
a communication bus between them and then enable each application to talk to the bus

• This decouples systems from each other, allowing systems to communicate without
having a dependency or knowledge of other systems on the bus

• The concept of ESB was born out of the need to move away from point-to-point
integration, which becomes brittle and hard to manage over time

“A lightweight connectivity infrastructure built using JMS, XML, and Web


Services standards.”
-- Roy Schulte, Gartner Group
47
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Point-to-Point to EAI

CRM CRM

Commun HR
HR Reports
ication

EAI

Supply
Reports Commu
Chain Finance
nication

Supply
chain
Finance

48
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ESB Capabilities

49
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ESB Capabilities
• Invocation - support for synchronous and asynchronous transport protocols, service
mapping (locating and binding)
• Routing - addressability, static/deterministic routing, content-based routing, rules-based
routing, policy-based routing
• Mediation - adapters, protocol transformation, service mapping
• Messaging - message-processing, message transformation and message enhancement
• Process choreography - implementation of complex business processes
• Service orchestration - coordination of multiple implementation services exposed as a
single, aggregate service
• Complex event processing - event-interpretation, correlation, pattern-matching
• Management - monitoring, audit, logging, metering, admin console, BAM (BAM is not a
management capability in other words the ESB doesn't react to a specific threshold. It is
a business service capability surfaced to end users.)
• Agnosticism - general agnosticism to operating-systems and programming-
languages; for example, it should enable interoperability between Java and .NET
applications
• Protocol Conversion - comprehensive support for topical communication protocols
service standards

50
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ESB Capabilities
• Message Exchange Patterns - support for various MEPs (Message Exchange
Patterns) (for example: synchronous request/response, asynchronous request/response,
send-and-forget, publish/subscribe)
• Adapters - adapters for supporting integration with legacy systems, possibly based on
standards such as JCA
• Security - a standardized security-model to authorize, authenticate and audit use of the
ESB
• Transformation - facilitation of the transformation of data formats and values, including
transformation services (often via XSLT or XQuery) between the formats of the sending
application and the receiving application
• Validation - validation against schemas for sending and receiving messages
• Governance - the ability to apply business rules uniformly
• Enrichment - enriching messages from other sources
• Split and Merge - the splitting and combining of multiple messages and the handling of
exceptions
• Abstraction - the provision of a unified abstraction across multiple layers
• Routing and Transformation - routing or transforming messages conditionally, based
on a non-centralized policy (without the need for a central rules-engine)
• Commodity Services - provisioning of commonly used functionality as shared services
depending on context
51
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ESB Vs MOM Vs Web
Services
Feature ESB MOM Web Services
JMS provider, SOAP provider,
Transport Layer WSDL provider, Stream provider, JMS SOAP over HTTP
File provider, and more

Mediation and Protocol translation, routing, and Routing and data


Data transformation
Rules data transformation transformation

Requires
Maximum level of flexibility for Requires
Deployment recompiling client
dynamic configuration recompiling stubs
code

52
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Service Oriented Architecture (SOA)


53
SOA Introduction
Service-oriented architecture (SOA) is a style of software design where services are
provided to the other components by application components, through a communication
protocol over a network. The basic principles of service-oriented architecture are
independent of vendors, products and technologies.
A service is a discrete unit of functionality that can be accessed remotely and acted upon
and updated independently, such as retrieving a credit card statement online.

A service has four properties according to one of many definitions of SOA


• Logically represents a business activity with a specified outcome.
• Self-contained.
• Back box for its consumers.
• Consist of other underlying services

In 1996 the first report was published on SOA by the analysts Roy W.Schulte and Yefim
V.Natis

54

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Introduction
Service-orientation promotes loose coupling between services. SOA separates functions
into distinct units, or services. These services and their corresponding consumers
communicate with each other by passing data in a well-defined, shared format, or by
coordinating an activity between two or more services (Ex: Web Services)

A manifesto was published for service-oriented architecture in October, 2009. This came up
with six core values which are listed as follows
• Business value is given more importance than technical strategy.
• Strategic goals are given more importance than project-specific benefits.
• Intrinsic inter-operability is given more importance than custom integration.
• Shared services are given more importance than specific-purpose implementations.
• Flexibility is given more importance than optimization.
• Evolutionary refinement is given more importance than pursuit of initial perfection.

SOA can be seen as part of the continuum which ranges from the older concept of
distributed computing and modular programming, through SOA, and on to current practices
of mashups, SaaS, and cloud computing. 55

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Principles
There are no industry standards relating to the exact composition of a service-oriented
architecture, although many industry sources have published their own principles. Below
are the some of the principles out-of-them
• Standardized service contract - Services adhere to a standard communications
agreements, as defined collectively by one or more service-description documents
within a given set of services.
• Service reference autonomy (an aspect of loose coupling) - The relationship
between services is minimized to the level that they are only aware of their
existence.
• Service location transparency (an aspect of loose coupling) - Services can be
called from anywhere within the network that it is located no matter where it is
present.
• Service longevity - Services should be designed to be long lived.
• Service abstraction - The services act as black boxes, that is their inner logic is
hidden from the consumers.
• Service autonomy - Services are independent and control the functionality they
encapsulate, from a Design-time and a run-time perspective.
56

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Principles
• Service statelessness - Services are stateless, that is either return the requested
value or give an exception hence minimizing resource use.
• Service granularity - A principle to ensure services have an adequate size and
scope. The functionality provided by the service to the user must be relevant.
• Service normalization - Services are decomposed or consolidated (normalized) to
minimize redundancy.
• Service composability - Services can be used to compose other services.
• Service discovery - Services are supplemented with communicative meta data by
which they can be effectively discovered and interpreted.
• Service reusability - Logic is divided into various services, to promote reuse of
code.
• Service encapsulation - Many services which were not initially planned under
SOA, may get encapsulated or become a part of SOA.

57

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Features
Why to Use SOA:
• SOA is widely used in market which responds quickly and makes effective changes
according to market situations.
• The SOA keep secret the implementation details of the subsystems.
• Allows interaction of new channels with customers, partners and suppliers.
• Authorizes the companies to select software or hardware of their choice as it acts
as platform independence.

Features:
• Uses interfaces which solves the difficult integration problems in large systems.
• Communicates customers, providers and suppliers with messages by using the
XML schema.
• Uses the message monitoring to improve the performance measurement and
detects the security attacks.
• Reuses the service, there will be lower software development and management
costs.
58

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Advantages
Advantages:
• Allows reuse the service of an existing system alternately building the new system.
• Allows plugging in new services or upgrading existing services to place the new
business requirements.
• Enhance the performance, functionality of a service and easily makes the system
upgrade.
• Capable to adjust or modify the different external environments and large
applications can be managed easily.
• Companies can develop applications without replacing the existing applications.
• Provides reliable applications in which you can test and debug the independent
services easily as compared to large number of code..

59

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Disadvantages
Disadvantages:
• Requires high investment cost (means large investment on technology,
development and human resource).
• Greater overhead when a service interacts with another service which increases
the response time and machine load while validating the input parameters.
• Not suitable for GUI (graphical user interface) applications which will become more
complex when the SOA requires the heavy data exchange.

60

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Blueprint
The following figure shows SOA blueprint with different classes

View Layer

P Application Layer
r
o Work Flow Rules CEP B
g
A
r
M
a
Enterprise Service Bus (ESB)
m
s

Web Services Systems

61

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Blueprint
SOA contains the main functions of blueprint which are called as Programs and BAM.
• Programs - The programs are associated with departmental issues which
manages the development, monitoring and operation of the SOA. The programs
include some areas such as managing services, operation and implementation of
service domains, roles of SOA project, conversion between roles and tasks.
• Business Activity Monitoring(BAM) - The business activity monitoring
functionality can be used by the products to display the runtime details in the
graphical system. The BAM products includes adapters or sensors which are used
to access the data using the Java, PL/SQL and other languages.
• View Layer - The view layer provides two types of applications; one is Rich Client
application and another one is Web Client application. The rich client application
processes the data on the client side and contains some locally installed programs
little network resources dependence. The web client is a client server side
component which contains applications running on user's computer and connected
to server.
• Application Server - The application server includes some functionalities such as
workflow, rules, registry, CEP, ESB, services and systems.

62

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Blueprint
• Workflow - The workflow is used when there is an interaction between human and
implementation which is done through the XPDL (XML Process Definition
Language).
• Rules - Rules can be modified or changed commonly at run time when they are not
incorporated in the system. Define the rules which are based on the system or
natural language, before becoming accessible by using the interfaces such as
Java, Web service etc. E.g.: JBoss rules, WebSphere ILOG rules, Visual rules and
Oracle business rules.
• CEP - Complex Event Processing (CEP) allows to browse event streams based on
the certain pattern which can be uncorrelated in time or content. The Continuous
Query Language (CQL) language contains SQL-style query language which
attaches the elements for organizing the data streams to the SQL language
constructs.
• ESB - Enterprise Service Bus (ESB) gives patterns that are liable for the tasks and
ranges from routing to reachability, allow the interaction between message and
protocol transformation and manages the SOA environment. The ESB is placed
between service provider and consumer which is used for service virtualization. The
services and systems are attached to the ESB.
63

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

EAI Vs ESB Vs SOA


64
EAI, ESB, SOA Pros

EAI ESB SOA


• Easy to quickly accomplish • Less customization • Reusability of services in
goals required other applications
• Guaranteed delivery • Consistency and good • Easy to update and
• Simplifies distributed practice in application
maintain
asynchronous computing integration
and access to data • Boost operational
• Greater reliability and
sources efficiency and agility by fewer software errors
• Greater flexibility consolidating apps • Location independent
• Allows reuse of data • Wide selection of tools • Scalable and available
across other applications • Easier operational support • Platform independence
due to transparency

65

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


EAI, ESB, SOA Cons

EAI ESB SOA


• More complex architecture • Risk of projects • Increased overall costs
• Steeper learning curve “bottlenecks” requires due to higher response
significant planning time and machine load
• Performance bottlenecks
• Difficult to find developers
possible • Complex service
with extensive ESB skills
• Difficulty accessing or management
maintaining business logic • Risk of regression
• Significant upfront
• Single point of failure
investment

66

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


EAI Vs ESB Vs SOA
EAI ESB SOA
• Architectural patterns • Technical implementations • Architectural patterns

• Integrates through system • Integrates through common • Enables a wider range of


output and occurs at the bus type architecture enterprise applications to be
system level (hub-based) integrated.
• Technology-driven - technical • Technology based Integrations • business-driven - a standards-
aspects of the integration based approach to business
process process integration
• Takes a bottom-up approach • Takes a bottom-up approach • Takes a top-down approach.
— propagating changes from and less customization Standards are defined for
one system to a cluster of required various integrations and taken
systems to each integration point
• Works with a system of • Integrate via a common • Provides components to
changes to integrate via a network vendor supports minimize changes to
common network application code
• Standardization depends on • Standardization depends on • works on standards, and
the vendor, and hence the vendor, and hence neutralizes (to some extent)
increases vendor dependency increases vendor dependency vendor dependency

67

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Microservices Architecture (MSA)


68
Microservices Introduction
Microservice is a software development technique, variant of the service-oriented
architecture (SOA) architectural style
Microservices architecture, services are fine-grained and the protocols are lightweight.
Benefit of decomposing an application into different smaller services is that it improves
modularity and makes the application easier to understand, develop, and test and more
resilient to architecture
Parallelizes the development by enabling small autonomous teams to develop, deploy and
scale their respective services independently
Allows the architecture of an individual service to emerge through continuous refactoring.
Microservices-based architectures enable continuous delivery and deployment.
May-2011 used the term “Microservice” in Architects workshop held at Venice
Microservices approach is a first realization of SOA that followed the introduction of DevOps
and is becoming more popular for building continuously deployed systems
Amazon, Netflix and Twitter are using widely using Microservice

69

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Microservices Features
• Decoupling – Services within a system are largely decoupled. So the application as a
whole can be easily built, altered, and scaled
• Componentization – Microservices are treated as independent components that can be
easily replaced and upgraded
• Business Capabilities – Microservices are very simple and focus on a single capability
• Autonomy – Developers and teams can work independently of each other, thus
increasing speed
• Continuous Delivery – Allows frequent releases of software, through systematic
automation of software creation, testing, and approval
• Responsibility – Microservices do not focus on applications as projects. Instead, they
treat applications as products for which they are responsible
• Decentralized Governance – Focus is on using the right tool for the right job. That
means there is no standardized pattern or any technology pattern. Developers have the
freedom to choose the best useful tools to solve their problems
• Agility – Support agile development. Any new feature can be quickly developed and
discarded again 70

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Microservices Advantages
• Independent Development – All microservices can be developed independently based
on their functionality
• Independent Deployment – Based on their services, they can be individually deployed
in any application
• Fault Isolation – Even if one service of the application does not work, the system still
continues to function
• Mixed Technology Stack – Different languages and technologies can be used to build
different services of the same application
• Granular Scaling – Individual components can scale as per need, there is no need to
scale all components together

71

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Microservices Architecture

• Different clients from different devices


User Interface • All services are separated based on their
domains and functionalities
• Microservices have their own load
balancer and execution environment to
API execute their functionalities
Gateway
• Microservices communicate with each
other through a stateless server which is
either REST or Message Bus
• Communication with the help of Service
Microservice Microservice Microservice Microservice Discovery and perform operational
capabilities
• Communicated to clients via API Gateway
DB DB DB DB • Internal points are connected from the API
Gateway

72

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

SOA Vs MSA Architecture


73
SOA Vs MSA
Service-oriented architecture is essentially a collection of services. These services
communicate with each other. The communication can involve either simple data passing or
two or more services.
Microservices is an architectural style that structures an application as a collection of small
autonomous services modeled around a business domain

Monolithic SOA Microservice

74

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Vs MSA

SOA MSA
“share-as-much-as-possible” architecture approach “share-as-little-as-possible” architecture approach

Focus on business functionality reuse Focus on the concept of “bounded context”

Common governance and standards People, collaboration and freedom of other options

Enterprise Service bus (ESB) for communication Simple messaging system

Support multiple message protocols Uses lightweight protocols such as HTTP/REST

Multi-threaded with more overheads to handle I/O Single-threaded usually with the use of Event Loop

Maximizes application service reusability Focuses on decoupling

Traditional Relational Databases are more often Modern Relational Databases are more often used
used
A systematic change requires modifying the A systematic change is to create a new service
monolith
DevOps / Continuous Delivery is not a mainstream Strong focus on DevOps / Continuous Delivery

75

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


SOA Vs MSA

SOA Architecture MSA Architecture

Services / API’s

Application Services / API’s

Application Server

Runtime Environment Runtime Environment

OS OS

Hyper vision Hyper vision

Storage Storage

Network Network
76

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Architecture Shift from N-Tier to


MSA
77
N-Tier Architecture

Client Layer – User interacts the application using


Browser / Mobile Browser
Client Layer (Browsers)
The Server Layer sits between the Client and Storage
JSP / HTML / CSS / JS layers. Server Layer is usually further divided into
multiple sub-layers: Web, Business, and Persistence
Service Layer (Application server)
• Web Layer is the entry point of the application on the server
side, and is responsible for handling user interactions,
MVC Based Web Layer – Struts, Spring, converting requests to models, generating and delivering
MVC dynamic User Interfaces, session management, and other
tasks
• Business Layer is where business logic is implemented as a
Business Layer – Beans, EJB’s, POJOS
carefully composed and well defined API
• Server Persistence Layer is responsible for abstracting away
the application’s interaction with the Storage Layer’s specific
Persistence Layer – JDBC, Hibernate etc., relational database via Object Relational Mapping (ORM)
tools like Hibernate

The Storage Layer retains important data into relational


Storage Layer (Database) database system like MySQL, Oracle, or SQL Server.

DB DB
78

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Single Page Applications
(SPA) Architecture
Single-Page Applications (SPAs) are Web apps that
load a single HTML page and dynamically update that
Client Layer (Browsers)
page as the user interacts with the app using Services.

Java Script Frameworks (AngularJS etc.,) SPAs use JavaScript frameworks and HTML5 to create
fluid and responsive Web apps, without constant page
reloads. This means much of the work happens on the
REST / SOAP Service Layer
client side, in JavaScript.

All the front end pages are connected to REST / SOAP


Service Layer (Application server) services.
Business Layer – Beans, EJB’s, POJOS JavaScript frameworks like Angular, React etc., are
used for developing single page applications

Persistence Layer – JDBC, Hibernate etc., The REST services interact with Business layer for
business operations

Storage Layer (Database) The Storage Layer retains important data into relational
database system like MySQL, Oracle, or SQL Server
DB DB
79

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Microservices (MSA)
Architecture
A microservice is a tiny application that implements just
a small subset of the full applications functionalities.

Refactor (or design) the backend to leverage third-party


hosted services for cross cutting concerns
Client Layer (Browsers)
Java Script Frameworks (AngularJS etc.,) Numerous microservices increases the complexity in
distributed management, inter microservice
communication, authentication and authorization,
API Layer distributed logging and tracing, service registration and
discovery, reverse proxy and gateways, etc.

There are frameworks like Spring can help to


implementation microservices easily
Microservice Microservice Microservice
Microservices allow an application to scale horizontally
and change independently,
DB DB DB

80

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Cloud
81
Cloud Basics
Cloud computing is shared pools of configurable computer system resources and higher-
level services that can be rapidly provisioned with minimal management effort, often over
the Internet.
Cloud computing relies on sharing of resources to achieve coherence and economies of
scale, similar to a public utility
Cloud Computing refers to manipulating, configuring, and accessing the hardware and
software resources remotely. Offers online data storage, infrastructure, and application.
Cloud computing offers platform independency, as the software is not required to be
installed locally on the PC. Hence, the Cloud Computing is making our business
applications mobile and collaborative
Following are the working models for cloud computing:
• Deployment Models
• Service Models

82

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Deployment Models
There are four different cloud models that you can subscribe according to business needs:

PUBLIC CLOUD - The public cloud allows systems and services to be easily accessible to
the general public. Public cloud may be less secure because of its openness.

PRIVATE CLOUD - The private cloud allows systems and services to be accessible within
an organization. It is more secured because of its private nature.

COMMUNITY CLOUD - The community cloud allows systems and services to be accessible
by a group of organizations.

HYBRID CLOUD - The hybrid cloud is a mixture of public and private cloud, in which the
critical activities are performed using private cloud while the non-critical activities are
performed using public cloud.

83

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Service Models
Cloud computing is based on service models. These are
categorized into three basic service models which are
• Infrastructure-as–a-Service (IaaS)
• Platform-as-a-Service (PaaS)
• Software-as-a-Service (SaaS)

IaaS
INFRASTRUCTURE-AS-A-SERVICE (IAAS) - IaaS provides
access to fundamental resources such as physical machines,
virtual machines, virtual storage, etc. Service
Models

PLATFORM-AS-A-SERVICE (PAAS) - PaaS provides the


PaaS SaaS
runtime environment for applications, development and
deployment tools, etc.

SOFTWARE-AS-A-SERVICE (SAAS) - SaaS model allows


to use software applications as a service to end-users.
84

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


History of Cloud Computing
The concept of Cloud Computing came into existence in the year 1950 with implementation
of mainframe computers, accessible via thin/static clients. Since then, cloud computing has
been evolved from static clients to dynamic ones and from software to services. The
following diagram explains the evolution of cloud computing

Cloud
Computing

Mainframes Raise of PC Client / Server Hosted Cloud


(1950’s) (1960’s) (1990’s) Environment Computing
• Start of • Personal Desk • Virtual Private (2000’s) (2010’s)
Automation • Decentralized Network • Infra Mgmt. • Emerging “As a
Phase • IT Service • Demand of • Virtualization Service”
• Localized Industry birth bandwidth • Utility / • Delivery of
Infrastructure • Dot Com Collaborative “IaaS, PaaS,
revaluation computing SaaS, NaaS,
iPaaS”

85

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Benefits
Cloud Computing has numerous advantages. Some of them are listed below -
• One can access applications as utilities, over the Internet.
• One can manipulate and configure the applications online at any time.
• Does not require to install a software to access or manipulate cloud application.
• Cloud Computing offers online development and deployment tools, programming
runtime environment through PaaS model.
• Cloud resources are available over the network in a manner that provide platform
independent access to any type of clients.
• Cloud Computing offers on-demand self-service. The resources can be used
without interaction with cloud service provider.
• Cloud Computing is highly cost effective because it operates at high efficiency with
optimum utilization. It just requires an Internet connection
• Cloud Computing offers load balancing that makes it more reliable.

86

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Advantages
Cost-Efficient − Building own servers and tools is time-consuming as well as expensive as
we need to order, pay for, install, and configure expensive hardware, long before we need it.
However, using cloud computing, we only pay for the amount as per use the computing
resources.
Reliability − A cloud computing platform provides much more managed, reliable and
consistent service than an in-house infrastructure. Guarantees 24x7 and 365 days of
service. If any of the server fails, then hosted applications and services can easily be
transited to any of the available servers.
Unlimited Storage − Cloud computing provides unlimited storage capacity, i.e., we need
not worry about running out of storage space or increasing our current storage space
availability.
Backup & Recovery − Storing data in the cloud, backing it up and restoring the same is
relatively easier than storing it on a physical device. The cloud service providers also have
enough technology to recover our data, so there is the convenience of recovering our data
anytime.
Easy Access to Information − Access cloud account from anywhere in the world provided
there is internet connection at that point. There are various storage and security facilities
that vary with the account type chosen.
87

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Disadvantages
Security - Security is the major concerns in cloud computing. The cloud service providers
implement the best security standards and industry certifications, however, storing data and
important files on external service providers always bears a risk.
AWS cloud infrastructure is designed to be the most flexible and secured cloud network. It
provides scalable and highly reliable platform that enables customers to deploy applications
and data quickly and securely.

Technical - Cloud service providers offer services to number of clients each day,
Sometimes the system can have some serious issues leading to business processes
temporarily being suspended. Additionally, if the internet connection is offline then we will
not be able to access any of the applications, server, or data from the cloud.

Not Easy to Switch Service Providers - Cloud service providers promises vendors that
the cloud will be flexible to use and integrate, however switching cloud services is not easy.
Most organizations may find it difficult to host and integrate current cloud applications on
another platform. Interoperability and support issues may arise such as applications
developed on Linux platform may not work properly on Microsoft Development Framework
88

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Cloud Computing
Technologies
There are certain technologies working behind the cloud computing platforms making cloud
computing flexible, reliable, and usable. These technologies are listed below:
• Virtualization
• Service-Oriented Architecture (SOA)
• Grid Computing
• Utility Computing

Virtualization - Virtualization is a technique, which allows to share single physical instance


of an application or resource among multiple organizations or tenants (customers). It does
this by assigning a logical name to a physical resource and providing a pointer to that
physical resource when demanded.
VM VM VM
Machine Machine Machine
The Multitenant architecture offers virtual
isolation among the multiple tenants VM Infrastructure (Hypervisor)

Network and Storage


89

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Cloud Computing
Technologies
Service-Oriented Architecture (SOA) - Service-Oriented Architecture helps to use
applications as a service for other applications regardless the type of vendor, product or
technology. Therefore, it is possible to exchange the data between applications of different
vendors without additional programming or making changes to services

Mobile App Web App Business App

Integration Platform

Catalog Locator Services

90

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Cloud Computing
Technologies
Grid Computing - Grid Computing refers to
distributed computing, in which a group of
computers from multiple locations are Desk tops Mobile
connected with each other to achieve a
common objective. These computer resources
are heterogeneous and geographically
Grid Computing
dispersed.

Grid Computing breaks complex task into Laptops Servers


smaller pieces, which are distributed to CPUs
that reside within the grid

Utility Computing - Utility computing is the process of providing service through an on-
demand, pay per use billing method. It offers computational resources on demand as a
metered service. Cloud computing, grid computing, and managed IT services are based on
the concept of utility computing.

91

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Amazon Web Services (AWS)


92
AWS Basics
In 2006, Amazon Web Services (AWS) started to offer IT services to the market in the form
of web services, which is nowadays known as cloud computing.
With this cloud, we need not plan for servers and other IT infrastructure which takes up
much of time in advance. Instead, these services can instantly spin up hundreds or
thousands of servers in minutes and deliver results faster. Pay only for what we use with no
up-front expenses and no long-term commitments, which makes AWS cost efficient.
AWS provides a highly reliable, scalable, low-cost infrastructure platform in the cloud that
powers multitude of businesses in 190 countries around the world.
The basic structure of AWS EC2 (Elastic Compute Cloud). EC2 allow users to use virtual
machines of different configurations as per requirement. Allows various configuration
options, mapping of individual server, various pricing options, etc.

93

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


AWS Cloud Computing
Cloud computing is the on-demand delivery of compute power, database storage,
applications, and other IT resources through a cloud services platform via the Internet with
pay-as-you-go pricing.
Cloud computing, don’t need to make large upfront investments in hardware and spend a lot
of time on the heavy lifting of managing that hardware. Instead, organization can provision
exactly the right type and size of computing resources need to power.
Cloud computing provides a simple way to access servers, storage, databases and a broad
set of application services over the Internet. A cloud services platform such as Amazon Web
Services owns and maintains the network-connected hardware required for these
application services, while Organizations provision and use what Organizations need via a
web application

94

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Advantages of Cloud
Computing
Trade capital expense for variable expense - Instead of having to invest heavily in data centers and
servers Organizations can pay only when consume computing resources, and pay only for how much
consume.

Benefit from massive economies of scale - By using cloud computing, Organizations can achieve a
lower variable cost than can get on Organizations own. Because usage from hundreds of thousands of
customers is aggregated in the cloud, providers such as AWS can achieve higher economies of scale,
which translates into lower pay as-you-go prices.

Stop guessing about capacity - Eliminate guessing on infrastructure capacity needs. When you make a
capacity decision prior to deploying an application, often end up either sitting on expensive idle resources
or dealing with limited capacity. With cloud computing, these problems go away. Organizations can
access as much or as little capacity as need, and scale up and down as required with only a few minutes’
notice.

Increase speed and agility - In a cloud computing environment, new IT resources are only a click away,
which means that reduce the time to make those resources available to developers from weeks to just
minutes. This results in a dramatic increase in agility for the organization, since the cost and time it takes
to experiment and develop is significantly lower.

Stop spending money running and maintaining data centers - Focus on projects that differentiate
your business, not the infrastructure.

Go global in minutes - Easily deploy application in multiple regions around the world with just a few 95
clicks.
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
AWS Cloud Platform
Amazon Web Services offers a broad set of global cloud-based products including compute,
storage, databases, analytics, networking, mobile, developer tools, management tools, IoT,
security and enterprise applications.
These services help organizations move faster, lower IT costs, and scale. AWS is trusted by
the largest enterprises and the hottest start-ups to power a wide variety of workloads
including: web and mobile applications, game development, data processing and
warehousing, storage, archive, and many others.
Following are Platforms / Products in Amazon Web Services:
• AWS Management Console • Security, Identity, and Compliance
• AWS Command Line Interface • Analytics
• Software Development Kits • Artificial Intelligence
• Compute • Mobile Services
• Storage • Application Services
• Database • Messaging
• Migration • Business Productivity
• Networking and Content Delivery • Desktop & App Streaming
• Developer Tools • Internet of Things
• Management Tools • Game Development 96

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

NoSQL Databases
97
NoSQL Database
NoSQL databases are built for specific data models and have flexible schemas for building
modern applications.
NoSQL databases are widely recognized for their ease of development, functionality, and
performance at scale.
They use a variety of data models, including document, graph, key-value, in-memory, and
search. This page includes resources to help you better understand NoSQL databases and
to get started.

The predominant data model that was used for application development was the relational
data model used by relational databases such as Oracle, DB2, SQL Server, MySQL, and
PostgreSQL. It wasn’t until the mid to late 2000s that other data models began to gain
significant adoption and usage. To differentiate and categorize these new classes of
databases and data models, the term “NoSQL” was coined. Often the term “NoSQL” is used
interchangeably with “nonrelational.”

98

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


NoSQL Database Advantages
NoSQL databases are a great fit for many modern applications such as mobile, web, and
gaming that require flexible, scalable, high-performance, and highly functional databases to
provide great user experiences.
• Flexibility - NoSQL databases provide flexible schemas that enable faster and
more iterative development. The flexible data model makes NoSQL databases ideal
for semi-structured and unstructured data.
• Scalability - NoSQL databases are designed to scale out by using distributed
clusters of hardware instead of scaling up by adding expensive and robust servers.
Some cloud providers handle these operations behind-the-scenes as a fully
managed service.
• High-performance - NoSQL database are optimized for specific data models (such
as document, key-value, and graph) and access patterns that enable higher
performance than trying to accomplish similar functionality with relational
databases.
• Highly functional - NoSQL databases provide highly functional APIs and data
types that are purpose built for each of their respective data models.

99

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


NoSQL Database Types
A more detailed classification is the following

Type Examples of NoSQL DB’s


Cache Apache Ignite, Coherence, eXtreme Scale, Hazelcast, Infinispan, Memcached,
Key-Value Cache
Velocity
Key-Value Store ArangoDB, Aerospike
Key-Value Store
Oracle NoSQL Database, Dynamo, Riak, Voldemort
(Eventually-Consistent)
Key-Value Store
FoundationDB, InfinityDB, LMDB, MemcacheDB
(Ordered)
Data-Structures Server Redis

Tuple Store Apache River, GigaSpaces

Object Database Objectivity/DB, Perst, ZopeDB


ArangoDB, BaseX, Clusterpoint, Couchbase, CouchDB, DocumentDB, IBM Domino,
Document Store
MarkLogic, MongoDB, Qizx, RethinkDB
Wide Column Store Amazon DynamoDB, Bigtable, Cassandra, Druid, HBase, Hypertable
Native Multi-model
ArangoDB, Cosmos DB, OrientDB
Database
100

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Relational Vs NoSQL
Databases
Description Relational Database NoSQL Database
Optimal workloads Relational databases are designed for NoSQL key-value, document, graph, and in-
transactional and strongly consistent online memory databases are designed for OLTP for a
transaction processing (OLTP) applications and number of data access patterns that include low-
are good for online analytical processing (OLAP). latency applications. NoSQL search databases
are designed for analytics over semi-structured
data.
ACID properties Relational databases provide atomicity, NoSQL databases often make tradeoffs by
consistency, isolation, and durability (ACID) relaxing some of the ACID properties of relational
properties: databases for a more flexible data model that can
scale horizontally. This makes NoSQL databases
• Atomicity requires a transaction to execute an excellent choice for high throughput, low-
completely or not at all. latency use cases that need to scale horizontally
• Consistency requires that when a transaction beyond the limitations of a single instance.
has been committed, the data must conform to
the database schema.
• Isolation requires that concurrent transactions
execute separately from each other.
• Durability requires the ability to recover from
an unexpected system failure or power outage
to the last known state.

101

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Relational Vs NoSQL
Databases
Description Relational Database NoSQL Database
Data model The relational model normalizes data into tables NoSQL databases provide a variety of data
that are composed of rows and columns. A models that includes document, graph, key-value,
schema strictly defines the tables, rows, in-memory, and search
columns, indexes, relationships between tables,
and other database elements. The database
enforces the referential integrity in relationships
between tables.
Performance Performance is generally dependent on the disk Performance is generally a function of the
subsystem. The optimization of queries, indexes, underlying hardware cluster size, network latency,
and table structure is often required to achieve and the calling application
peak performance.
Scale Relational databases typically scale up by NoSQL databases typically are partitionable
increasing the compute capabilities of the because key-value access patterns are able to
hardware or scale-out by adding replicas for scale out by using distributed architecture to
read-only workloads increase throughput that provides consistent
performance at near boundless scale
APIs Requests to store and retrieve data are Object-based APIs allow app developers to easily
communicated using queries that conform to a store and retrieve in-memory data structures.
structured query language (SQL). These queries Partition keys let apps look up key-value pairs,
are parsed and executed by the relational column sets, or semistructured documents that
database contain serialized app objects and attributes

102

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Relational Vs NoSQL
Terminology
SQL MongoDB DynamoDB Cassandra Couchbase
Table Collection Table Table Data bucket
Row Document Item Row Document
Column Field Attribute Column Field
Primary key ObjectId Primary key Primary key Document ID

Index Index Secondary index Index Index


Global secondary
View View Materialized view View
index
Nested table or Embedded
Map Map Map
object document
Array Array List List List

103

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


NoSQL DB Performance
Ben Scofield rated different categories of NoSQL databases as follows
Data model Performance Scalability Flexibility Complexity Functionality
Key–value
high high high none variable
store
Column-
high high moderate low minimal
oriented store
Document-
high variable high Low variable
oriented store
Graph
variable variable high High graph theory
database
Relational relational
variable variable low moderate
database algebra

104

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

CAP Theorem
105
CAP Theorem (Brewer’s
Theorem)
CAP theorem states that there are three basic requirements which exist in a special relation
when designing applications for a distributed architecture.
• Consistency – The data in the database remains consistent after the execution of
an operation. For example after an update operation all clients see the same data.
• Availability - The system is always on (service guarantee availability), no
downtime.
• Partition Tolerance - The system continues to function even the communication
among the servers is unreliable, i.e. the servers may be partitioned into multiple
groups that cannot communicate with one another.
In theoretically it is impossible to fulfill all 3 requirements. CAP provides the basic
requirements for a distributed system to follow 2 of the 3 requirements. Therefore all the
current NoSQL database follow the different combinations of the C, A, P from the CAP
theorem. Here is the brief description of three combinations CA, CP, AP :
• CA - Single site cluster, therefore all nodes are always in contact. When a partition
occurs, the system blocks.
• CP -Some data may not be accessible, but the rest is still consistent/accurate.
• AP - System is still available under partitioning, but some of the data returned may
be inaccurate. 106

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


CAP Theorem (Brewer’s
Theorem)

107

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Caching
108
Caching
In computing, a cache is a high-speed data storage layer which stores a subset of data,
typically transient in nature, so that future requests for that data are served up faster than is
possible by accessing the data’s primary storage location. Caching allows you to efficiently
reuse previously retrieved or computed data.

The data in a cache is generally stored in fast access hardware such as RAM (Random-
access memory) and may also be used in correlation with a software component. A cache's
primary purpose is to increase data retrieval performance by reducing the need to access
the underlying slower storage layer.

Trading off capacity for speed, a cache typically stores a subset of data transiently, in
contrast to databases whose data is usually complete and durable.

109

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching Overview
RAM and In-Memory Engines - Due to the high request rates or IOPS (Input / Output
operations per second) supported by RAM and In-Memory engines, caching results in
improved data retrieval performance and reduces cost at scale. To support the same scale
with traditional databases and disk-based hardware, additional resources would be
required. These additional resources drive up cost and still fail to achieve the low latency
performance provided by an In-Memory cache

Applications - Caches can be applied and leveraged throughout various layers of


technology including Operating Systems, Networking layers including Content Delivery
Networks (CDN) and DNS, web applications, and Databases. Use caching to significantly
reduce latency and improve IOPS for many read-heavy application workloads, such as Q&A
portals, gaming, media sharing, and social networking.
Cached information can include the results of database queries, computationally intensive
calculations, API requests/responses and web artifacts such as HTML, JavaScript, and
image files.

110

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching Overview
Design Patterns - In a distributed computing environment, a dedicated caching layer
enables systems and applications to run independently from the cache with their own
lifecycles without the risk of affecting the cache. The cache serves as a central layer that
can be accessed from disparate systems with its own lifecycle and architectural topology.
Caching Best Practices - When implementing a cache layer, it’s important to understand
the validity of the data being cached. A successful cache results in a high hit rate which
means the data was present when fetched. A cache miss occurs when the data fetched was
not present in the cache. Controls such as TTLs (Time to live) can be applied to expire the
data accordingly.
Another consideration may be whether or not the cache environment needs to be Highly
Available, which can be satisfied by In-Memory engines such as Redis. In some cases, an
In-Memory layer can be used as a standalone data storage layer in contrast to caching data
from a primary location. In this scenario, it’s important to define an appropriate RTO
(Recovery Time Objective--the time it takes to recover from an outage) and RPO (Recovery
Point Objective--the last point or transaction captured in the recovery) on the data resident
in the In-Memory engine to determine whether or not this is suitable. Design strategies and
characteristics of different In-Memory engines can be applied to meet most RTO and RPO
requirements.
111

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching Overview

Mobile / Desktops

Internet Web Content Applications Database

Client-Side DNS Web Content Application Database


Accelerate Accelerate retrieval of
Accelerate Reduce latency
retrieval of web web content from
Domain to IP application associated with
Use Case content from web/app servers. Manage
Resolution performance and database query
websites (browser Web Sessions (server
data access requests
or device) side)
HTTP Cache Headers,
HTTP Cache Key/Value data Database buffers,
CDNs, Reverse Proxies,
Technologies Headers, DNS Servers stores, Local Key/Value data
Web Accelerators,
Browsers caches stores
Key/Value Stores
Application
Amazon CloudFront,
Frameworks,
ElastiCache for Redis, ElastiCache for
Amazon ElastiCache for
Solutions Browser Specific ElastiCache for Redis /
Route 53 Redis /
Memcached, Partner Memcached
Memcached,
Solutions
Partner Solutions

112

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching Benefits
Improve Application Performance - Memory is orders of magnitude faster than disk
(magnetic or SSD), reading data from in-memory cache is extremely fast (sub-millisecond).
This significantly faster data access improves the overall performance of the application.

Predictable Performance - A common challenge in modern applications is dealing with


times of spikes in application usage. Examples include social apps during the Super Bowl or
election day, eCommerce websites during Black Friday, etc. Increased load on the database
results in higher latencies to get data, making the overall application performance
unpredictable. By utilizing a high throughput in-memory cache this issue can be mitigated.

Reduce Database Cost - A single cache instance can provide hundreds of thousands of
IOPS (Input/output operations per second), potentially replacing a number of database
instances, thus driving the total cost down. This is especially significant if the primary
database charges per throughput. In those cases the price savings could be dozens of
percentage points.

113

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching Benefits
Eliminate Database Hotspots - Many applications, it is likely that a small subset of data,
such as a celebrity profile or popular product, will be accessed more frequently than the
rest. This can result in hot spots in your database and may require overprovisioning of
database resources based on the throughput requirements for the most frequently used
data. Storing common keys in an in-memory cache mitigates the need to overprovision
while providing fast and predictable performance for the most commonly accessed data

Reduce the Load on the Backend - By redirecting significant parts of the read load from
the backend database to the in-memory layer, caching can reduce the load on your
database, and protect it from slower performance under load, or even from crashing at
times of spikes

Increase Read Throughput (IOPS) - Lower latency, in-memory systems offer much higher
request rates (IOPS) relative to a comparable disk-based database. A single instance used
as a distributed side-cache can serve hundreds of thousands of requests per second

114

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching - Memcached
An open source project designed to make use of the spare RAM in many servers to act as a
memory cache for frequently accessed pieces of information. Memcached is a general-
purpose distributed memory caching system that was originally developed by Danga
Interactive for LiveJournal.

Currently it is used by many sites like browser


YouTube, Reddit, Zynga, Face book Response
and Twitter. Request served from
Memcached
Application Server
It is often used to speed up dynamic
First time Caching
database-driven websites by caching retrieval
data and objects in RAM to reduce the
Memcache Memcache
number of times an external data
RDBMS RDBMS
source such as a database or API) must Memcache Memcache
be read

115

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching – Traditional Vs
Memcached
Java Caching:
Traditional Java caching framework is quite
easy, regardless of whether we choose an
open source or commercial option.
It uses replication for distributed caching,
means if a cache entry is added on
AppServer1 it is automatically replicated to
the other application servers in the system.

Memcached:
When an object is added to cache, the
Memcached client will take that object,
serialize it, and send a byte array to the
Memcached server for storage
if application is running on more than one
application server, all of them can point to
the same Memcached server and use it for
getting and setting cache entries
116

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Caching – Memcached
Advantages / Disadvantages
Advantages:
• Shared memory allows multiple processes to share a single cache
• Cache requests can be distributed over multiple instances
• Cross application and cross Platform Engine meaning the same server can be accessed
from a variety of languages - PHP, Java and .NET and from Windows, Linux etc.
• Reading from Memcached is often significantly faster than reading from a database.
Especially when content has been pre-sorted and pre-filtered, and is cached in a
serialized object format (e.g. JSON) that can be quickly reconstituted by the application.

Disadvantages:
• Applications need to be designed with Memcached support in mind
• It’s volatile memory and shouldn’t be used to store anything that you can’t repopulate from
a persistent source (like the file system or a database)
• It’s yet another process running on the server.
• No means of authentication making data insecure
• Memcached works as an external service which means that externally needs to be
117
installed / run in production environment
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Loan Broker Use Case


118
Loan Broker Use Case
• Loan Broker – Requirements & Design
• Obtaining Loan Quote
• Obtaining Loan Quote using Loan Broker
• Loan broker coordinates with external systems for lowest quote
• Loan Broker decouples from external system using Enterprise Service Bus
• Configuration – camelcontext.xml, Configuration Elements
• Inbuilt Components - Data Mapper, JDBC Connector, Routing, Error Handling
• Custom Transformer
• Deployment Options: Standalone / Embedded
• Demo

119

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case -
Requirements
• When shopping for a loan, a customer usually calls several banks to find the deal with
the best possible interest rate
• Each bank asks the customer for his or her social security number, the amount of the
loan and the desired term , i.e. the number of months until the loan has to be paid off
• Each bank then investigates the customer's credit background, usually by contacting a
credit agency
• Based on the requested terms and the customer's credit history, the bank responds with
an interest rate quote to the consumer (or declines thankfully)
• Once the customer has received quotes from all banks, he or she can then select the
best offer, i.e. the lowest interest rate

120

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case – High
Level Process Flow
Business Problem
• Because contacting multiple banks with a loan quote request is a tedious task, loan
brokers offer this service to consumers

Solution
• A loan broker is typically not affiliated with any one bank but has access to many lending
institutions
• The broker gathers the customer data once and contacts the credit agency to obtain the
customer's credit history
• Based on the credit score and history, the broker presents the request to a number of
banks that are best suited to meet the customer’s criteria.
• The broker gathers the resulting quotes from the banks and selects the best offer (i.e.
the lowest interest rate) to pass back to the consumer.

Insurance
Customer Insurance
Insurance broker collates
requests Broker
broker sends the quotes,
insurance requests
customer info provides the
broker for Insurance Org
to get profile customer the
quote for quotes
lowest quote
121

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case –
Solution Design
5. Provide customer
1. Customer lowest quote
requests for lowest Credit
quote Service(
Bean)

3. Get eligible Banks


for requesting quote

Insurance Broker
4. Get Bank
2. Get Customer
Quote
Profile
Credit
Agency( Bank Bank
JMS) 1(JMS Bank 3(JMS
service) 2(JMS service)
service)
122

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case –
Solution Realization

Bank Bank 1
Http Services
Client
Bank 2
Bank
1. Receive Agency
Loan
Request 3. Get Banks List
Loan
Broker Bank 3

2. Get Credit 4. Get Quote


5. Determine Initiate Profile
Lowest Quote Service
Orchestration

Enterprise Service Bus

123

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case –
Solution Realization
• The request-response [*HTTP Inbound Endpoint*] in this flow receives an end user
request.
• Next, the Body to Parameter Map Transformer converts the data format of the message
payload from HTTP body data to a Java map. The Loan Broker application only
processes Java message payloads.
• Then, Camel employs a content-based router to direct the message for further
processing. The routes each message to one of two processing pathways according to
its payload contents.
o If the message payload contains a complete request (i.e. the borrower’s name and
SSN, and the amount and the term of the loan), the choice flow control passes the
message to the create customer request [*Expression Component*].
o If the message payload is an incomplete request, the choice flow control passes the
message to the set error messageexpression component. This component sets the
payload of the message to read Error: incomplete request. Camel processes the
message no further. Instead, it responds to the end user with the error message.
• The create customer request component uses expressions to extract data from the
message payload. It uses the data to create a new Java object with three values:
o the Customer, which identifies both the borrower’s name and SSN
o one Integer, which identifies the amount of the loan
o a second Integer, which identifies the loan repayment term 124

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case –
Solution Realization
• With a new Customer Quote Request object in its payload, the message encounters its
first [*Message Enricher*]. Throughout this flow, Camel enriches messages with data
rather than changing the payload contents. By enriching a message, Camel preserves
the payload content so that other elements in the application can access the original
data.
• As with its predecessor, the Enrich with Banks enricher uses a flow reference component
to invoke a subflow and acquire data. In this case, instead of adding a credit score,
Camel uses the result of the Lookup Banks subflow to add a list of banks to the
message payload.
• One by one, this iterative processor fetches data to populate each item on the list.
• To fetch these data, the flow reference component first invokes the to acquire a quote
from a bank.
• Then, the message enricher adds the quote to the list variable.
• For each continues to invoke, then enrich, until it has acquired a quote from each bank
on the list of banks to customers.

125

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Loan Broker Use Case –
Solution Realization
This example shows how to use Camel to
implement the EIP's loan broker example, from the
EIP book
(http://www.enterpriseintegrationpatterns.com/Syst
emManagementExample.html).

The example use web services for exchanging


messages between the client, credit agency, and
the banks.

Build
You will need to compile this example first:
mvn compile

Run
mvn exec:java -PWS.LoanBroker
mvn exec:java -PWS.Client

126

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

XYZ Media Use Case


127
XYZ Media Use Case
Understanding
• Currently applications are integrating using point to point using SOAP / Rest
Services
• Difficulty in Managing, Monitoring and extending integrations due to point to point
integrations
• Data related issues are not handled properly at application level (programming
efforts required)
• Exception handling and logging are maintained at application level. No centralized
mechanism.

Overview
• Recommends a Middleware solution which is cost effective, maintainable and future
ready
• Utilizes existing Service s exposed by the existing application can be consumed in
middleware

Scope
• A total of 08 interfaces have been identified for the current scope between PO,
ECC, CRM, SAP-BW and iPrice
• Using Apache Camel as the Middleware solution for integration between systems 128

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


XYZ Media Use Case
Objective
• Streamline data exchange between applications to avoiding multiple point-to-point
connections
• Enable data and protocol transformation between data providers and consumers on a
native format
• Enable incremental adoption of a Service Oriented Architecture (SOA) with minimal
disruption to existing business operations
• Enable reliable, asynchronous messaging to build highly available applications
• Enable real time message exchange to support real time provisioning and de-
provisioning of services
• Apply standard and consistent authentication, security and monitoring policies across
applications

129

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


XYZ Media Use Case

AS - IS TO - BE

CRM iPrice

Middleware
(Apache Connectivity Services

Camel) Rest /SOAP FTP / BATCH / DB

Component Services
Routing Orchestration

Business Services

Provisioning Mapping

ECC SAP-BW

130

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


XYZ Media Use Case

Sl.No Interface Sender Sender Adapter Receiver Receiver Interface


System Adapter Type
1 SFDC session ID PO File ECC RPC Async
2 Customer Master data ECC SOAP/REST CRM SOAP Async
3 Order creation in SAP CRM SOAP ECC Idoc/SOAP Async
4 Order creation response ECC SOAP CRM SOAP Async
5 Order data for REV sys ECC SOAP CRM SOAP Async
6 Historical Published Ad BW RFC/File/REST iPrice FTP Async
data
7 Customer score (Sync) CRM SOAP/REST iPrice SOAP Sync
8 Daily Published Ads data BW RPC/File/REST CRM SOAP Async

131

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Sample Use Cases
Sample 1:
---------
A Consumer shops the best Loan Quote(s) subscribes to the services of a Loan Broker,
which handles the below details such as:

• Retrieves the credit history from credit bureau


• Send a Loan quote request to each selected Bank (minimum 3 banks, JMS connectivity)
• Collect responses from each Bank (interest rate)
• Filter responses and determine the best quote (interest rate), based on consumer’s
requirements.
• Pass the Loan quote(s) back to the consumer.
Determine the EAI patterns used for the above requirement with proper diagrams and
detailed steps followed

132

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Sample Use Cases
Sample 2:
---------
ABC Hospital is planning to implement the Health Care application with the below high-
level requirements:

Below are the functions / components / systems involved in Health Care Management
System (HMS).
• Front End Registration Desk (Registration of Patients and Appointments)
• Doctors Clinic (Clinical Preparation, Prescriptions etc.,)
• Laboratories (lab test information, Results storage etc.,)
• Pharmacy (Prescription Data integration with HMS System)
• Insurance Companies Integration
• Payments (Insurance, Card / Cash payments)

Design the system architecture with the above details using Point-to-Point and SOA (ESB)
based approaches. Elaborate usage of EAI design patterns in the HMS context
133

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Questions

134

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

You might also like