introduction to web architecture - · pdf file– basics of web architecture ... •...
TRANSCRIPT
1
Introduction To Web Architecture
2
ER/CORP/CRS/OS30/003
Version no: 2.02Copyright © 2004,
Infosys Technologies Ltd
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
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
3
ER/CORP/CRS/OS30/003
Version no: 2.03Copyright © 2004,
Infosys Technologies Ltd
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
Awareness of the security, performance issues in web applications.
The second chapter covers architecture documents, Sun Architectures, Microsoft Architectures etc.
4
ER/CORP/CRS/OS30/003
Version no: 2.04Copyright © 2004,
Infosys Technologies Ltd
Session Plan
• 1 lecture session
– Basics of Web Architecture
– Overview of Sun and Microsoft Architectures
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.
5
ER/CORP/CRS/OS30/003
Version no: 2.05Copyright © 2004,
Infosys Technologies Ltd
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
6
ER/CORP/CRS/OS30/003
Version no: 2.06Copyright © 2004,
Infosys Technologies Ltd
Basics of Web Architecture
30 minIssues involved in security, performance of Web applications
30 minComponents of a Web Application
20 minWeb Servers
20 minBasic Terms in Web Architecture
Estimated DurationTopic
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
7
ER/CORP/CRS/OS30/003
Version no: 2.07Copyright © 2004,
Infosys Technologies Ltd
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
8
ER/CORP/CRS/OS30/003
Version no: 2.08Copyright © 2004,
Infosys Technologies Ltd
Web Architecture
• Why architect the Web Applications?
• What is N "Tier“ architecture?
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 HTTPOne 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.
9
ER/CORP/CRS/OS30/003
Version no: 2.09Copyright © 2004,
Infosys Technologies Ltd
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
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.
10
ER/CORP/CRS/OS30/003
Version no: 2.010Copyright © 2004,
Infosys Technologies Ltd
• Web server
– E.g. Tomcat, IIS
• Application Server
– E.g. Weblogic, WebSphere
Basic Terms in Web Architecture
We will go through meaning of some basic terms before we understand the complete structure of these tiers.
Web serverIs 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 ServersA 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
11
ER/CORP/CRS/OS30/003
Version no: 2.011Copyright © 2004,
Infosys Technologies Ltd
Basic Terms in Web Architecture (Contd…)
• Directory service
• Search engines
• Persistence
Directory serviceDirectory 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 enginesA 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.comAlthough 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 servicePersistence 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
12
ER/CORP/CRS/OS30/003
Version no: 2.012Copyright © 2004,
Infosys Technologies Ltd
Basic Terms in Web Architecture (Contd…)
• Load balancing
• Transaction management
• Authentication / authorization service
Load balancingLoad 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 managementIn 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 serviceAuthentication 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
13
ER/CORP/CRS/OS30/003
Version no: 2.013Copyright © 2004,
Infosys Technologies Ltd
Web Servers
Web Browsers
HTTP
Web Server
Web Site Web Content
(HTML Pages)
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.
14
ER/CORP/CRS/OS30/003
Version no: 2.014Copyright © 2004,
Infosys Technologies Ltd
HTTP Protocol
HTTP/1.0 was the original version
HTTP 1.1
HTTP1.1. provides Persistent Connection
Web Browser
Web Server
File System
Document
Request
Web server
searches for
the document
on file system
Server retrieves
the document
Server sends the
document to Browser
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.
Hangs upHangs up
Reads the contents of the files and displays it
Copies the contents of the file into the socket
Writes “HTTP/1.0 200 OK \n\n”.
Reads a local file named /index.html
And that HTTP 1.0 is a valid protocol version
Sees that the GET is the known command
Reads up until the second end of the line (\n)
Writes “GET/index.html HTTP/1.0 \n\n”Accepts the Connection
Connects to Port 80 Listens to Port 80
ServerClient
15
ER/CORP/CRS/OS30/003
Version no: 2.015Copyright © 2004,
Infosys Technologies Ltd
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
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.
16
ER/CORP/CRS/OS30/003
Version no: 2.016Copyright © 2004,
Infosys Technologies Ltd
Http Request : GET Vs POST method
With POST, the data is not cached either in the history or in the bookmark so it is more secure.If the user bookmarks a GET page, the
querystring info will also be saved with it. A querystring also shows up in the history list .Get isn’t very secure.
The form data is available on STDIN,which is a handle for the standard input . It defines the input stream for the program.
In the server script that handles the submitted information, the form data is retrieved from the QUERY_STRING environment variable .Environment variables are the variables that are automatically created by the server for each process.
PostGet
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.
17
ER/CORP/CRS/OS30/003
Version no: 2.017Copyright © 2004,
Infosys Technologies Ltd
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
18
ER/CORP/CRS/OS30/003
Version no: 2.018Copyright © 2004,
Infosys Technologies Ltd
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
19
ER/CORP/CRS/OS30/003
Version no: 2.019Copyright © 2004,
Infosys Technologies Ltd
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 ...
20
ER/CORP/CRS/OS30/003
Version no: 2.020Copyright © 2004,
Infosys Technologies Ltd
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
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.
21
ER/CORP/CRS/OS30/003
Version no: 2.021Copyright © 2004,
Infosys Technologies Ltd
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
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.
22
ER/CORP/CRS/OS30/003
Version no: 2.022Copyright © 2004,
Infosys Technologies Ltd
Various components of Web Application (Contd..)
• Java Server Pages– Technology is developed by Sun.
– Uses “Java” as a scripting language
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.
23
ER/CORP/CRS/OS30/003
Version no: 2.023Copyright © 2004,
Infosys Technologies Ltd
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
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.
24
ER/CORP/CRS/OS30/003
Version no: 2.024Copyright © 2004,
Infosys Technologies Ltd
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
Mainly used for personal web pages.
Can host web applications like Active Server Pages ( ASP)
25
ER/CORP/CRS/OS30/003
Version no: 2.025Copyright © 2004,
Infosys Technologies Ltd
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
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)
26
ER/CORP/CRS/OS30/003
Version no: 2.026Copyright © 2004,
Infosys Technologies Ltd
• 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
Few Popular Web Servers
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.
27
ER/CORP/CRS/OS30/003
Version no: 2.027Copyright © 2004,
Infosys Technologies Ltd
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
It works on various platforms including IBM Mainframes
28
ER/CORP/CRS/OS30/003
Version no: 2.028Copyright © 2004,
Infosys Technologies Ltd
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
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.
29
ER/CORP/CRS/OS30/003
Version no: 2.029Copyright © 2004,
Infosys Technologies Ltd
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
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
30
ER/CORP/CRS/OS30/003
Version no: 2.030Copyright © 2004,
Infosys Technologies Ltd
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
The issues can be further categorized asa) Component level issuesb) 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.
31
ER/CORP/CRS/OS30/003
Version no: 2.031Copyright © 2004,
Infosys Technologies Ltd
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
In the subsequent slides we will study about the various issues, their impacts on server side and at the component level
32
ER/CORP/CRS/OS30/003
Version no: 2.032Copyright © 2004,
Infosys Technologies Ltd
Load balancing
Server 1Server 2
Server 3
Browser
Load Balancing Software decides which server to dir ect traffic to
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.
33
ER/CORP/CRS/OS30/003
Version no: 2.033Copyright © 2004,
Infosys Technologies Ltd
Consequences
The programmer needs to make sure that components are capable of
• spreading out across various servers
• still provide the required functionality.
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.
34
ER/CORP/CRS/OS30/003
Version no: 2.034Copyright © 2004,
Infosys Technologies Ltd
Standards available for building Components - CORBA
CORBA
CustomerCustomer
ItemItem
ShipmentShipmentOrderOrder
AccountAccount
BookBookTVTVPCPC
has
places
contains
creates
can be
Java onWin’95C++ on Unix
COBOL on MVS
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.
35
ER/CORP/CRS/OS30/003
Version no: 2.035Copyright © 2004,
Infosys Technologies Ltd
COM+
ObjectObject
ServerServer
ClientClient
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.
36
ER/CORP/CRS/OS30/003
Version no: 2.036Copyright © 2004,
Infosys Technologies Ltd
.NET
Visual S
tudio.NE
T
C# VB.NET JScript Any .Net Compliant Language
Common Language Specification (Basis of Common Language Runtime)
ASP.NET Windows Forms
ADO .Net and XML
Base Class Library / . Net Framework
Common Language Runtime ( CLR)
Windows OS COM+ Services
.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 thedatabase. 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
37
ER/CORP/CRS/OS30/003
Version no: 2.037Copyright © 2004,
Infosys Technologies Ltd
J2EE
Applet Container
ApplicationClient
Container
WebContainer
JSP/Servlet
EJB Container
EJBsDatabase
Web Component Enterprise Component
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.
38
ER/CORP/CRS/OS30/003
Version no: 2.038Copyright © 2004,
Infosys Technologies Ltd
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
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.
AuthorizationThe 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.
39
ER/CORP/CRS/OS30/003
Version no: 2.039Copyright © 2004,
Infosys Technologies Ltd
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
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.
40
ER/CORP/CRS/OS30/003
Version no: 2.040Copyright © 2004,
Infosys Technologies Ltd
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
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 certificateIs 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.
41
ER/CORP/CRS/OS30/003
Version no: 2.041Copyright © 2004,
Infosys Technologies Ltd
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
42
ER/CORP/CRS/OS30/003
Version no: 2.042Copyright © 2004,
Infosys Technologies Ltd
Thank You!