A Guide to Middleware Architectures and Technologies (2)
Application Servers
Chapter 4: Essential Software Architecture
Middleware Classification
BizTalk, TIBCO StaffWare, ActiveBPEL BizTalk, WebSphere Message Broker, SonicMQ J2EE, CCM, .NET
Business Process Orchestrators
Message Brokers Application Servers Transport
Message-Oriented Middleware, Distributed Objects Systems
Application Servers
An application server is a component-based server technology It resides in the middle-tier of an N-tier architecture, It provides distributed communications, security, transactions and persistence We will cover an overview of Java EE and EJB
N-Tier architecture for web applications
Internet InterORB Protocol IIOP.NET allows a seamless interoperation between .NET, CORBA and J2EE distributed objects.
http://www.codeproject.com/Articles/4450/Building-a-Distributed-Object-System-with-NET-and
N-Tier architecture for web applications
The client tier typically comprises an Internet browser that submits HTTP requests and downloads HTML pages from a web server. This is commodity technology, not an element of the application server.
N-Tier architecture for web applications
The web tier runs a web server to handle client requests. When a request arrives, the web server invokes web server-hosted components such as Servlets, Java Server Pages (JSPs) or Active Server Pages (ASPs) depending on the flavor of web server being used.
6
Servlet vs JSPs
A very basic difference:
Servlet is html in java JSP is java in html. Also ASP is asp (jscript/vbscript) in html
JSP is a webpage scripting language that can generate dynamic content while Servlets are Java programs that are already compiled which also creates dynamic web content Servlets run faster compared to JSP JSP can be compiled into Java Servlets Its easier to code in JSP than in Java Servlets In MVC, JSP act as a view and servlet act as a controller. See more here: http://stackoverflow.com/questions/4965914/java-jsp-vs-servlet
N-Tier architecture for web applications
The business components comprise the core business logic for the application. The business components are realized by, e.g., Enterprise JavaBeans (EJB) in JEE, .NET components or CORBA objects.
A run-time environment called container accommodates the components. The container supplies a number of services to the components it hosts. These vary depending on the container type but include transaction and component lifecycle management, state management; security, multithreading and resource pooling.
Servlet Vs Enterprise JavaBeans
EJB are components meant to encapsulate business logic They do not handle presentation. EJBs execute inside an EJB container A very common model is for a servlet to act as a client of a session bean (a kind of EJB) One of the ideas behind EJBs is to componentize server-side business logic and move it closer to the database. EJBs and servlets will typically not run on the same server. A key thing to remember is that both EJBs and servlets must execute inside of a container.
For servlets, this is usually a Web server interfaced with a servlet engine. For EJBs, this is an EJB server such as the reference implementation provided with the Java 2 EE
9
See: EJBs Vs Servlets: http://www.devx.com/tips/Tip/26360
N-Tier architecture for web applications
This typically consists of one or more databases and back-end applications like mainframes and other legacy systems. The business components must query and interact with these data stores to process requests
10
J2EE Vision
11
Client Server Applications:
DEVELOPERS Responsibilities
Networking code to communicate from client to server
Security code to ensure the confidentiality of data Programming the server to give high performance Pooling capabilities
Infrastructure code
and at last is the business logic what client has asked
12
Identification of the common requirements.
Sun has released the JSR specification in 1999 for the container development
Some of the vendors:
BEA Systems IBM Apache JBOSS
And many more
13
J2EE MVC Architecture
VIEW CLIENT CONTROLLER (e.g., servlet)
MODEL
(e.g., JAVA BEANS/ EJB)
DB
EJB container
MODEL VIEW CONTROLLER
14
15
List of APIs in J2EE
1.SERVLETS 2.JSP 3. JSTL 4. JNDI 5. JDBC 6. JMX 7. RMI-IIOP 8. EJB3 9.JAVA-IDL 10. JMS 11. JCA 12. JAX-RPC 13. JAXP 14. STAX 15. JSF 16. JAAS
16
DEVELOPMENT of makeMyTrip.com
CLIENT JMS SERVLET J D B C
BANK
JSP EJB/MODEL
DB
JAX-RPC
RMI-IIOP JAVA-IDL
SOAP
SOAP
JCA
CORBA
SPICE JET EJB CONTAINER
AIR BLUE .NET application
SHAHEEN Airways
PIA ON MAINFRAMES
17
Java IDL vs RMI-IIOP
http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=%2Fcom.ibm.j ava.doc.diagnostics.50%2Fdiag%2Funderstanding%2Forb_rmi_rmiiiop.html
RMI-IIOP is the method that is chosen by Java programmers who want to use the RMI interfaces, but use IIOP as the transport. RMI-IIOP requires that all remote interfaces are defined as Java RMI interfaces. Java IDL is an alternative solution, intended for CORBA programmers who want to program in Java to implement objects that are defined in IDL.
18
JAX-RPC
JAX-RPC stands for Java API for XML-based RPC. It's an API for building Web services and clients that used remote procedure calls (RPC) and XML. In JAX-RPC, a remote procedure call is represented by an XML-based protocol such as SOAP. The SOAP specification defines:
envelope structure, encoding rules, and a convention for representing remote procedure calls and responses.
These calls and responses are transmitted as SOAP messages over HTTP
19
JAC - J2EE Connector Architecture
The J2EE Connector architecture defines a standard architecture for connecting the J2EE platform to heterogeneous EIS systems. Examples of EIS systems include ERP, mainframe transaction processing, database systems, and legacy applications - not written in the Java programming language.
20
Connectors Summary
Client tier Web Tier Business Component tier EIS Tier
HTTP Browser-based client applications (HTML, applets, DHTML/scripting)
Web server
RMI
Servlets, JSPs Application components EJBs
JCA
Java RMI Java client applications
Container Services Components eg. JTS, JMS
ERPs, CRMs, Mainframe TP systems
JDBC RDBMS
CAS COM Bridge, RMI over IIOP Windows/COM client applications
21
Assignment # 3
Write one 10 page summary on 10 of the following APIs. One page each. Submission 13th week (8 May 13)
1. JMS 2. JSP 3. JSTL 4. JNDI 5. JDBC 6. JMX 7. JAAS 8. EJB3 9. JAVA-IDL
10. JAXP 11. STAX 12. JSF
22
END
23