CS5201 Sem A 20022001 C H Lee - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

CS5201 Sem A 20022001 C H Lee

Description:

Dominant computing model from the 80's. Many (clients) to one (server) ... param name='_version' value='23' /object Downloaded to web browser and installed. ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 43
Provided by: CHL
Category:
Tags: cs5201 | lee | param | sem

less

Transcript and Presenter's Notes

Title: CS5201 Sem A 20022001 C H Lee


1
Web Technologies
  • Client-server
  • Web browser and server
  • Multi-tier architecture
  • Storage solutions
  • Download code
  • Server side execution
  • Component reusability (Java beans)

2
Web Technologies
  • Client-server model
  • Dominant computing model from the 80s
  • Many (clients) to one (server) relationship.
  • Partition of functions and data
  • Functions in client and server
  • Data usually in server
  • Thin client - client does mostly presentation
    only
  • functions and data resides on server

3
Web TechnologiesServer Structure
  • General Server structure
  • Server with sequential execution
  • Loop
  • Read request()
  • Process_request()
  • Reply()
  • Loopend
  • Simplicity
  • May not be efficient (not taking advantage of
    multiprogramming)

4
Web TechnologiesServer Structure
  • General Server structure (Contd)
  • Server with concurrent execution
  • Loop worker()
  • Read request() process_request
  • Spawn worker() send_reply()
  • Loopend end work
  • efficiency gain - uni-processor overlapping CPU
    and I/O multi-processor parallel execution.
  • Dynamic spawning adjust to demand but incur
    spawning overhead.
  • Pre-configured less overhead but can be less
    efficient.

5
Web TechnologiesServer Structure
  • General Server structure (Contd)
  • Server with concurrent execution
  • Multi-threaded server
  • Worker thread executes in server process
    environment.
  • Share memory space
  • Efficient Inter-thread communication
  • Concurrent programming mutual exclusion,
    synchronization.
  • e.g., Java Servlets
  • Multi-process server
  • Workers executes as independent processes
  • Require more resources
  • e.g., CGI programs

6
Web TechnologiesHTTP
  • A very powerful information dissemination
    paradigm was created by combining the concepts
    of
  • hypermedia document
  • Multimedia document that contains links (URLs) to
    other document.
  • Document described by HTML.
  • client-server computing
  • Using the HTTP (Hyper-Text Transport) protocol
    between client and server.

7
Web TechnologiesHTTP
  • Browser Web Server
  • request GET ltURLgt headers
  • headers requested page response
  • Request-Response (RR) protocol.
  • Stateless - no memory of previous RR transaction.
  • Requests GET, HEAD, POST, PUT, DELETE

8
Web TechnologiesBrowser Structure
  • Example
  • User input
  • Keyboard,
  • Mouse.
  • application
  • protocols .
  • cache, cookies

GUI
layout
HTML Interpreter
Controller
FTP Interpreter
HTTP client
FTP client
Plug-in
Helper Application
Internet Interface
Utilities
TCP/IP
9
Web TechnologiesBrowser Structure
  • Example (Contd)
  • User inputs url (e.g., http//www.cs.cityu.edu.hk/
    index.html)
  • www.cs.cityu.edu.hk/index.html passed to HTTP
    client (which implements HTTP protocol - client
    side)
  • HTTP client requests a TCP connection to
    www.cs.cityu.edu.hk 80 (i.e, the port to which
    the target web server is listening) and sends the
    HTTP command message GET index.html ltheadersgt.
  • When the HTTP message carrying index.html comes
    back, it is passed to the HTML interpreter to
    parse it into a form suitable for display.

10
Web TechnologiesBrowser Structure
  • Browser extension
  • Plug-in
  • Helper program invoked when a specified document
    type is encountered.
  • Operates within browser environment.
  • Helper application
  • Invoked as a stand-alone program, with its own
    window, when a specified document type is
    encountered.
  • Downloaded code
  • Java Applets
  • ActiveX Controls

11
Web TechnologiesWeb Server Structure
  • Example
  • SAFs

Init
uri
Auth
type
response
Controller
log
HTTP protocol (server)
utilities
TCP/IP
12
Web TechnologiesWeb Server Structure
  • Example (Contd)
  • HTTP server accepts TCP connection from (web
    browser) client and receives request over the
    connection. e.g.,
  • GET www.cs.cityu.edu.hk/index.html
  • Controller sequences steps in processing of
    request by calling SAFs (Server Application
    Functions, or modules), typically to
  • translate uri to local file path name
  • verify any authentication (userid, password)
  • determine MIME type and encoding

13
Web TechnologiesWeb Server Structure
  • Example (Contd)
  • generate response
  • send requested file as is
  • invoke cgi program
  • run server-side script
  • handle image-map
  • etc
  • add entry to server log file

