Sunteți pe pagina 1din 42

Introduction To Web Architecture

1
Course Objectives
• Understand the Request - Response Cycle

• Understand the various options available in terms of servers

• To be able to understand the various types of components of a web application

• Understand interaction between the components

• Understand the tier-ed architecture of Internet Applications

ER/CORP/CRS/OS30/003
Copyright © 2004, 2
Infosys Technologies Ltd Version no: 2.0

This course covers


Http Request and it’s contents
Http Response and it’s contents
Introduction to various Web servers
Introduction to various types of components
N Tier architecture

2
Course Objectives (Contd…)
• To be aware of the issues involved in security, performance at the client and server
end

• Understand the need of Confidentiality, Authentication, Authorization, Performance


Management for web applications

• To appreciate architecture documents

• Overview of basic Sun Architecture

• Overview of basic Microsoft Architecture

ER/CORP/CRS/OS30/003
Copyright © 2004, 3
Infosys Technologies Ltd Version no: 2.0

Awareness of the security, performance issues in web applications.

The second chapter covers architecture documents, Sun Architectures, Microsoft


Architectures etc.

3
Session Plan
• 1 lecture session

– Basics of Web Architecture

– Overview of Sun and Microsoft Architectures

ER/CORP/CRS/OS30/003
Copyright © 2004, 4
Infosys Technologies Ltd Version no: 2.0

The first chapter covers overview of World Wide Web, the meaning of basic terms popularly
used in architecture documents of web applications.
It also covers awareness about security and performance related issues.
Few sample Architecture documents using Microsoft and Sun Technologies are covered in
the second chapter.

4
References
• “Current Web Architecture” found online at
http://www.objs.com/survey/WebArch.htm

• “Introduction to Web Architecture“ found online at


http://www.w3.org/2001/tag/2002/11ac-tag-tb/

• “Architecture of the World Wide Web” found online at


http://www.w3.org/TR/webarch/

• Andres, Great web architecture book, IDG books,1999

• Derek & Atkins, Internet Security - Professional Reference, Publisher Techmedia,


2001

• Comer Douglas E, Computer Networks and Internets 2nd edition, Publisher Prentice
Hall, 2000

ER/CORP/CRS/OS30/003
Copyright © 2004, 5
Infosys Technologies Ltd Version no: 2.0

5
Basics of Web Architecture
Topic Estimated Duration

Basic Terms in Web Architecture 20 min

Web Servers 20 min

Components of a Web Application 30 min

Issues involved in security, performance of 30 min


Web applications

ER/CORP/CRS/OS30/003
Copyright © 2004, 6
Infosys Technologies Ltd Version no: 2.0

This chapter covers the meaning of basic terms like Web Server, App Server etc.
It also covers the working of Web Servers , various components hosted by the servers
The chapters aims at introducing security, performance issues of Web applications

6
Differences in Internet and World Wide Web

• Internet : The Internet is


– a network of networks
– Information travels over the Internet, via a protocols (TCP/IP)

• The World Wide Web, (popularly known as web) is


– the way of accessing information over the medium of the Internet.
– the model of sharing information and that's why is sits on the of the Internet

ER/CORP/CRS/OS30/003
Copyright © 2004, 7
Infosys Technologies Ltd Version no: 2.0

7
Web Architecture
• Why architect the Web Applications?

• What is N "Tier“ architecture?

ER/CORP/CRS/OS30/003
Copyright © 2004, 8
Infosys Technologies Ltd Version no: 2.0

Usually developers would like to attack the programming as soon as they encounter a
problem.
We must realize there is lot more to programming than simple coding.
Coding web-application without architecting it can result in critical problems at the later stage
because Web applications run under environments like browser, web servers , application
servers and they communicate using specific protocols like HTTP
One can compare this to building a huge complex without involving a good architect or by by-
passing the Architecture stage.
The architecture is the winning factor of the web-application ( which might become the losing
factor if not handled properly).

In this course we will talk about architecting the Web applications and the importance of the
same.

What is usual N “Tier” architecture of Web applications?


In an web application, usually the terms tier and layer are used interchangeably.
N "Tier” architecture can be defined as two or more levels arranged one above another
where each level serving distinct and separate tasks like presentation, business logic, data
access etc.
Any number of such levels (or tiers) can be arranged above another.
Web Applications usually use N-tier architecture because it provides a model for flexible
/reusable/ maintainable application.
By breaking up a system into tiers, developers only have to modify or add a specific tier,
rather than rewriting the whole application
, if a particular tier (say database) needs change or if the application needs to scale up.

