Generate Dynamic Content On Cache Server - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Generate Dynamic Content On Cache Server

Description:

Each time a service request is received, a new object is created. ... Testing the performance of my project with the ESI proposed by Akamai, using a ... – PowerPoint PPT presentation

Number of Views:132
Avg rating:3.0/5.0
Slides: 19
Provided by: uccs
Learn more at: http://cs.uccs.edu
Category:

less

Transcript and Presenter's Notes

Title: Generate Dynamic Content On Cache Server


1
Generate Dynamic Content On Cache Server
  • Masters Project Proposal by
  • Aparna Yeddula

2
Introduction
  • Caching
  • fetching document.
  • pass to the browser.
  • save copies.
  • Referred to as a web proxy server.
  • Subsequent requests from other users of the cache
    get the saved copy.
  • Advantage Faster and does not consume Internet
    bandwidth over the often-congested network links.

3
(No Transcript)
4
Intro
  • With out caching generating dynamic web page
    imposes heavy burden on the original web server.
    To alleviate that, the generation of dynamic web
    pages can be done at the cache servers.
  • One of the content delivery network providers
    Akamai had proposed Edge Side Include (ESI)
    language for specifying how a web page can be
    dynamically generated.

5
(No Transcript)
6
Edge side include Test Server (ETS)
  • The ESI assembly model is comprised of a template
    containing fragments.
  • The template is the container for assembly.
  • Each fragment of the page need to be retrieved
    from the origin server.
  • Each fragment has its own time-to-live (TTL)
    attribute, which specifies how long the cache
    server maintains the copies.
  • Fragments are separate resources, they can be
    assigned their own cacheability and handling
    information.

7
ESI Example
  • ltesiincludegt tag example
  • The include element specifies a fragment for
    assembly.
  • ltesiinclude src"URI" ttl1hr" /gt
  • For example,
  • ltesiinclude src"http//example.com/1.html"
    ttl1hr/gt
  • ltesichoosegt tag example
  • The conditional elements add the ability
    to perform logic based on expressions.
  • For example,
  • ltesichoosegt
  • ltesiwhen test"(HTTP_HOST)128.198.192.174'"gt
  • ltesiinclude src"http//www.example.com/advance
    d.html"/gt lt/esiwhengt
  • ltesiotherwisegt
  • ltesiinclude src"http//www.example.com/newuser
    .html"/gt lt/esiotherwisegt
  • lt/esichoosegt

8
Web services specifications
  • The web services model is independent of
    languages, platforms, and object models.
  • Each time a service request is received, a new
    object is created. The request for the method
    call, and the object is destroyed after the
    method call is returned.

9
(No Transcript)
10
DOTNET Models
  • Direct client model
  • The client browser issues a GET HTTP request
    .asmx page directly to the web service.
  • When we call a web service from a browser, we
    access the description page, which lists the
    methods that are included in the Web service. The
    protocol that is used in this case is HTTP, and
    the data is returned as XML.
  • Web server or the proxy client model
  • The client browser issues a GET HTTP request
    .aspx page to the web server. The server parses
    and compiles the page. The code invokes the proxy
    to call the web service. Here the request and
    response between the servers is using XMLP. And
    the web server sends the response to the client
    in HTTP 6.

11
JSP (Java Server Pages) custom tag specifications
  • JSP custom tag can be used to implement XML
    languages including ESI.
  • To use the JSP custom tags, we need to define
    three separate components
  • JSP file that uses the tag library.
  • tag library descriptor (tld) file that maps the
    XML elements names to the tag implementations.
  • tag handler class that defines the tags behavior.

12
The JSP file
  • lt!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Transitional//EN"gt
  • lthtmlgt ltheadgt
  • lt_at_ taglib uri"simple-taglib.tld prefix"jspx"
    gt
  • lttitlegtltjspxhello /gtlt/titlegt
  • lt/headgtltbodygt
  • ltH1 align"center"gt JSP Custom Tag Test Page
  • lt/H1gt
  • ltH2gtFirst JSP Custom Tag
  • ltjspxhello /gt
  • lt/H2gt
  • lt/bodygtlt/htmlgt

