1 / 24

CS 5565 Network Architecture and Protocols

CS 5565 Network Architecture and Protocols. Godmar Back. Lecture 7. Announcements. Problem Set 1 due Feb 18 Project 1A due Feb 19 Submission website will be up soon Required Reading: research paper, see website. Application Protocols. Part 1: HTTP. Mashups.

alattimer
Télécharger la présentation

CS 5565 Network Architecture and Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 5565Network Architecture and Protocols Godmar Back Lecture 7

  2. Announcements • Problem Set 1 due Feb 18 • Project 1A due Feb 19 • Submission website will be up soon • Required Reading: research paper, see website CS 5565 Spring 2009

  3. Application Protocols Part 1: HTTP

  4. Mashups • Web applications that combine and mix data from different sources CS 5565 Spring 2009

  5. Base Serverhttp://www.lib.edu Source A http://www.lib.edu/sourceA Mash-Up Serverhttp://mashup.lib.edu Source Bhttp://opac.lib.edu/sourceB HTML Source C http://any.host.domain/sourceC Client Browser Base Page A C B Server-side Mash-Up

  6. Base Serverhttp://www.lib.edu Source A http://www.lib.edu/sourceA HTML+JavaScript Proxy http://www.lib.edu/proxy Source Bhttp://opac.lib.edu/sourceB XMLHttpRequest Source C http://any.host.domain/sourceC Client Browser Base Page A C B Proxy-Based Mash-Up

  7. Base Serverhttp://www.lib.edu Source Bhttp://opac.lib.edu/sourceB HTML+JavaScript Same Origin Restriction Same Domain Restriction Source A http://www.lib.edu/sourceA XMLHttpRequest + XML/Text XMLHttpRequest + XML/Text No Domain Restriction Client Browser Base Page Source C http://any.host.domain/sourceC A B C B (via hidden frame) <SCRIPT> + JSON Client-side Mash-Up

  8. HTTP & JSON • In modern web applications, HTTP is increasingly initiated from code • Either directly, e.g., XMLHttpRequest • Or indirectly, via SCRIPT/JSON • Example: • http://books.google.com/books?jscmd=viewapi&bibkeys=0060731338&callback=callThisFunction callThisFunction({"0060731338":{"bib_key":"0060731338", "info_url": "http://books.google.com/books?id=HCInGwAACAAJ\x26source=gbs_ViewAPI", "preview_url": "http://books.google.com/books?id=HCInGwAACAAJ\x26source=gbs_ViewAPI",“ preview":"noview", "embeddable":false}}); CS 5565 Spring 2009

  9. HTTP & AJAX • AJAX Frameworks no longer build entire web pages from an HTML description • Rather: bootstrap small amount of code, then dynamically load and update page “piece-by-piece” • Will explore this in HTTP Wireshark Lab CS 5565 Spring 2009

  10. Goal – Use of AJAX Submit button pressed Submit button pressed Page 1 Servlet1 Servlet1-1 Update portion of page HTML Page returned Page 2 Submit button pressed Mouse Hover Servlet 2 Servlet 1-2 Page 3 HTML Page returned Update Portion of Page Conventional Navigation Model AJAX Navigation Model

  11. Rich User Interaction with AJAX • Ad hoc AJAX programming problems • Browser Incompatibility • JavaScript development • Scripting language • History of ad hoc usage causing un-maintainable code • Developers responsible for low level details • AJAX Frameworks • Provide libraries, API for above problems • Save development time and effort • Variety of frameworks to choose from

  12. Server centric vs. Client centric AJAX frameworks Browser Browser Generated HTML+ JavaScript Client Side AJAX Engine Application HTML+ JavaScript Client Side AJAX Engine Dom Dom Server Side AJAX Engine Web Application Web Application Server Server Server-Centric Client-Centric Framework code Application Code Generated Code

  13. Application Protocols Part 2: DNS

  14. People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams “name”, e.g., www.yahoo.com - used by humans Q: map between IP addresses and name ? Domain Name System: distributed database implemented in hierarchy of many name servers application-layer protocol host, routers, name servers to communicate to resolvenames (address/name translation) – not built into the network! DNS: Domain Name System CS 5565 Spring 2009

  15. Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance doesn’t scale! DNS services Hostname to IP address translation Host aliasing Canonical and alias names Mail server aliasing Load distribution Replicated Web servers: set of IP addresses for one canonical name DNS CS 5565 Spring 2009

  16. Root DNS Servers org DNS servers edu DNS servers com DNS servers poly.edu DNS servers umass.edu DNS servers pbs.org DNS servers yahoo.com DNS servers amazon.com DNS servers Distributed, Hierarchical Database Client wants IP for www.amazon.com; 1st approx: • Client queries a root server to find .com DNS server • Client queries .com DNS server to get amazon.com DNS server • Client queries amazon.com DNS server to get IP address for www.amazon.com CS 5565 Spring 2009

  17. Resource Types CS 5565 Spring 2009

  18. List published at ftp://ftp.internic.net/domain/named.cache See http://www.root-servers.org/ Replicated using IP anycast See Links section at website for more information DNS: Root Name Servers a Verisign, Dulles, VA c Cogent, Herndon, VA (also Los Angeles) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 11 locations) 13 root name servers worldwide k RIPE London (also Amsterdam, Frankfurt) i Autonomica, Stockholm (plus 3 other locations) m WIDE Tokyo e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 17 other locations) b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA CS 5565 Spring 2009

  19. TLD and Authoritative Servers • Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp, .... • Network solutions maintains servers for com TLD • Educause for edu TLD • Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail). • Can be maintained by organization or service provider CS 5565 Spring 2009

  20. Caching and Local Name Servers • Q: do we want every (of the 280 million) Internet hosts be contacting a dozen or so root servers all the time? • A: No. Caching is needed • Local Name Servers bundle queries by clients they serve and cache their results CS 5565 Spring 2009

  21. Local Name Server • Does not strictly belong to hierarchy • When a host makes a DNS query, query is sent to its local DNS server • Acts as a proxy, forwards query into hierarchy. • Each ISP (residential ISP, company, university) has one (or more.) • Also called “default name server” or resolver • Contacted by resolver library (libresolv.so, or part of libc – provides such functions as gethostbyname(), getaddrinfo() etc. – more on this later CS 5565 Spring 2009

  22. Once (any) name server learns mapping, it caches mapping cache entries time out (disappear) after some time 86,400 seconds per day TLD servers typically cached in local name servers Thus root name servers not often visited Aside: Local Name Server crucial resource Proper cache management required See Bernstein’s comments on caching in BIND (Berkeley Internet Name Domain) program Caching Records CS 5565 Spring 2009

  23. DNS Protocol: Query Types • Possible constellations: • Client’s resolver library talks to local name server • Local name server talks to other name servers: root server, TLD servers, … • Beauty of DNS Protocol: same protocol can be used for either constellation • Uses two query types • Recursive: “please resolve this name for me and send me the result” • Good for client, harder for server • Iterated: “please tell me what you know about the name – partial resolution is okay, I’ll ask the next server in hierarchy” • Easy for server, harder for client CS 5565 Spring 2009

  24. Host at gback.cs.vt.edu wants IP address for godmar.stanford.edu Sends recursive query to voodoo Voodoo performs iterative queries local DNS server voodoo.slo.cs.vt.edu root DNS server a.root-servers.net Recursive vs. Iterative Queries 2 TLD DNS server a3.nstld.com 3 4 5 6 7 1 8 authoritative DNS server Argus.stanford.edu requesting host gback.cs.vt.edu godmar.stanford.edu CS 5565 Spring 2009

More Related