An example for the same in real –life is that a CAR is more scalable than 3 wheeler which is
more scalable than a Bi-Cycle.

8
N "Tier” architecture
• Data Tier
– also known as back end tier

• The Presentation Tier


– also known as front end tier

• The Business Logic Tier


– also known as brain of the application

ER/CORP/CRS/OS30/003
Copyright © 2004, 9
Infosys Technologies Ltd Version no: 2.0

Data Tier: Is always a part of Web-application.


Though System can exist without data tiers, all real-life examples explicitly need a data tier
to handle the complex requirements of data storage.
This layer is the Database Management System (usually RDBMS).
It can be very complex like a high-end product (Oracle/SQL Server), which do include
features like backups/recovery/query optimization etc.
Or it can be the simplistic plain text files.
Famous formats of structured, plain text files are CSV files, XML files, etc.
This tier is to deal with the storage and retrieval of the information.
It is not about manipulating or styling the data. It is also known as back end tier

The Presentation Tier : This layer provides an interface for the end user into your
application.
It takes the results of the Business Tier (mentioned below) and renders the data into formats
like HTML (for browser users) or WML (for Mobile users) or the other formats readable by
the end user of the system. It is also known as front end tier.

The Business Tier :This is called as brain of the application. It contains business rules used
for data manipulation etc. For example, if you're creating a application to calculate the tariff
of a courier then you might want to consider the details like weight, delicacy , mode of
sending for a courier. Also the discount depends on who is sending the courier etc. This
logic is called as business Logic.

9
Basic Terms in Web Architecture

• Web server
– E.g. Tomcat, IIS

• Application Server
– E.g. Weblogic, WebSphere

ER/CORP/CRS/OS30/003
Copyright © 2004, 10
Infosys Technologies Ltd Version no: 2.0

We will go through meaning of some basic terms before we understand the complete structure of
these tiers.

Web server
Is a computer that serves Web pages to specific clients like Web Browser.
When you type www.infosys.com in the browser, then it searches for a Web Server corresponding to
this URL on the web.
Every web server has an IP address and host name.
For example, the URL http://www.infosys.com sends a request to the server which maps to the
domain name infosys.com.
The Web server then fetches the page named index.html and sends it to your browser.

Any computer which has web server software (for ex: Apache/Tomcat) installed on the same is called
as Web server.
This machine is usually it is connected to the Internet so that it can be accessed from anywhere.
But for the servers which are used over intranet, the access is limited and that’s why they do not need
to have connection to Internet.

Application Servers
A machine having a software called Application Server( for example WebSphere/ Inprise Application
Server) installed on the same and which provides various services to many types applications is called
application server.
For Examples, An application might need to store it’s data in Database.
The ready made product called application server can help in this by creating the required connections
to the database. This reduces the burden on the application developer and helps in increasing
productivity.
Example: There are various companies who have developed application Server Products.
Example Weblogic by Bea, Oracle 11i AS Portal Server

10
Basic Terms in Web Architecture (Contd…)
• Directory service

• Search engines

• Persistence

ER/CORP/CRS/OS30/003
Copyright © 2004, 11
Infosys Technologies Ltd Version no: 2.0

Directory service
Directory service is repository for information about objects located on networks, such as applications,
files etc. Directory services provides a consistent way to name (or register) these objects when they
are created, describe their functionality, locate them from client machines, access their methods, and
provide secure way to connect to them.
With web applications, there are various network resources that need to be contacted from various
locations.
Such resources register themselves with Directory Service. While registering a unique name has to be
provided to these objects. Directory service acts as database to store this unique name and the
corresponding object.
The clients contact directory service to find the relevant objects by providing the corresponding name.
( Just like you use the telephone directory by providing the appropriate employee ID)
Directory Service then identifies these resources and makes them accessible to users according to the
access rules specified for the resource. Ideally, the directory service should be developed in such way
that the client need not depend on the network topology or protocols to access any resource.
For example Java Naming and Directory interface, Lightweight Directory Access Protocol

Search engines
A program that searches documents for specified keywords and returns a list of the documents that
match the specified keyword is called as Search engine.
For ex: Google.com
Although search engine is generic word, the term is often used to specifically describe systems like
Google, Alta Vista and Excite that enable users to search for documents on the World Wide Web