14
Web TechnologiesWeb Server Structure
  • Web server extensions
  • plug-in
  • replacing existing SAF - modify server behavior
    (e.g. authentication procedure).
  • adding SAF to handle special request type.
  • CGI (Common Gateway Interface)
  • Requested resource is a program
  • Invoked to run (usually under web servers
    account) as a separate process.
  • CGI defines how parameters are passed between web
    server and invoked program.
  • Higher overhead than server plug-in

15
Web TechnologiesWeb Server Structure
  • Web server extensions (contd)
  • Java Servlet
  • Coded in Java.
  • Loaded into server, run by a java thread.
  • Supported by a number of web servers - but does
    not have the universality of CGI (yet).
  • Java Web Server
  • Appache Web Server
  • IBM WebSphere
  • iPlanet Web Server
  • etc.

16
Web TechnologiesApplication Server
  • Partition of Application Functions
  • Application functions at client
  • Fat client approach
  • Download data to client machine for processing
  • Application functions at server
  • Thin client approach
  • Simplified applications (software) management
  • Applications shared among clients
  • Application server
  • Grouping business logic and operation procedures

17
Web TechnologiesApplication Server
  • Web originally invented for simple dissemination
    and linking of documents.
  • Fit nicely with client-server computing in
    organizations.
  • Thin client approach.
  • Browsers offer effective presentation tools.
  • Web server - application server communication
  • CGI - application server as group of CGI programs
  • Through plug-ins at web server
  • Insert SAF to communicate with application server

18
Web TechnologiesTwo-tier Architecture
  • Tier 1 Client Tier 2 Server
  • Web server
  • Application server
  • Database server
  • Server machine handles all processing. Does not
    scale well.

19
Web TechnologiesThree-tier Architecture
  • Tier 1 Client Tier 2 Tier 3 Backend
  • Server
  • Web server Database server database
  • Application server
  • Can support large increase in number of clients
    (compared to 2-tire) if database access
    significant.

20
Web TechnologiesN-tier Architecture
Optimized for web page delivery
Coded for specific application
Managed and tuned by DBA
Achieves full separation of function and
administration Huge number of simultaneous clients
SOURCE FOURNIER
21
Web TechnologiesN-tier Architecture
  • Example

SOURCE INTERSHOP
22
Web TechnologiesServer Cluster
  • Scaling up for capacity
  • keep track of servers loading replicated
    servers
  • Request

Web server
Application server
Load balancing web proxy
Web server
Application server
23
Web TechnologiesStorage Solutions
  • Storage demand
  • eCommerce systems
  • Multimedia contents
  • Data warehousing and data mining
  • ERP
  • Traditional storage provision
  • Storage devices directly attached to server
    machine through I/O channels/bus
  • Commonly used interfaces IDE, SCSI (4 - 80 MBps)

24
Web TechnologiesStorage solution
  • Clients server disk server tape
  • back-up
  • Limited transfer rate.
  • Does not scale well.
  • Complexity in configuration management.
  • Back-up operation eats up network capacity.

25
Web TechnologiesStorage Area Network
  • LAN servers SAN storage
  • Any server can access any storage device.
  • High bandwidth and high availability.
  • Easy to scale.

26
Web TechnologiesContent Development
  • Web page authoring
  • Web page layout defined by HTML.
  • HTML editors and tools ease web page authoring.
  • Netscape Composer
  • Microsoft FrontPage, etc.
  • Enhancing web experience
  • presentation, interactivity
  • with downloaded code
  • Dynamic contents
  • with server-side code

27
Web TechnologiesDownloaded code
  • Java Applets
  • Coded in Java, an Object-Oriented programming
    language
  • Compiled to byte-code
  • Referenced from html page
  • Downloaded to web browser
  • Interpreted by Java Virtual Machine
  • Execution restrained by Java Sandbox
  • Developed originally by Sun Microsystems

28
Web TechnologiesJava Applets
  • 2. Applet displays
  • a graphic interface 3. Java applets uses
    JDBC
  • for user to do database to query
    database
  • query User
  • 4. Query result
  • Web browser Database
  • 5. Applet displays Server
  • result
  • 1. Applet is ltHTMLgt...
  • downloaded ltappletgt
  • codedaq.class
  • Web Server codebasehttp//www.sun.com/c
    lasses
  • lt/appletgt

29
Web TechnologiesJava Applets
  • Java applet is restrained in
  • Access host file system.
  • Execute other programs.
  • Create threads.
  • Load host local libraries.
  • Communicate with other remote sites except the
    one it came from.