13
Tag library descriptor file
  • lt!DOCTYPE taglib
  • PUBLIC "-//Sun Microsystems, Inc.//DTD
    JSP Tag Library 1.1//EN"
  • "http//java.sun.com/j2ee/dtd/web-jsptaglibrary_1
    _1.dtd"gt
  • lttaglibgt
  • lttlibversiongt1.0lt/tlibversiongt
  • ltjspversiongt1.1lt/jspversiongt
  • lturigt simple-taglib.tldlt/urigt
  • lttaggt
  • ltnamegthellolt/namegt
  • lttagclassgtcwp.tags.HelloWorldTaglt/tagclassgt
  • lt/taggt
  • lt/taglibgt

14
Tag handler class
  • import javax.servlet.jsp.
  • import javax.servlet.jsp.tagext.TagSupport //
    tells system what to do when it sees the tag

  • // This is a simple tag example to show how
    content is added to the output stream when a tag
    is encountered in a JSP page.
  • public class HelloWorldTag extends TagSupport
  •   // doStartTag is called by the JSP container
    when the tag is encountered
  • public int doStartTag()
  • JspWriter out pageContext.getOut()
  • out.println("lttrgtlttdgt Hello World
    lt/tdgtlt/trgt")
  • // Must return SKIP_BODY because we are
    not supporting a body for this tag
  • return SKIP_BODY

15
JSP Example
  • JSP FILE
  • ltbodygt
  • lt_at_ taglib uri"include-taglib.tld"
    prefix"jspx" gt
  • ltjspxinclude uri"http//uccs.edu/page.html"
    ttl"1"/gt
  • lt/bodygt
  • TLD FILE
  • lttaggt
  • ltnamegtincludelt/namegt lttagclassgtcwp.tags.In
    cludeTaglt/tagclassgt
  • ltattributegt ltnamegturilt/namegt
    ltrequiredgttruelt/requiredgt
  • lt/attributegt
  • ltattributegt ltnamegtttllt/namegt
    ltrequiredgttruelt/requiredgt
  • lt/attributegt
  • lt/taggt

16
JSP Example
  • public int doStartTag() throws JspException
  • public void setUri (String name) uriName
    name
  • // Set Ttl called when set the Tag attribute
  • public void setTtl (String name) ttlName
    name

17
Tasks
  • Already Complete
  • 1.      Study how to change the date and time of
    the web page based on the Java Script.
  • 2.      Study how to change the date and time
    using DOTNET on the server side with .asmx page.
  • 3.      Study how to change the date and time
    using DOTNET on the server side with .aspx page.
  • 4.      Study how to use Java socket library to
    process the http request and response.
  • 5.      Study database access using Microsoft
    access and Active Server Page (ASP).
  • 6.      Study how ESI works.
  • 7.      Study how JSP custom tags to implement
    ESI.
  • In Progress
  • Testing the performance of my project
    with the ESI proposed by Akamai, using a simple
    PERL program to test the time taken to deliver
    the document.
  • Deliverables
  • My project report documenting the
    approach and code to the project, related work
    and the lessons learned in this project.

18
References
  • 1 Microsoft DOTNET sample training modules
    http//www.microsoft.com/traincert/training/develo
    per/dotnet.asp
  • 2 Active Cache Caching Dynamic Contents on
    the Web http//www.cs.wisc.edu/cao/papers/ac
    tive-cache/SECTION00100000000000000000
  • 3 ESI Resources http//www.esi.org/language_sp
    ec_1-0.html
  • 4 Core Servlets and Java Server Pages by
    Marty Hall
  • 5 Core Web Programming by Marty Hall and
    Larry Brown
  • 6 DOTNET Training http//www.imguniversity.com/
    WebUPublic/default.asp?URL2E2E2FWebSyllabus2F
    wsStudentClassList2Easp
Write a Comment
User Comments (0)
About PowerShow.com