Persistence service
Persistence Service is offered by various application servers to persist the volatile data into the
database. The volatile data is usually in the form of Objects or sometimes in form of a new Markup
language named XML.
Persistence is the service which can automate the storage of this volatile data into the database

11
Basic Terms in Web Architecture (Contd…)
• Load balancing

• Transaction management

• Authentication / authorization service

ER/CORP/CRS/OS30/003
Copyright © 2004, 12
Infosys Technologies Ltd Version no: 2.0

Load balancing
Load balancing is distributing processing and communications activity evenly across a
computer network so that no single device is overwhelmed. Load balancing is especially
important for networks where it's difficult to predict the number of requests that will be issued
to a server. Busy Web sites typically employ two or more Web servers in a load balancing
scheme. If one server starts to get swamped, requests are forwarded to another server with
more capacity. Load balancing can also refer to the communications channels themselves.

Transaction management
In the scenario of a web application, Transaction Management becomes even more crucial
because various clients would be contacting the same resource simultaneously. The code
included in the web application needs to clearly indicate the begin and the end of
transactions and the various isolation levels associated with a transaction. This can either be
done with code or can be done with the help of Application Server. Application Server
provides a facility to declare the isolation levels of transaction and auto generates code for
the same. This is called as Declarative Transaction management. It is one of the most
popular service provided by different application severs.

Authentication / authorization service


Authentication service helps is identifying a user and authorization service helps to find out
whether the user has access rights to the required resource. Example: JASS (Java
Authentication / authorization service) helps in fulfilling authentication / authorization
requirement

12
Web Servers

Web Browsers

HTTP
Web
Site Web Content
Web Server (HTML Pages)

ER/CORP/CRS/OS30/003
Copyright © 2004, 13
Infosys Technologies Ltd Version no: 2.0

Web Browser here acts as a Client providing us a means to send the request to the server.
Various browsers like Internet explorer and Netscape Navigator are famous products in the
browser market.
Web Server provides services to the clients which are sending request over HTTP protocol.

13
HTTP Protocol

Web Browser

Document HTTP/1.0 was the original


Server sends the
version
Request document to Browser

Web Server HTTP 1.1


Web server HTTP1.1. provides
Server retrieves
searches for Persistent Connection
the document
the document
on file system
File System

ER/CORP/CRS/OS30/003
Copyright © 2004, 14
Infosys Technologies Ltd Version no: 2.0

Client Server

Listens to Port 80 Connects to Port 80

Accepts the Connection Writes “GET/index.html HTTP/1.0 \n\n”

Reads up until the second end of the line


(\n)

Sees that the GET is the known


command

And that HTTP 1.0 is a valid protocol


version

Reads a local file named /index.html

Writes “HTTP/1.0 200 OK \n\n”.

Copies the contents of the file into the


socket

Reads the contents of the files


and displays it

Hangs up Hangs up

This last step of hanging up after each interaction was accurate with HTTP1.0
. HTTP1.1 provides Persistent Connection that can be used by the browser
for the next request/response. While using HTTP1.1 the connection would not
be closed. Instead the same connection is used in the next interaction by the
browser.

14
HTTP Protocol ( Contd …)

• HTTP defines a simple request -response protocol

• Client sends the Request to server - HTTP Request

• Server sends the Response to the client - HTTP Response

• Application Layer protocol on TCP/IP Suite

• Stateless Protocol

ER/CORP/CRS/OS30/003
Copyright © 2004, 15
Infosys Technologies Ltd Version no: 2.0

HTTP Request is sent to the server and the Server sends a response in the format that is
understood by the client.
Though this cycle sits on HTTP, the underlying still remains the TCP-IP.

What is Stateless:
Stateless means having no information about what occurred when the user previously
accessed this application.

Current applications maintain state, which means that they remember what you were doing
last time you used the application.
It means you can change the application according to a user’s previous interaction/ personal
likings in terms of fonts/colors.

The HTTP protocol is stateless because each request for a new Web page is processed
without any knowledge of previous pages requested.
This is one of the main drawbacks to the HTTP protocol.
So the programmer find it difficult to code the web sites that intelligently react to the user
input.

Because maintaining state is extremely useful, people have developed techniques to add
track the state.
These include server APIs, cookies etc. You will learn about cookies and these APIs in
further course.

