Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A broader view of all the scenarios is located at http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Scenarios.

Explanation of the use of caching in HTTP is in the HTTP spec at http://tools.ietf.org/html/rfc2616. Explanation of the use of caching in Atom is explained in the Atom spec at http://tools.ietf.org/html/rfc5023.

Understanding Data Caching using ETags, Last-Modified, and other Header Commands

...

Hyper Text Transfer Protocol (HTTP), the basis of the web, has support to help limit or cache the amount of data shared between a client and server by adding tags to a resource reques. These header tags are the ETag and the Last-Modified tags. When used with a predicate tag such as If-Match, If-Not-Match, If-Modified-Since, If-Unmodified-Since, etc., the client and the server can avoid shipping large pieces of data when updated data is not needed. The following scenarios show how Tuscany supports this form of caching throught ETags, Last-Modified, and other Header Commands.

  • Posting new data to a feed
    (

...

  • Show data post request, item does not exist on server, server response

...

  • code 200, return data body)
  • Updating existing data in a feed

...


  • (

...

  • Show data update put, If-Match precondition

...

  • , item is newer and matching, matching return code 412)
  • Requesting existing data
    (

...

  • Show get via ETag, If-None-Match precondition,

...

  • modified data item, matching content returned)
  • Requesting stale data
    (

...

  • Show get via ETAG, If-None-Match precondition, unmodified data item,

...

  • not modified return code 304)
  • Requesting up-to-date data
    (

...

  • Show request via last-modified date, data is unmodified, Not modified return code 304)
  • Requesting out-of-date data
    (

...

  • Show request via last-modified date, data is modified, updated data is returned)

Additional items provided by Luciano on the Tuscany dev list on 2008-08-02:

  • Read a feed for the first time, read a second time passing the eTag received and make sure we get a 304 HTTP Status code.
  • Read a entry, update a entry, read a second time passing the eTag from the first read and make sure we get the updated entry and not a 304 HTTP Status code.

Support for postMedia, putMedia and other Streaming Data

...