Topic 4- Application Layer Flashcards
When programmer creates network applications,
the programmer specifies some details
• Syntax and semantics of messages to be
exchanged • Client or server initiates interaction • Error Control • When to terminate communication
Two broad types of application-layer protocols that depend on intended use:
Private communication
Standardised service
Private communication application
Private communication: communicate over the
Internet with intention for private use
• Straightforward interaction: code can be written
without formal protocol specification
Standardised Service
• Standardised service: expectation that many
programmers will create server software to offer the
service or client software to access the service
• Must be documented independent of
implementation
• Specification must be precise and unambiguous
Application-layer protocols specify two aspects of interaction:
Representation
Transfer
Details on pictures doc
Www standards
HTML
URL
HTTP
More details on the pictures document
HTML Characteristics
Uses textual representation
Describes pages that contain multimedia Follows a declarative rather than procedural paradigm
Provides markup specifications instead of formatting Permits embedded hyperlink in an arbitrary object
Allows a document to include metadata
Further explanation on the pictures document
HTML- Declarative Markup Language
• Declarative: allows one to specify what is to be done,
not how to do it
• Markup language: gives general guidelines for display
and does not include detailed formatting instructions
• Allows a page to specify level of importance of a
heading • Does not require author to specify the exact font,
typeface, point size, or spacing for the heading
HTML Extension
• HTML Extensions: created to allow the specification of an exact font, typeface, point size, and formatting.
Importance of Markup Language- Two advantages:
1- Allows a browser to adapt the page to the underlying
display hardware
Computer screen or smartphone
2-Web page can be formatted for a high-resolution or
low-resolution display
HTTP Characteristic
- Uses textual control messages
- Transfers binary data files
- Can download or upload data
- Incorporates caching
get put head post
in the picture document
cashing
Caching is an important optimization for web access as users tend to visit the same web sites repeatedly. Much of the content on the web consist of large images in formats such as Graphics Image Format (GIF) and Joint Picture Encoding Group (JPEG). Such images often contain backgrounds or banners that do not change frequently. Web browsers can reduce download times significantly by saving a copy of the image in a cache on the disk of the user. Each time the web browser visits the same site again, it uses the cached copy to reduce loading time. However, the web browser must be able to tell whether a cached copy is stale. That is there is an updated version of the image on the server and the cached copy needs to be updated.
When the web browser contacts server, the response header shows the time document was modified. In this case, the web browser saves the Last-Modified date along with the cached copy. Each time a request to the same site is made, the web browser makes HEAD request to the server. The Last-Modified on the server is then compared with the Last-Modified on the cache. If the cached version is stale, the web browser downloads the new version. The algorithm to update the cache is given in Algorithm 4i.
However, HTTP allows web site to include No-cache header that specifies a given item should not be cached. In most cases, web browsers do not cache small items. The reason is that the time to download the item with a GET request is approximately same as time to make a HEAD request, which is relatively fast. Additionally, keeping many small items in cache increases cache lookup times, which defeats the purpose of quick access.
File Transfer Protocol (FTP)
allows sending a copy of a file from one computer to another. It provides a powerful mechanism for the exchange of data. Most FTP applications are one-to-one.
file
A file is the fundamental storage abstraction that holds an arbitrary object like a document, spreadsheet, computer program, graphic image, or data.