15
Http Request : GET Vs POST method
Get Post

In the server script that handles the The form data is available on STDIN,which is a
submitted information, the form data is handle for the standard input . It defines the
retrieved from the QUERY_STRING input stream for the program.
environment variable .Environment
variables are the variables that are
automatically created by the server for
each process.

With POST, the data is not cached either in the


If the user bookmarks a GET page, the history or in the bookmark so it is more secure.
querystring info will also be saved with
it. A querystring also shows up in the
history list .Get isn’t very secure.

ER/CORP/CRS/OS30/003
Copyright © 2004, 16
Infosys Technologies Ltd Version no: 2.0

In GET, since the form data is part of the URL, ends up in the server logs while as in POST
data does not make it into the server logs

GET has a limit on the length of the querystring which depends on the browser (usually 255)
and there is almost no size limits on a HTTP header.

The data sent in the querystring is visible in the address bar and that’s why not very safe.
The data sent using the POST method is not visible in the address bar and that’s why it is
more safe.

16
HTTP Request

• An HTTP Request can have


– an initial line (method , URL, Protocol Ver. )
– Zero or More header lines (its configuration and acceptable doc formats)
– a blank line
– an optional message body (additional data)
• Demo : Eg. http://www.infy.com/index.html
• GET /index.html HTTP/1.0
• User_Agent: Mozilla/3.0Gold
• Accept: text/plain
• Accept: text/html

ER/CORP/CRS/OS30/003
Copyright © 2004, 17
Infosys Technologies Ltd Version no: 2.0

17
HTTP Response
• An HTTP Response can have
– Initial line or Status line ( Server HTTP Ver, Status-code, Reason)
– Headers - Description of the header info in the response
– Message body - Actual information requested

ER/CORP/CRS/OS30/003
Copyright © 2004, 18
Infosys Technologies Ltd Version no: 2.0

18
Example of HTTP Response
• Eg. Response for /index.html
• HTTP/1.0 Status 200 OK
• Server : NCSA/2.0
• Date: Mon, 10 Mar 2003 12:04:04 GMT
• Content-type: text/html
• Content-length: 5800
• Last-modified: <Actual Date>
• <html>
<head>
<title>XYZ Home Page</title>
</head>
<body>
... other content of /index.html ...

ER/CORP/CRS/OS30/003
Copyright © 2004, 19
Infosys Technologies Ltd Version no: 2.0

19
Various components of Web Application
• Web Servers host Various components of Web Applications E.g.
• Active Server Pages ( ASP) /ASP.NET
– Technology is developed by Microsoft.

– ASP uses scripting language as VB Script

– ASP .NET uses any compliant language like VB. NET or CSharp as scripting language

ER/CORP/CRS/OS30/003
Copyright © 2004, 20
Infosys Technologies Ltd Version no: 2.0

Active Server Pages


Abbreviated as ASP, a specification for a dynamically creating Web page with a .ASP
extension that uses scripting languages usually VB Script or Jscript code for creating the
dynamic web page. When a browser requests an ASP, the Web server generates a page
with HTML code and sends it back to the browser.

20
Various components of Web Application (Contd..)
• Java Servlets
– Technology is developed by Sun.

– Defined as Java Program best suited to handle and route Web requests

ER/CORP/CRS/OS30/003
Copyright © 2004, 21
Infosys Technologies Ltd Version no: 2.0

Java Servlets
Servlets are the units of Java programs that handle Web requests and routes the request to
the appropriate element for processing. It can also generate dynamic HTML but is not well –
suited for the same being a Java Program. This is a technology by Sun Microsystems.

21
Various components of Web Application (Contd..)
• Java Server Pages
– Technology is developed by Sun.

– Uses “Java” as a scripting language

ER/CORP/CRS/OS30/003
Copyright © 2004, 22
Infosys Technologies Ltd Version no: 2.0

Java Server Pages


Abbreviated as JSP, a specification for a dynamically creating Web page with a .JSP
extension that uses scripting language as Java for creating the dynamic web page. When a
browser requests an JSP, the Web server generates a page with HTML code and sends it
back to the browser.
This is a technology by Sun Microsystems.

22
Various components of Web Application (Contd..)
• Web Services
– Is a standard that can be implemented in many technologies

– Provide data and services to other applications

ER/CORP/CRS/OS30/003
Copyright © 2004, 23
Infosys Technologies Ltd Version no: 2.0

