Caching Dynamic Documents Vipul Goyal Department of Computer Science & Engg Institute of Technology, Banaras Hindu University Sugata Sanyal School of Technology.

Slides:



Advertisements
Similar presentations
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Advertisements

Server-Side vs. Client-Side Scripting Languages
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
The Application Layer Chapter 7. Electronic Mail Architecture and Services The User Agent Message Formats Message Transfer Final Delivery.
The Internet Useful Definitions and Concepts About the Internet.
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
Master’s course Bioinformatics Data Analysis and Tools Lecture 6: Internet Basics Centre for Integrative Bioinformatics.
INTERNET DATABASE. Internet and E-commerce Internet – a worldwide collection of interconnected computer network Internet – a worldwide collection of interconnected.
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
ITM352 Javascript and Dynamic Web Pages: Client Side Processing.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
1 Introduction to Web Development. Web Basics The Web consists of computers on the Internet connected to each other in a specific way Used in all levels.
For more notes and topics visit:
INTRODUCTION TO WEB DATABASE PROGRAMMING
Computer Concepts 2014 Chapter 7 The Web and .
HTTP; The World Wide Web Protocol
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Server-side Scripting Powering the webs favourite services.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
1 Chapter 2 & Chapter 4 §Browsers. 2 Terms §Software §Program §Application.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
How did the internet develop?. What is Internet? The internet is a network of computers linking many different types of computers all over the world.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
What does WWW stand for? And following abbreviations? HTTP: Hyper Text Transfer Protocol HTML: Hyper Text Mark-up Language URL: Uniform Resource Locator.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Chapter 29 World Wide Web & Browsing World Wide Web (WWW) is a distributed hypermedia (hypertext & graphics) on-line repository of information that users.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Web Server.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
General Architecture of Retrieval Systems 1Adrienn Skrop.
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
Ajax & Client-side Dynamic Web Gunwoo Park (Undergraduate)
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
4.01 How Web Pages Work.
Tonga Institute of Higher Education IT 141: Information Systems
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
WWW and HTTP King Fahd University of Petroleum & Minerals
CISC103 Web Development Basics: Web site:
Section 17.1 Section 17.2 Add an audio file using HTML
Some Common Terms The Internet is a network of computers spanning the globe. It is also called the World Wide Web. World Wide Web It is a collection of.
Web Caching? Web Caching:.
Processes The most important processes used in Web-based systems and their internal organization.
CISC103 Web Development Basics: Web site:
Chapter 27 WWW and HTTP.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Document Structure & HTML
4.01 How Web Pages Work.
Presentation transcript:

Caching Dynamic Documents Vipul Goyal Department of Computer Science & Engg Institute of Technology, Banaras Hindu University Sugata Sanyal School of Technology & Computer Science Tata Institute of Fundamental Research Dharma P. Agrawal Center for Distributed and Mobile Computing, ECECS University of Cincinnati

Caching the Web Documents Browser locally stores the document which can be quickly supplied later in case of a re-request Advantages are three fold- -Improved response time -Reduced network traffic -Reduced server load

Caching Dynamically Generated Pages Overview One central aspect of the development of WWW has been the increasing use of dynamically generated documents (i.e. the pages generated using some server script) Traditional Caching fails because every instance of the dynamically generated page is different

Question: Why do we want to cache a dynamic page if its every instance is different ? Answer: The instance differ only “slightly” They usually contain a number of sections of duplicate HTML code

Examples

The Solution Requirements Changes to the web server to accommodate a new software called Fragmentor Changes to the client to accommodate a Plug-in No changes to the HTTP protocol

Central Ideas of the Scheme Fragmentor will parse the scripts at the server to give rise to a hierarchy of cacheable templates (representing static HTML code) and non-cacheable bindings (representing dynamic HTML code) On any request, only bindings will be supplied to the client Templates, if not cached, will be downloaded separately by the client

Overview of the steps 1.The fragmentor parses all the scripts at the server to produce a number of templates and binding generators 2.The client sends the request for the required dynamic page 3.The server generates and sends only the binding in response 4.The client downloads the required templates if not already cached 5.Client plugs the templates into bindings to get the full HTML page

Parsing the Scripts The fragmentor parses the script source code line by line and puts the static hard coded output into the template Source CodeTemplate Generated Print “Welcome to web mail”; Welcome to web mail … You have new mails Print “You have $n new mails”;

Parsing the Scripts The fragmentor deletes hard coded output from the script source code to give rise to a binding generator When a request is received, this binding generator runs to produce a binding which is then supplied to the client

Parsing the Scripts Question Can we simply collect the static text of the script in a file? Answer The script may contain branches (if-else), so we don’t know which part of the static text will appear in the output

Definitions Definition 1 (Template) A cacheable regular HTML file having gaps or discontinuities in it. It may also contain the following new tags in addition- 1) 2) and

Definitions Definition 2 (Binding) A binding is a non-cacheable section of code enclosed between "> and tags. The tag specifies the template to which the binding belongs. The enclosed code may contain the following apart from the regular HTML code- 1) and tags 2) and tags 3) and tags where n is a positive integer not equal to zero. 4) Another binding (reason: presence of branches)

Parsing the Scripts The fragmentor will generate separate template for every branch in the script source code However, only one (??) binding will be sent to the client

Example of template generation

Example of binding generation

Client Side Generation of Full Document The client only receives a binding in response to the request The binding contains full URLs of all the required templates The client downloads the templates which are not already cached Templates are plugged and gaps are ‘filled’ using the binding to obtain the full HTML instance of the required web page

This approach needs to be optimized Number of Templates generated = Number of branches in the program For moderate and large sized programs, large number of templates and bindings will be generated Unnecessary burden on the system as some templates will rarely be used (e.g. corresponding to branches dealing with errors/exceptions)

Improving the approach (Still in progress) Fragmentor will first gather the branch flow statistics of the program Templates for only the frequently taken branches will be generated Templates for popular branch sequences will be merged into a single template

you Thank you