30
Web TechnologiesJava Security Model
Every application is subject to a security policy
Applications are identified by digital signatures
Domain Set of classes given the same permissions
Range of security policies
Trusted native applications run here
Untrusted foreign applets run here
Security manager controls access to system
resources
SOURCE SUN MICROSYSTEMS
31
Web TechnologiesDownloaded Code
  • ActiveX Controls
  • Referenced in html page
  • ltobject ID eg1 width86 height31
  • codebasehttp//www.cityu.edu.hk/activex/eg1.ocx
  • classidCLSIDDE80D6A3..gt
  • ltparam name_version value23gt
  • lt/objectgt
  • Downloaded to web browser and installed.
  • Native code (host system dependent)
  • Trust on program behaviour - by code signing
    (Authenticode scheme)
  • Java byte-code option.

32
Web TechnologiesDownloaded Code
  • Javascript
  • Javascript code directly embedded in html page.
  • Object-oriented programming.
  • Simpler than Java.
  • Browser interprets
  • script.
  • Easy to access
  • page elements.
  • Minimal security,
  • spoofing,
  • client DOS attacks.

lthtmlgt .. ltscript languagejavascriptgt do
cument.writeln(Hello World) lt/scriptgt ..
lt/htmlgt
33
Web TechnologiesServer Side Page Generation
  • Java Server Page (JSP)
  • Server executes a Java bean (similar to an
    applet) which generate the html page to be sent
    to the browser.

SOURCE SUN MICROSYSTEMS
34
Web TechnologiesJSP Example
Looks like an HTML page
sample.jsp
Page invokes a Java bean from a servlet (similar
to an applet)
lthtmlgt ltjspuseBean idclock
classcalendar.JspCalendar /gt ltulgt ltligtDay of
Month is ltclock.getDayOfMonth)_gt ltligtYear is
ltclock.getYear()gt lt/ulgt lt/htmlgt
Page invokes methods on the servlet to
generate dynamic content
35
Web TechnologiesActive Server Page (ASP)
  • A server-side scripting technology
  • Can be used to create
  • dynamic and interactive
  • Web applications.
  • Developed by Microsoft

Sample.asp lt_at_ LanguageVBScript
gt lthtmlgt ltheadgt lttitlegtExample
1lt/titlegt lt/headgt ltbodygt lt FirstVar "Hello
world!" gt ltFirstVargt lt/bodygt lt/htmlgt
36
Web TechnologiesReusable components
  • Java Beans
  • Extend write once run anywhere to also reuse
    everywhere
  • Framework for building software components coded
    in Java.
  • Manipulated in a visual builder tool (e.g.
    JBuilder).
  • Can buy and sell beans. See Suns web site.

37
Web TechnologiesReusable components
  • Bean properties
  • Introspection Builder can analyze how bean
    works.
  • Customization developer can use builder tool to
    customize the appearance and behaviour of a bean.
  • Event enables beans to communicate and connect
    together.
  • Persistence developer can customize beans, store
    and retrieve them, with customized features
    preserved.

38
Web TechnologiesReusable components
  • Enterprise Java Beans (EJB)
  • Defines an architecture for the development and
    deployment of transactional, distributed,
    server-side software components.
  • Main purpose incorporate data and business logic
    into objects.
  • Employ and develop reusable components.
  • Beans runs in EJB container
  • remote access to the bean, security, persistence,
    transactions, concurrency, and access to and
    pooling of resources.

39
Web TechnologiesEJB
APPLICATION SERVER MANAGES EJB CONTAINERS
  • CONTAINER HANDLES
  • TRANSACTION MGMT
  • SECURITY
  • CLIENT CONNECTIVITY
  • LIFE CYCLE MGMT

ENTERPRISE BEANS HANDLE BUSINESS LOGIC
SOURCE SUN MICROSYSTEMS
40
Web TechnologiesEJB
DATABASE STORES ENTITY BEAN STATES
  • ENTITY BEAN
  • REPRESENTS BUSINESS ENTITY OBJECT
  • SHARED BY MANY CLIENTS
  • IS PERSISTENT
  • SESSION BEAN
  • PERFORMS TASK FOR 1 CLIENT
  • IS NOT PERSISTENT

CUSTOMER ON WEB
SERVLET RESPONDS TO CART APPLET
SESSION BEAN CLIENT
SOURCE SUN MICROSYSTEMS
41
Web TechnologiesEJB

EJB vendors
SOURCE CHÁD DARBY
42
Web Technologies
  • Development for open web user community
  • Wide spectrum of users
  • Users loyalty minimal
  • Minimal user-level documentation
  • Thick user document not welcome.
  • Self-documented (or not document at all).
  • On-line help.
  • Short attention span of users
  • Rapid application development
Write a Comment
User Comments (0)
About PowerShow.com