Web Services:
Are units of logic providing data and services to other applications (usually to the remote and
heterogeneous clients).
Applications access Web services via standard Web protocols.
For example, if CNN provides the temperature of various cities in world through web service
then various sites can call this web service and receive the data in the standard format.

23
Few Popular Web Servers

• Microsoft’s Personal Web Server


+ Freeware
+ Easy to setup and use
+ ASP support
- Vulnerability : On Win95/98 allows files on the server to be read by an unauthorized user

• Best suited for testing and serving small web sites

ER/CORP/CRS/OS30/003
Copyright © 2004, 24
Infosys Technologies Ltd Version no: 2.0

Mainly used for personal web pages.


Can host web applications like Active Server Pages ( ASP)

24
Few Popular Web Servers.

• Microsoft’s Internet Information Server

+ performance and security enhancements.

+ Well-integrated server administration tools

+ Easy to configure & Better Clustering.

- Only runs on Windows OS like WinNT Server /2000/XP

• Best suited for MS Platforms

• Mid Range Web server

ER/CORP/CRS/OS30/003
Copyright © 2004, 25
Infosys Technologies Ltd Version no: 2.0

It can be used for developing commercial web sites as well as for the intranet web sites for a
company.
Many sites used for the internal purpose in Infosys are working on IIS.
Mainly used to host web applications like Active Server Pages ( ASP)

25
Few Popular Web Servers

• Apache - A PATCHy Server Origin: NCSA


+ Multi-platform support, protocol support HTTP/1.1
+ Overall performance and robustness
- More extensive technical support requires the purchase of a third-party support contract

• High-end enterprise server for Unix and Win32


• Most preferred Web server

ER/CORP/CRS/OS30/003
Copyright © 2004, 26
Infosys Technologies Ltd Version no: 2.0

Apache is one of the oldest web severs which is still taking lots of market share even today.

Now a days lots of plug in software are available for Apache which makes it possible to host
various types of web applications like
Active Server Pages ( ASP)
Java Servlets
Java Server Pages
Java Servlets.

26
Few Popular Web Servers
• WebSphere: Web Server by IBM
+ Support for various web applications like Servlets/JSP
+ Unique services provided to communicate with the Legacy systems running on
Mainframe Ex: CICS Transaction Gateway

• Best suited for large scale sites involving communication with legacy systems

ER/CORP/CRS/OS30/003
Copyright © 2004, 27
Infosys Technologies Ltd Version no: 2.0

It works on various platforms including IBM Mainframes

27
Performance of Web Application
• Performance of a web application is directly depending on the actual end-user
response time.
• Performance of many Web sites depends on the load on the site at peak time

ER/CORP/CRS/OS30/003
Copyright © 2004, 28
Infosys Technologies Ltd Version no: 2.0

Performance in a Web application is very important because the Web applications are
accessed remotely.
When there is single user, web applications might provide good response but what about the
loads of users?

Imagine Testing a Web application’s performance for 1 lakh simultaneous requests.


We cannot do this by manual testing. So performance testing is normally conducted in a
simulated environment with the help of performance testing tools.

If the performance is not satisfactory, then various measures need to be taken to tackle the
issues.

In further chapter, we will look at various inherent problems in web applications like
performance and security.

28
Heterogeneity involved in Web Apps

• Traditional apps generally have 1, 2 or 3 software pieces talking to each other


– e.g. VB – ODBC (Open Database Connectivity) - SQL Server, or PowerBuilder - Native
drivers - Sybase, or IBM 3270 - CICS - DB2

• Generally, the entire solution is from one or two collaborating vendors

• The wire protocol for communication between collaborating parts is proprietary;


implying that it is difficult or impossible to extend the solution: i.e. replace the VB
client with a different kind of client

ER/CORP/CRS/OS30/003
Copyright © 2004, 29
Infosys Technologies Ltd Version no: 2.0

It is essential to understand history of applications before we begin with the basic terms of web
architecture.
A Traditional application consists of the User Interface as the front tier and the Database at the back
end. The connectivity is done with the help of standards like Open Data Base Connectivity, Java
Data Base Connectivity etc.
Usually all the tiers are coded with the help of products developed by a single company.
Also the protocols used were proprietary because of that.
The users of applications were known in advance.

