bpm & ibpm software suitesapplication integration definition application integration, in a...
TRANSCRIPT
Application Integration
Definition Application integration, in a general context, is the process of bringing resources from one application to another. Application integration is the process of bringing data from one application program to another application program. Enterprise application integration (EAI) is the use of software and computer systems architectural principles to integrate a set of enterprise computer applications. Enterprise application integration (EAI) is the use of technologies and services across an enterprise to enable the integration of software applications and hardware systems. EAI is related to middleware technologies
Shyju, Sathi Raghavan
Application Integration Classifications
1. Synchronous & Asynchronous Synchronous
• Real-time request and response
• Sender will wait for the response before moving to the next task
• Both system/device should be up and running
E.g.: Telephone, Synchronous web services
Asynchronous
• Sender will not wait for the response and can move to another task
• May not be a response
E.g..: E-Mail , Police wireless system,
Asynchronous MQ & JMS communication etc.
Shyju, Sathi Raghavan
2. Data Centric and Process Centric Integration Data centric Integration
Transfer data between the system
Non persistent in nature
Should not have business logic
Process centric Integration
Transfer Process information between systems
End to End process automation
Persistent in nature
Can have Human Task in between the process
Can have a Rule Engine associated with the process
Shyju, Sathi Raghavan
Application Integration Classifications (Contd..)
3. Point to Point and Middleware Based Integration
Point to Point (Tight Coupled)
Shyju, Sathi Raghavan
Application Integration Classifications (Contd..)
Application A Application B
Middleware Based (Loosely Coupled)
Programs communicate directly to each other E.g.: Direct FTP/SFTP connectivity between systems
Application A Application B Middleware
Programs communicates to each other through a middleware software
E.g. : ESBs, Process Servers etc.
Integration using File Transfer Protocol (FTP)
Shyju, Sathi Raghavan
Manuel FTP
Application Integration Various Methods
FTP is a standard network protocol used to transfer computer files from one host to another host
C:\> ftp <host-name> Or C:\> ftp ftp> open <host-name> User : <user-name> Password : <password> ftp> cd <directory-name> ftp> put <source-file-name> Or ftp> get <destination-file-name> ftp> bye
Shyju, Sathi Raghavan
PuTTY - Tool for Connecting with Unix based remote system
Application Integration Various Methods (Contd..)
Host Names can be saved
User Names can be saved
SSH keys can be pre configured
Can establish connection through proxy
Shyju, Sathi Raghavan
Secure File Transfer Protocol (SFTP)
SSH File Transfer Protocol Key based authentication Uses SSH protocol to authenticate and establish a secure connection
• Install public key in destination server /home/<userid>/.ssh • Install private key in the client machine
$> sftp <destination_userid>@<destination_servername > sftp> cd <directory-name> sftp> put <source-file-name> Or sftp> get <destination-file-name> sftp> bye
ssh -l <destination userid> <destination_server_name> SSH Command for opening the destination console from the client
Application Integration Various Methods (Contd..)
• SFTP configuration in Windows - VShell
Shyju, Sathi Raghavan
Automated SFTP using scheduled script
Application Integration Various Methods (Contd..)
Schedule the script to run at a time that is most convenient for you E.g.: Application A generate file and keeps the files in a specified folder in source
server The scheduler checks the availability of the file in source folder in a scheduled
interval (Say every 30 minutes or Every day on a specific time) If the file is available, then the scheduler SFTP’s the file to the destination server
Shyju, Sathi Raghavan
Automated SFTP using script
Application A
SFTP Shell Script
File File
Application B
Invokes
Server-1 Server-2
SFTP
Read
Application Integration Various Methods (Contd..)
Shared Database
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Database
Application A Application B Application C
Make multiple applications access a common database
Cons • Integration of data, not business functions • Difficult to find common
representation
SOAP Based Web Service
JAX-RPC is a Java specification API – This API is now Obsolete
JAX-WS is the successor of JAX-RPC
SAAJ is another specification
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..) Web Services
A software function provided at a network address over the web with a service with a well defined interface
SOAP based Web Service and ReSTful Web Service Each language has their own way of implementing/specifications
Java Specifications
ReSTful Web Services
Rest is an Architectural Style
Rest uses HTTP standard methods POST, GET, PUT and DELETE
JAX-RS is a Java specification API for RESTful web services.
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..) Web Services (Contd..)
• Apache Axis is an open source implementation of the Java WS APIs for sending and receiving SOAP messages. Axis 1 supports JAX-RPC and SAAJ, while Axis 2 supports SAAJ and JAX-WS.
• GlassFish is the open source reference implementation of J2EE 5. As such, it contains an implementation of JAX-WS.
SOAP based JAX-RPC and JAX-WS API Implementation
WSDL
Creation of JAX-WS Web Service • Add @WebService annotation for the class. All the public methods will expose
after deployment. • Add @WebMethod at function in case of expose only few functions
XML-based interface definition language that is used for describing the functionality offered by a web service
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..) Web Services (Contd..) Types– a container for data type
definitions using some type system (such as XSD). Message– an abstract, typed definition of the data being communicated. Operation– an abstract description of an action supported by the service. Port Type–an abstract set of operations supported by one or more endpoints. Binding– a concrete protocol and data format specification for a particular port type. Port– a single endpoint defined as a combination of a binding and a network address. Service– a collection of related endpoints
WSDL Elements
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Web Services (Contd..)
• In rest, everything is resource and every resource should be identified by a unique identifier
• JAX-RS is a specification that makes it easy to create a RESTful service that can be deployed to any Java application server
• JAX-RS is a JSR (Java Specification Requests) specification and it is a part of Java EE
• JAX-RS uses annotations, introduced in Java SE 5, to simplify the development and deployment of web service clients and endpoints
JAX-RS - ReSTful Service Specification
Jersey & ReST easy are the reference implementation of the JAX-RS API, as defined in the JSR-311 standard for RESTful web services.
Jersey is member of GlassFish project
JAX-RS reference Implementations
Interface Specifications
Interface Implementations
Path.java package javax.ws.rs; public @interface Path{ public abstract String value(); }
Custom Implementation
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Web Services (Contd..)
• @Path specifies the relative path for a resource class or method. • @GET, @PUT, @POST, @DELETE and @HEAD specify the HTTP request type of a resource. • @Produces specifies the response Internet media types (used for content negotiation). • @Consumes specifies the accepted request Internet media types. • In addition, it provides further annotations to method parameters to pull information out
of the request. All the @*Param annotations take a key of some form which is used to look up the value required.
• @PathParam binds the method parameter to a path segment. • @QueryParam binds the method parameter to the value of an HTTP query parameter. • @MatrixParam binds the method parameter to the value of an HTTP matrix parameter. • @HeaderParam binds the method parameter to an HTTP header value. • @CookieParam binds the method parameter to a cookie value. • @FormParam binds the method parameter to a form value. • @DefaultValue specifies a default value for the above bindings when the key is not found. • @Context returns the entire context of the object.(for example @Context
HttpServletRequest request)
JAX-RS API Annotations
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Database Stored Procedure & Web Service
CREATE PROCEDURE TEST_PROC (ws_address VARCHAR2, ws_function VARCHAR2) AS req soap_api.request; resp soap_api.response; BEGIN // BUSINESS LOGIC ........ ........ req := Create an Request XML resp : = soap_api.invoke(req, ws_address, ws_function); // CONTINUE BUSINESS LOGIC BASED ON THE VALUE FROM WS ........ ........ END;
Invocation of Web Service from a database Stored Procedure
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..) Java Stored Procedure & Web Service
CREATE PROCEDURE TEST_PROC (ws_address VARCHAR2, ws_function VARCHAR2) AS LANGUAGE JAVA NAME 'WebService.invoke(java.lang.String, java.lang.String, java.lang.String )';
Create a Java class with static method Implement a general purpose web service invocation code in the static method
( Argument as service URL, input XML and function to invoke - or Implement the static method that can invoke web URL with query string as parameter)
Load the Class to Oracle JVM using Load Java comman
C:\loadjava> loadjava -thin -user scott/tiger@localhost:5521:orcl \ -grant NILES,FORD WebService.class
Write a Java Stored Procedure which can invoke the static function
Middleware Middle ware is a Layer between OS and distributed applications
Middleware reduces the number, size and complexity of integration
Open Standard Middleware
Oracle SOA Suite ( BPEL), Oracle BPM Suite,
Web Sphere Process Server
Proprietary Middleware
IBM WebSphere MQ, WMB etc.
Process-Oriented Middleware (POM)
Oracle SOA Suite ( BPEL), Oracle BPM Suite, WPS Message-Oriented Middleware (MOM)
E.g.:. IBM MQ, MS-MQ, Tortoise MQ, WMB, Oracle Service Bus etc.
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Middleware Products
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
Commercial Open Source
IBM MQ
IBM WebSphre ESB
IBM Integration Bus
Oracle Enterprise Service Bus ( OSB)
web methods ESB(SoftwareAG)
(TIBCO) ActiveMatrix™ Service Bus
Microsoft BizTalk Server
Neudesic Neuron-ESB
Progress Sonic ESB
JBoss ESB
Open ESB
Mule ESB
Spring Integration
Apache ServiceMix
Apache Synapse
MassTransit
NetKernel
Petals ESB
Note : In the above table IBM MQ is specifically built for asynchronous data transfer or data transport. That is MQ is a middleware which can hold huge volume of data in between applications but cannot use for transformation, roaring etc. IBM WebSphere ESB, IBM Integration Bus, Oracle Service Bus etc are middleware ESB’s which can be use as a middleware between multiple services across the enterprise applications. These middleware can also be used for transformation, routing, protocol conversion etc but it cannot hold huge volume of data without the help of an internal or external queue.
Java Message Services
Shyju, Sathi Raghavan
Application Integration Various Methods (Contd..)
JMS API Supports Point to Point and Publish and Subscribe
Point-to-Point
Pub/Sub
Online Broker Servers
Shyju, Sathi Raghavan
Prompt$> curl ftp://brokerweburl.com -F “pictures=dog.gif, cat.gif” -u username:password -x proxy.com:888
Prompt$> curl -u username: --key ~/.ssh/id_dsa
Brokers for Sharing data feeds between organizations
Can have data processing and transformation capabilities
Curl utility can be used for automating upload to the Broker web server
Application Integration Various Methods (Contd..)
API or Library based Integration
Shyju, Sathi Raghavan
Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters
Supports Enterprise Integration Patterns
Spring Integration
A Lightweight Integration Approach specifically aimed for integrating Java or spring based applications
Channel Patterns for transport message Point to Point and Pub/Sub
Message Pattern for design message Return address and co-relation id
Routing pattern for route the message to the proper destination Router, Splitter and Aggregator
Transformation pattern for transform the message to required format Data enricher and content filter
End point pattern for produce and consume messages Pooling consumer, event driven consumer
Management pattern for manage and test the system Message store and test message
Application Integration Various Methods (Contd..)
Application Integration SOA & Integration SOA is a business-centric IT architectural approach that supports integrating
your business as linked A service is a self-contained unit of software that performs a specific task A service has three components: an interface, a contract, and
implementation Integrate applications which are running in various locations and various
platforms to make these applications as a single unit Re-using the existing functionalities. In a service oriented architecture, services can be combined with other
available services in a network through service orchestration to create higher-level composite services and applications
Shyju, Sathi Raghavan
XML Parsers (DOM & SAX)
Shyju, Sathi Raghavan
Data Processing Various Methods
JAXP XERCES XPATH XQuery
XML Binding
JAXB
XSLT Processor Saxon Xalan-Java
Batch Processing Spring Batch Mainframe Jobs
Various Products
ESB, Process Server, ETL Tools for Database level processing
ESB
Shyju, Sathi Raghavan
An ESB is a middleware solution that enables interoperability among heterogeneous environments using a service-oriented model
For interaction and communication between mutually interacting software applications in Service Oriented Architecture (SOA)
Reducing the number, size and complexity of interfaces
Transformation, Routing & Protocol Conversion
Definition of "ESB" differs between the various vendors
Data enrichment from multiple services
Event Handling
Routing – Header based and Content based
Loosely coupling
Seamless/smooth connectivity
Non persistence in nature
Process Server / Process Manager For Business Process Automation
BPEL Engine / Service Engine
Server for executing BPEL
Process orchestration engine / Service Orchestration
Process the actions ( Human Tasks)
Persistence in nature
Follows standards such as BPEL, XML, XSLT, XPath, JMS, JCA
Runs on top of Application server
Layers on top of SOA, SCA
Shyju, Sathi Raghavan
ESB Vs. Process Server - Which should you use?
Shyju, Sathi Raghavan
If the requirement is data-centric, an ESB is the clear choice
If the requirement is process-centric, BPEL is the clear choice
• ESB is designed to be able to handle large volumes of messages
• When the requirements clearly call for message processing, an ESB is going to have several advantages
• If the requirements call for one of the basic ESB functions, such as message routing, transformation or protocol mediation, an ESB would be the clear choice.
• Should not use an ESB when state is required
• Should not include business logic in ESB
• The main strength of a BPEL engine is the ability to orchestrate business process
• Ability to handle Human Task and Business Rules
• Ability to have a long-running business process where state is maintained
• WS-BPEL can handle more complex logic including business logic.
• Should not use BPEL for handling large volume of messages