app server web server
TRANSCRIPT
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 1/44
Application Server & Web ServerApplication Server & Web ServerDesigned By:Designed By:
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 2/44
ContentsContents RecapRecap--evolutionevolution
QuestionsQuestions
Applying 3 tier architecture on web Applying 3 tier architecture on web Applying n tier architecture on web Applying n tier architecture on web
Challenges of n tier architectureChallenges of n tier architecture
Implementing the middle tierImplementing the middle tier
transaction processing (TP) monitors,transaction processing (TP) monitors, message servers,message servers,
object request brokers ( object request brokers ( ORBsORBs ) )
or application servers.or application servers.
Web Servers vs. App Servers: Choosing Between the Two Web Servers vs. App Servers: Choosing Between the Two
Primary functions of a web server and application serverPrimary functions of a web server and application server
Introduction to components and framework Introduction to components and framework
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 3/44
The evolution of
application architectures
Standalone - Application lives on client
Client/server Database server, client does
the thinking
Three-tier - Database, business service, client
N-tier -Database, many business services, client
Migratory architecture Intelligent agents, distributedcalculations, distributed clients
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 4/44
Some questions and AnswersSome questions and Answers
Q) What is a threeQ) What is a three--tier architecture?tier architecture?
A) A) A threeA three--tier architecture is any systemtier architecture is any systemwhich enforces a general separationwhich enforces a general separation
between the following three parts:between the following three parts:
1.1.Client TierClient Tier or user interfaceor user interface
2.2.Middle TierMiddle Tier or business logicor business logic
3.3.Data Storage TierData Storage Tier
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 5/44
Applying 3 tier architecture to web Applying 3 tier architecture to web
Applied to web applications and distributedApplied to web applications and distributed
programming, the three logical tiers usuallyprogramming, the three logical tiers usuallycorrespond to the physical separation betweencorrespond to the physical separation between
three types of devices or hosts:three types of devices or hosts:
1.1.BrowserBrowser oror GUI ApplicationGUI Application2.2.Web ServerWeb Server oror Application ServerApplication Server
3.3.Database ServerDatabase Server (often an RDBMS or(often an RDBMS or
Relational Database)Relational Database)
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 6/44
NN-- Tier Tier
NN--Tier: An unlimited number of tiers.Tier: An unlimited number of tiers.
Each tier may have multiple computers.Each tier may have multiple computers. Advantages:Advantages:
More powerful applicationsMore powerful applications
Many services to many clientsMany services to many clients Enhanced security, scalability and availabilityEnhanced security, scalability and availability
Disadvantages:Disadvantages:
Much more complicated to design and modelMuch more complicated to design and model
Performance risksPerformance risks
Reliability is more difficult to achieveReliability is more difficult to achieve
More difficult to maintain softwareMore difficult to maintain software
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 7/44
N TIER ARCH
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 8/44
Major quality attributesMajor quality attributes
PerformancePerformance
ReliabilityReliability UsabilityUsability
SecuritySecurity AvailabilityAvailability
ScalabilityScalability
MaintainabilityMaintainability
Effects of NEffects of N--Tier architecturesTier architectures
CCh ll f N Ti
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 9/44
Challenges of NChallenges of N--TierTier
ArchitecturesArchitectures•Communication and distribution is usually handled by
bought middleware (CORBA, EJB, DCOM, etc)
• Software becomes heterogeneous and parallel
• A lot to learn about the new technologies
• Distributed object application servers are
expensive (BEA's Weblogic, IBM's WebSphere)
• Designing truly reusable objects is difficult
– the design must be high quality
– they may not satisfy the needs of future systems
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 10/44
a enges oa enges o -- ererArchitectures (2)Architectures (2)
General distributed object protocols are slowGeneral distributed object protocols are slow
– – This is usually not important because theThis is usually not important because the
internet is so slow, and if it is, more speed caninternet is so slow, and if it is, more speed canusually be achieved by adding more hardwareusually be achieved by adding more hardware
Load balancing is quite difficult: distributingLoad balancing is quite difficult: distributing
requests to computers such that eachrequests to computers such that eachcomputer does approximately the same workcomputer does approximately the same work
In small systems, everything is simple, but inIn small systems, everything is simple, but inlargelarge
systems, the overall software design is crucial tosystems, the overall software design is crucial to
productproduct
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 11/44
Implementing the middle tierImplementing the middle tier
There are a variety of ways of implementingThere are a variety of ways of implementing
this middle tier, such as usingthis middle tier, such as using
transaction processing (TP) monitors,transaction processing (TP) monitors,
message servers,message servers,
object request brokers (object request brokers (ORBsORBs) (Assignment)) (Assignment)
or application servers.or application servers.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 12/44
Transaction processing monitor Transaction processing monitor
TP monitor technology is software that is also referred to
as Middleware. It can provide application services tothousands of clients in a distributed client/server
environment.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 13/44
Transaction monitors Transaction monitors
Transaction monitors (a.k.a. transaction processing monitors,Transaction monitors (a.k.a. transaction processing monitors,
a.k.a. TP monitors) were thea.k.a. TP monitors) were the first kind of middlewarefirst kind of middleware to supportto support
distributed transaction processing,distributed transaction processing, and thus also theand thus also the first kind of application servers.first kind of application servers.
They were (originally)They were (originally) designed fordesigned for environments withenvironments with veryvery
high processing demandshigh processing demands, such as banks or airlines, that could, such as banks or airlines, that couldnot be properly supported by 2not be properly supported by 2--tier architectures and by DBMStier architectures and by DBMS
alone.alone.
Architectures using transaction monitors as middleware forArchitectures using transaction monitors as middleware for
transaction control are also called TPtransaction control are also called TP--heavy transactionheavy transaction
processing environments, because this solution is much heavier tprocessing environments, because this solution is much heavier too
implement.implement.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 14/44
TP TP--Process managementProcess management
This figure illustrates the point why process management by TP monitors is sobeneficial for performance. Assume 1000 clients are accessing a (database)
application, and each of the requests is handled individually by the DBMS. Then
the OS has to deal with the numbers given in the figure above.
By sharing resources using a TP monitor, in particular connections and processes,
the requirements for the OS are substantially reduced and the OS is fine.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 15/44
TP TP TP monitor technology maps numerous client requests through TP monitor technology maps numerous client requests through
application services routines to improve system performance.application services routines to improve system performance.
The The TP monitor technology (located as a server) TP monitor technology (located as a server) can also take thecan also take theapplication transitions logic from the client.application transitions logic from the client.
This This reducesreduces the number of the number of upgradesupgrades required by these client platforms.required by these client platforms.
In addition, TP monitor technology includes numerous managementIn addition, TP monitor technology includes numerous managementfeatures, such asfeatures, such as restarting failed processesrestarting failed processes,, dynamic load balancing dynamic load balancing , and, andenforcing enforcing consistency of distributed dataconsistency of distributed data..
TP monitor technology is easily scalable TP monitor technology is easily scalable by adding more servers to meetby adding more servers to meet
growing numbers of usersgrowing numbers of users
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 16/44
A typical TP monitor technology providesA typical TP monitor technology provides
the ability tothe ability to update multiple differentupdate multiple different DBMSsDBMSs in ain asingle transactionsingle transaction
connectivity to a variety of data sources including flatconnectivity to a variety of data sources including flat
files, nonfiles, non--relationalrelational DBMSsDBMSs and evenand even mainframemainframe
systemssystems the ability to attach priority to transactions and to givethe ability to attach priority to transactions and to give
robust securityrobust security
For systems with thousands of users, TP monitorFor systems with thousands of users, TP monitortechnology has been one of the most effectivetechnology has been one of the most effective
solutions.solutions.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 17/44
ProductsProducts
Products such as IBM CICSProducts such as IBM CICS
IMS,HPIMS,HP NonStopNonStop™™ Pathway, ACIPathway, ACI BASE24/XPNETBASE24/XPNET
BEA Tuxedo, etc.BEA Tuxedo, etc.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 18/44
As client devices became intelligent and as theAs client devices became intelligent and as the
demand to integrate resources from more than onedemand to integrate resources from more than one
platform increased, there was a need to evolve TPplatform increased, there was a need to evolve TP
monitors to better meet the business needs.monitors to better meet the business needs.
Open was one attribute rarely applied to these TPOpen was one attribute rarely applied to these TPmonitors.monitors.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 19/44
Message serverMessage server
A messaging server is a middleware program that handles A messaging server is a middleware program that handles
messagesmessages that are sent for use by other programs using athat are sent for use by other programs using a
messaging messaging application program interface ( application program interface ( API API ). ).
A messaging server can usually queue and prioritize messages A messaging server can usually queue and prioritize messages
as needed and saves each of the client programs from having as needed and saves each of the client programs from having to perform these services.to perform these services.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 20/44
Message ServerMessage Server messaging is the exchange of messaging is the exchange of messagesmessages (specially (specially --
formatted data describing events, requests, and replies)formatted data describing events, requests, and replies)to ato a messaging servermessaging server, which acts as a message exchange, which acts as a message exchange
program for client programs.program for client programs.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 21/44
ProductsProducts
IBM'sIBM's MQSeriesMQSeries and Sun Microsystems Javaand Sun Microsystems Java
Message Service ( Message Service ( JMS JMS ) are examples of products ) are examples of productsthat provide messaging interfaces and services.that provide messaging interfaces and services.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 22/44
MQ SeriesMQ Series
MQ Series is "Message Oriented Middleware".MQ Series is "Message Oriented Middleware".
It uses a named queue model to implement nearIt uses a named queue model to implement near--realreal--time messaging, with guaranteed delivery. What thistime messaging, with guaranteed delivery. What this
means is that it is like email++.means is that it is like email++.
You have a sender, receiver and a message body. The You have a sender, receiver and a message body. The
big difference is that instead of a SMTP server, youbig difference is that instead of a SMTP server, you
have MQ Series.have MQ Series.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 23/44
Assignment Assignment--11
Difference between TP and message serverDifference between TP and message server
A li ti
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 24/44
Application serverThey are also called “middleware”
• Application servers are software that
runs on the middle tier of an n-tierenvironment
• An Application Server is used to run
business logic or dynamically generatedpresentation code.
• It can either be .NET based or J2EE
based (like Oracle9iAS, BEA WebLogicServer, IBM WebSphere, JBoss).
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 25/44
Web Servers vs. App Servers: Web Servers vs. App Servers:
Choosing Between the TwoChoosing Between the Two Web serversWeb servers are a familiar and necessaryare a familiar and necessary
component of the Internet.component of the Internet.
Application serversApplication servers are less familiar but also aare less familiar but also a
necessary element for at least some aspects of necessary element for at least some aspects of
the Internet.the Internet.
W b d li i
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 26/44
Web servers and application Web servers and application
serversservers Web servers and application servers are notWeb servers and application servers are not
mutually exclusive.mutually exclusive.
And in the corporation their functions canAnd in the corporation their functions can
certainly overlap:certainly overlap:
t h e r e ar e m an y , m an y W eb ser v er s t h a t t h e r e ar e m an y , m an y W eb ser v er s t h a t a re ser v i ng d at a f r om a da t abase a re ser v i ng da ta f r om a dat abase ..
while there are more and more applicationwhile there are more and more application
servers serving up basic Web pages.servers serving up basic Web pages.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 27/44
Web server and app server Web server and app server--
two different pieces of softwaretwo different pieces of software While a Web server and an application server can run on the sameWhile a Web server and an application server can run on the same
computercomputer (though usually not) these are two quite different pieces(though usually not) these are two quite different pieces
of software. There are few Web servers in common use:of software. There are few Web servers in common use: Apache takes the lionApache takes the lion’ ’ s share, while Microsoft Internet Informations share, while Microsoft Internet Information
Server (IIS) andServer (IIS) and iPlanetiPlanet Web Server are among the others.Web Server are among the others.
Application serversApplication servers jumped into the limelight only about jumped into the limelight only about two yearstwo years
agoago and there is a proliferation of products from companies suchand there is a proliferation of products from companies suchas BEA,as BEA, iPlanetiPlanet, Oracle,, Oracle, SilverStreamSilverStream, HP (Bluestone), and IBM., HP (Bluestone), and IBM.
Microsoft doesnMicrosoft doesn’ ’ t have a product it labels an application server,t have a product it labels an application server,
but the BizTalk Server is similar in functionality.but the BizTalk Server is similar in functionality.
P i f i f bP i f ti f b
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 28/44
Primary functions of a webPrimary functions of a web
serverserver The Web server, in general, sends Web pages to browsers as itsThe Web server, in general, sends Web pages to browsers as its
primary functionprimary function..
Most Web servers also process input from users, format data,Most Web servers also process input from users, format data,provide security, and perform other tasks.provide security, and perform other tasks.
The majority of a Web serverThe majority of a Web server’ ’ s work is to execute HTML ors work is to execute HTML or
scripting such as Perl, JavaScript, or VBScript.scripting such as Perl, JavaScript, or VBScript.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 29/44
Web server Web server A Web serverA Web server handles the HTTP protocolhandles the HTTP protocol..
When theWhen the Web server receives an HTTP requestWeb server receives an HTTP request, it responds with, it responds with
an HTTP response, such as sending back an HTML page.an HTTP response, such as sending back an HTML page. To process a requestTo process a request, a Web server may respond with, a Web server may respond with
a static HTML page or imagea static HTML page or image
send a redirect, or delegate the dynamic response generationsend a redirect, or delegate the dynamic response generation
to some other program such asto some other program such as CGI scripts,CGI scripts, JSPsJSPs ((JavaServerJavaServer Pages),Pages), servletsservlets, ASPs, ASPs
(Active Server Pages), server(Active Server Pages), server--sideside JavaScriptsJavaScripts, or some, or some
other serverother server--side technology.side technology.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 30/44
Web server Web server Whatever their purpose, such serverWhatever their purpose, such server--sideside
programs generate a response, most often inprograms generate a response, most often in
HTML, for viewing in a Web browser.HTML, for viewing in a Web browser.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 31/44
The Web Server ModelDatabase
Server
Web
Server
Application
Server
CGI
CGI
HTTP over
TCP/IP --
The ’Net
HTTP over
TCP/IP --The ’Net
HTML
documents
VBScript, ASP,JSP
Perl, PHP, Tcl
Client browser:
HTML forms,
JavaScript,
VBScript, Java
Some application tierSome application tier
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 32/44
Some application tierSome application tier
technologiestechnologies
•• CGI scriptsCGI scripts-- one of the earliest server one of the earliest server --side options (supported by most webside options (supported by most web
servers)servers)-- resource intensive: a process created for every requestresource intensive: a process created for every request (heavy(heavy--
weight processes)weight processes)
•• ASP ASP (HTML embedding VBScript or JavaScript)(HTML embedding VBScript or JavaScript)
-- currently available only on Windows only via IIS (Microsoft)currently available only on Windows only via IIS (Microsoft)•• ProprietaryProprietary API API’’ss from Netscape (NSAPI), Microsoft Internetfrom Netscape (NSAPI), Microsoft Internet
Server APIServer API-- normally written in C/C++; vendor specific, fastnormally written in C/C++; vendor specific, fast
•• JavaJava ServletsServlets , Java Server pages (, Java Server pages (JSPJSP) (Referred to as) (Referred to as J2EEJ2EE))-- Wide support from Netscape, Sun, Apache, Oracle, IBM runs on moWide support from Netscape, Sun, Apache, Oracle, IBM runs on morere
than just Windowsthan just Windows
-- third party support (third party support (JRunJRun))
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 33/44
Delegation model of web serverDelegation model of web server Web server's delegation model is fairly simple.Web server's delegation model is fairly simple.
When a request comes into the Web serverWhen a request comes into the Web server, the Web server, the Web server
simplysimply passespasses the request to the program best able to handle it.the request to the program best able to handle it. The Web server doesn't provide any functionality beyond simplyThe Web server doesn't provide any functionality beyond simply
providing anproviding an environment in which the serverenvironment in which the server--side program canside program can
executeexecute and pass back the generated responses.and pass back the generated responses.
The serverThe server--side program usually provides for itself such functionsside program usually provides for itself such functionsasas transaction processingtransaction processing,, database connectivitydatabase connectivity, and, and messagingmessaging..
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 34/44
App servers App servers While aWhile a Web server may not itself supportWeb server may not itself support
transactions or database connection poolingtransactions or database connection pooling, it, it
may employ various strategies formay employ various strategies for
fault tolerancefault tolerance andand scalabilityscalability such as loadsuch as load
balancing, caching, and clusteringbalancing, caching, and clustering
——
featuresfeatures
often times erroneously assigned as featuresoften times erroneously assigned as features
reserved only forreserved only for applicationapplication servers.(seeservers.(see later)later)
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 35/44
Web application server Web application server--facilitiesfacilities A web application server will typically provide facilities A web application server will typically provide facilities
forfor
authenticationauthentication ("Who are you?")("Who are you?")
authorizationauthorization ("Are you supposed to be here?")("Are you supposed to be here?")
session managementsession management ("Have you been here before?")("Have you been here before?") database abstractiondatabase abstraction ("Which of these products are you("Which of these products are you
interested in?")interested in?")
presentationpresentation ("How do you want to view this?") and so on.("How do you want to view this?") and so on.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 36/44
Application Server: Key Services
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 37/44
JBoss- Application Server
FIND SOME APPLICATION SERVERS
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 38/44
Apache Apache or any other commonor any other common web web serverserver cancan’’tt
handlehandle ServletsServlets nor JSP.nor JSP. So we use theSo we use the Tomcat Tomcat serverserver from thefrom the Apache Apache
subsub--project named Jakartaproject named Jakarta
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 39/44
Application types Application types The applications that run on an application server can be bro The applications that run on an application server can be broadly adly
classified as follows:classified as follows:
Bank or eBank or e--commerce type applicationscommerce type applications ---- These applications These applicationsconstitute the majority of those hosted on application servers.constitute the majority of those hosted on application servers. The main The mainelements they rely on areelements they rely on are JavaServer JavaServer Pages (JSP) components, JavaPages (JSP) components, Javaservletsservlets, and HTTP access. Typically, security is achieved through, and HTTP access. Typically, security is achieved through
authentication and SSL, with data requested from a database.authentication and SSL, with data requested from a database. Web service applications Web service applications ---- Many applications are built as WebMany applications are built as Web
services to enable interoperability and reuse. The main ingredieservices to enable interoperability and reuse. The main ingredients arents areHTTP access, XML transformations, JSP components, and JavaHTTP access, XML transformations, JSP components, and Java
servletsservlets..
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 40/44
Wireless applications Wireless applications ---- These applications are accessed from multiple These applications are accessed from multiple
devices, typically with the underlying HTTP/S transport. Becausedevices, typically with the underlying HTTP/S transport. Because many many
applications rely on alerts or notifications, JMS plays a key roapplications rely on alerts or notifications, JMS plays a key role in thele in theapplications. The main components are HTTPapplications. The main components are HTTP-- WAP [Wireless Access WAP [Wireless Access
Protocol], XML transformation, JSP components, and JavaProtocol], XML transformation, JSP components, and Java servletsservlets..
Desktop Java applicationsDesktop Java applications ---- These are thick client applications that These are thick client applications thataccess, through theaccess, through the RMI/IIOPRMI/IIOP ( ( I I nternet nternet I I nter nter - - O O RBRB P P rotocol rotocol )mechanism, )mechanism,
the business logic hosted in the EJB components.the business logic hosted in the EJB components.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 41/44
componentcomponent
Component Component – – a replaceable part of a system thata replaceable part of a system thatprovides a clearly defined function through a set of provides a clearly defined function through a set of
interfaces.interfaces.
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 42/44
Characteristics of Components
– Used for specific commonly usedpurpose
– Collection of classes and interfaces
– Hidden implementation details
– Plug-and-play capability– Third-party developed, typically in binary
form
– Reusable in many applications
– Well-tested and relatively error-free
Wh t I C t St d d?
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 43/44
What Is a Component Standard?
• An agreed-upon format for defining interfaces andimplementations of components
• Examples:
– Microsoft COM+
– OMG’s CORBA
– Sun Microsystem’s Enterprise Java Beans (EJB)
– Database Middleware Standards (ODBC, ADO,
JDBC)
– XML/SOAP
8/14/2019 App Server Web Server
http://slidepdf.com/reader/full/app-server-web-server 44/44
What Is a Framework?
A collection of components, consisting of code and interfaceswritten in a specific language, that solves or helps buildapplications.
Two main competitors:
• Microsoft .NET
• Sun Java 2 Enterprise Editiion (J2EE)