With the evolution of WWW (World Wide Web) we also need to concentrate on
a) Searching the correct application before calling it. This is done with the help of Universal
Resource Locators
b) Represent the data in the standard data formats
c) Use the required protocols for communication between different tiers
d) Prepare for the large base of unknown users :
Elaboration:
Demography of users in a traditional applications are generally known in advance. Their login pattern,
usage pattern, general behavior, etc are known in advance. Generally, users on an intranet are
reasonably predictable.
While as profile of users in an application exposed to the Internet is not known.
They could be genuine buyers, hackers, frivolous people, frauds, or people all out to have
some fun.
Transaction rate is not known upfront; could vary by time of the day (or night!); there could be
sudden peaks and troughs

29
Issues involved in performance of Web applications
• Following are the main reasons because which performance issues occur in Web
Applications

– Web application inherently needs lots of layers as compared to traditional application. Many
of these layers are remote.

– The load of an application (in general and at any given time) cannot be estimated
accurately.

– And there is no seamless integration between multivendor products used in all these layers,
so the performance of an application is not always predictable.

– Performance might go down because of the extra mechanism added like security

ER/CORP/CRS/OS30/003
Copyright © 2004, 30
Infosys Technologies Ltd Version no: 2.0

The issues can be further categorized as


a) Component level issues
b) Issues at the server level

For some issues related to security and performance, the server level solution works well.
For example, if the performance is decreasing because of the increase in load at peak
hours, then the load balancing feature of a web server can be used. (The feature is
discussed in detail in the sub-sequent slides). With this feature the load is spread out
among various server machines.
At the same time some care need to be taken at component level too.
The programmer needs to make sure that components are capable of spreading out across
various servers and still provide the required functionality.
To take care of this the component has to be built according to the rules of certain standard.

30
Issues involved in security of Web applications
Following are the main reasons because which security issues occur in Web Applications

– Users not known in advance


– Because of various types of users are connecting to a web application, the set of resources
that they can access has to be limited depending on the user profile
– Information send out to particular user has to be protected

ER/CORP/CRS/OS30/003
Copyright © 2004, 31
Infosys Technologies Ltd Version no: 2.0

In the subsequent slides we will study about the various issues, their impacts on server side
and at the component level

31
Load balancing
Browser

Load Balancing Software decides which server to direct traffic to

Server 3
Server 1
Server 2

ER/CORP/CRS/OS30/003
Copyright © 2004, 32
Infosys Technologies Ltd Version no: 2.0

The solution to catering to the issue of heavy load on Servers is Load balancing.
Assume that a courier industry is running across various geography locations and need to maintain
the centralized repository of the data. In this case a single web server used by such application, may
not be able to take the load from various requests coming in from different locations.
For many such reasons, Popular web sites need ways to spread their load out - usually across
multiple machines, and sometimes across multiple sites.
Examining the access patterns for the site is crucial to the performance tuning and load balancing
process.

Scalability of the servers is enhanced by a technique known as load balancing.

Quite a few times load balancing in database servers can be done with the concepts of disk arrays
where there is single DB server software and an array of multiple disks ( few of which can be fall back
disks) to store the data.

But with web server or application server disk arrays don’t’ help always because it’s not just the
question of storing the data but it also about various interlinked components running simultaneously
which are contacted by load of users at a time.

In this case a clustering of multiple servers (not just multiple disks) sharing the incoming load helps
better.
Round robin between these server is the most popular mechanism of spreading the load.

The figure in the slide illustrates the concept of a load-balanced Web server mechanism.

32
Consequences
The programmer needs to make sure that components are capable of

• spreading out across various servers

• still provide the required functionality.

ER/CORP/CRS/OS30/003
Copyright © 2004, 33
Infosys Technologies Ltd Version no: 2.0

If proper care is not taken while coding these components then when components are
spread across multiple servers , the clients of these components get affected.
For example,
In the past, a component named “tariffCalculation” was used by another component (Called
as client) which was also present on the same machine where “tariffCalculation” component
was deployed.
Now with the recent load balancing requirement, this component is spread across various
servers and so are the clients. This reflects certain change in the details of the
“tariffCalculation” component that are be known to the client.
If the component has built-in facilities to accommodate these changes, then using load
balancing is done smoothly.

To take care of various such issues the component has to be built according to the rules of
certain standard.

33
Standards available for building Components - CORBA
CORBA
has
Account
Account
Customer
Customer
Java onWin’95
C++ on Unix

