Here are three sets of requirements as I see them:
Structured key-value pair storage and cursors
- Store, remove, and retrieve individual data items
- items identified by a string key
- item values can be either null, object, or string
- Allow duplicate values for the same key
- Allow organization of items in to more than one database per application
- Sequentially walk items in a cursor starting at a point identified by a key value
- items should be presented in an increasing key value as determined by JavaScript's String comparison operator '=='
- once the highest key value is reached, no more items are provided
- if the matching key value is empty, the first key in the database is the starting point
- can walk through items in reverse order
- items obtained in the cursor are deletable - IOW, cursor is modifiable
- Provide a sequence object in each database to generate a monotonically increasing sequence of numbers
- A database belongs to a single storage unit.
- Applications are able to open or create a storage unit.
- Allow storage of multiple items to be committed as part of an atomic transaction
- Offer READ_COMMITTED and READ_UNCOMMITTED cursors
- Transaction scope is limited to operations on databases within the same storage unit.
- All APIs are synchronous
- capture a resource that is used for satisfying GET & HEAD requests
- given just its URL, fetch and durably store its representation
- as a locally produced representation
- over write an existing representation
- given just its URL, fetch and durably store its representation
- retrieve or remove a resource's representation or check for its presence
- Store the methods on resources that are locally intercepted
- Choose among the following for a locally intercepted method
- Pass the headers and body of the request, without jeopardizing security, to the programmed interceptor
- Make the request to the server, relay the request and the response to the programmed interceptor, and return the response to the application

A pictorial representation of the layers involved in an implementation of CouchDB to run in a browser captures the contrast between the existing and the proposed breakdown of Web Storage.
The browser is then required to do the switching between off-line and on-line and between relay and intercept as I explain in the post on BITSY 0.5.
As I see it, these requirements subsume the requirements known to date for Ian Hickson's Web Storage draft. Were it not for the widespread use of LocalStorage, we could do away with it completely because the b-tree store is a more robust way of dealing with key-value pairs. However, there is no reason and, hopefully, little chance of the SQL portion making its way to the W3C hall of fame, I mean Rec.


0 comments:
Post a Comment