places
creates
Order
Order Shipment
Shipment
COBOL on MVS
contains
can be
Item
Item PC
PC
TV
TV
Book
Book

ER/CORP/CRS/OS30/003
Copyright © 2004, 34
Infosys Technologies Ltd Version no: 2.0

CORBA: Short for Common Object Request Broker Architecture, an architecture that
enables pieces of programs, called objects, to communicate with one another regardless of
what programming language they were written in or what operating system they're running
on.

For example, a program coded in Java can call a function in COBOL with help of this
technology

The diagram shows three modules of an enterprise application namely


Customer: Coded in Java
Account : Coded in C++
Order Processing: Coded in COBOL

These are interrelated modules and the interaction is made possible with CORBA
technology.

34
COM+

Server

Object

Client

ER/CORP/CRS/OS30/003
Copyright © 2004, 35
Infosys Technologies Ltd Version no: 2.0

COM+ : Component Object Model +, an extension of the Component Object Model (COM)
to receive the standard services from the servers like MTS (Microsoft Transaction Server)
COM+ was developed by Microsoft

The diagram shows the server, the object and the client.
The object contains the required logic which is needed by the client.
The server takes care of various objects by providing them services like persistence,
transaction management etc
The client contacts the required object and receives the results.

35
.NET

C# VB.NET JScript Any .Net Compliant Language

Common Language Specification (Basis of Common Language Runtime)

Visual Studio.NET
ASP.NET Windows Forms

ADO .Net and XML

Base Class Library / . Net Framework

Common Language Runtime ( CLR)

Windows OS COM+ Services

ER/CORP/CRS/OS30/003
Copyright © 2004, 36
Infosys Technologies Ltd Version no: 2.0

.NET : Is suite of products for operating, managing and creating the workflow of Web
Applications and web services
.NET is a different subject in itself. The brief introduction of each part is stated below.
The order is from Bottom to Top
Windows is the OS and .Net currently runs only on windows platform
COM+ Services are services like Life Cycle Management/ Transaction Management/
Persistence.
The CLR Common Language Runtime makes sure that the objects written in different
languages can communicate with each other.
Base Class Library is the ready made set of classes for faster code development
ADO.NET and XML ADO .NET is the Microsoft way for the application to talk to the
database. The base class library also gives extensive support for reading and manipulating
XML files. ADO .Net is the XML based technology.
ASP. NET is the is server side code which would be hosted on the IIS Server and it can be
developed in any .NET compliant language like VB .NET, C Sharp etc
Windows Forms are required for console based application. They are used to create the
graphical user interface.
Common language Specification Is published by Microsoft . It describes the rules of a
.Net compliant language. Any language which follows these rules can be used in .NET So
this in turn is an invitation for the vendor companies to write more and more .NET compliant
languages
Visual Studio .NET is the powerful Integrated Development Environment for developing the
code using .Net technology

36
J2EE

Web Component Enterprise Component

Applet
Container
WebContainer EJB Container

JSP/Servlet EJBs
Database

Application
Client
Container

ER/CORP/CRS/OS30/003
Copyright © 2004, 37
Infosys Technologies Ltd Version no: 2.0

The diagram shows the typical Four tier architecture.


In this architecture, the request is initiated from browser/java application.
The request is received by the web server and is routed to the
appropriate Servlet component.

Enterprise JavaBeans (EJB) is a Java API developed by Sun


Microsystems that defines a component architecture for multi-tier
client/server systems.
Servlet analyzes the request and passes it on to the EJB for processing
that needs the business logic and data access.
EJBs in turn produces the results and the JSP formats the results and
sends it back the browser.

37
Catering to the problem of Confidentiality
• Following are the two main techniques used to cater the problem of Unknown User
Profiles in the web applications.
– Authentication
– Authorization
• Various ready APIs are available for the same
– JAAS (Java Authentication and Authorization Service
• Various techniques like Single signon are also widely used by sites
– Microsoft Passport etc

ER/CORP/CRS/OS30/003
Copyright © 2004, 38
Infosys Technologies Ltd Version no: 2.0

Authentication:
Let us consider the example of Campus connect link on the Infosys Web-site.
Whenever anybody accesses the Campus connect web application from Infosys Web-site, the username and
password is checked to make sure that only authentic users get to entry in the application. This process of
identifying an individual, based on a username and password is called as authentication.
Most of the web-sites ask you to explicitly register to get this username and password.
Most of the Intranet application uses your Windows (OS) login-id and password to authenticate you.

Authentication is distinct from authorization , which is the process of giving access to certain objects of system to
certain individuals based on their identity. For example delete department can be accessed only by certain group
of people.

Authentication just ensures that the user name and password is valid but does not deal with the access rights of
the individual.

Authorization
The process of granting or denying access to a resource is called as Authorization. Most of the web-application
first complete authentication and then go for authorization, which allows the user access to resources based on
the user's identity.
For example, in campus connect application only few users would have access to modify the course material kept
at the site while as the students would be able to view the contents. This checking is done through authorization.

Single signon
It is a process of authentication where the user, or client, can enter one name and password and have access to
more than one application or access to a number of resources within an enterprise. Single signon takes away the
need for the user to enter further authentications when switching from one application to another.
Single signon is abbreviated as SSO.

Microsoft .NET Passport gives users a single, convenient way to sign in to multiple Internet sites and services
using one sign-in name and password.
It also allows to store personal information in the .NET Passport profile and, if you choose, automatically share
that information when signed in so that personalized services can be provided.

38
Techniques for Authentication
• Following are few techniques
– Applying Operating System level authentication, by impersonating login credentials of the
client.
– Authenticating the client programmatically.
– Token wise authentication.
Examples: Digital certificate

ER/CORP/CRS/OS30/003
Copyright © 2004, 39
Infosys Technologies Ltd Version no: 2.0

A) Applying Operating System level authentication, by impersonating login credentials of the


client.
This involves a setting with the server software which instructs the server to request the OS
level credentials (for example Windows Login Id and Password) and authenticate the users
by their OS dependant credentials
Usually the Intranet Systems prefer this authentication so that the existing set of Logids and
access permission can be utilized
B) Authenticating the client programmatically involves creating a set up of Users Ids and
access control Lists of these users and their roles. Many software products like LDAP
Authentication Techniques can be used in this case.
C) Token wise authentication is covered in next slides.

39
Catering to the problem of Information Protection
• Secure communication is ensured by using an industry standard protocol called SSL
(Secure Socket Layer)

• Cryptography
– Symmetric and A-Symmetric key Encryption for confidentiality
– Certificates for authentication and non-repudiation

ER/CORP/CRS/OS30/003
Copyright © 2004, 40
Infosys Technologies Ltd Version no: 2.0

SSL
SSL is short form of Secure Socket Layer is a protocol designed by Netscape Communications to
enable encrypted, authenticated communications across the Internet. URLs starting with https:// are
known to use this layer

Cryptography
Is the process of protecting information by transforming it into an unreadable format, called cipher text.
Only those who possess a secret key can decipher (or decrypt) the message into plain text.
With the electronic security is becoming increasingly important, Cryptography is widely used to protect
the data. One of the most popular cryptography systems used on the Internet is Pretty Good Privacy
because it's effective and free.
Cryptography systems can be broadly classified into symmetric-key systems that use a single key that
both the sender and recipient have, and asymmetric-key systems that use two keys, a public key
known to everyone and a private key that only the recipient of messages uses.

Digital certificate
Is an attachment to an electronic message used for security purposes. The common use of a digital
certificate is to verify that a user sending a message is the one who he or she claims to be, and to
encode the reply and send it to receiver.
A person who wishes to send an encrypted message applies for a digital certificate from a Certificate
Authority (CA)
The CA issues an encrypted digital certificate containing the applicant's public key and a variety of
other identification information. The CA makes its own public key readily available through print
publicity or perhaps on the Internet.
The recipient of an encrypted message uses the CA's public key to decode the digital certificate
attached to the message, verifies it as issued by the CA and then obtains the sender's public key and
identification information held within the certificate. With this information, the recipient can send an
encrypted reply.
The most widely used standard for digital certificates is X.509.

40
Summary
• We Covered
– What is WWW

– The Basic Terms of Web Architecture

– The tier-ed architecture of Web Applications

– Various options available in terms of servers

– Various types of components of a web application

– Awareness about the issues involved in security, performance at the client and server end

ER/CORP/CRS/OS30/003
Copyright © 2004, 41
Infosys Technologies Ltd Version no: 2.0

41
Thank You!

ER/CORP/CRS/OS30/003
Copyright © 2004, 42
Infosys Technologies Ltd Version no: 2.0

42

S-ar putea să vă placă și