RE: issue 85 - range unit extensions

Kris Zyp wrote:
> > Right now, cache range operations are independent of content type.
> >
> > For the proposal, the name "items" seems too generic for something
> > which only works with JSON (perhaps even only JSON structured in a
> > particular way?).
> >
> > Unless it's understood that cache range operations on "items" must
> > take into account other headers such as Content-Type.  I think that
> > would be reasonable.
> 
> I certainly don't mind using a different name, if the HTTP working
> feels that's more appropriate. I just figured "items" might be
> applicable in multiple content types (applicable to content types
> that support a top-level array-like construct), but I understand
> that if it is felt to be too generic to have a real clear purpose
> in every situation. Maybe "array-items"?

These are all great points and I'd personally like to see items-ranges
become commonplace. However, such a beast *is* quite different from
bytes-ranges since the individual ranges must be joined and enveloped.
When a cache, for example, has the bytes-ranges:

    aaa bbb ccc

...and wishes to combine them into a single response, it joins them with
nothing ('') and envelopes them with nothing ('') to return 'aaabbbccc'.
But a cache holding valid JSON items-ranges:

   "aaa" "bbb" "ccc"

...that wished to return them combined in a single response would have
to join them with a comma and envelop them in brackets to be valid JSON:
'["aaa", "bbb", "ccc"]'.

There may be other media types that follow those same rules, but off the
cuff it seems pretty media-type-specific (unless we abandon the hope
that caches could do that recombination). It's certainly *not*
vendor-specific--there's no need to call them 'Dojo-items' or
'com.dojo.items'. One possibility would be to leave the range
declaration media-type-neutral ('items') and to add range-recombination
rules to the media-type itself, so that RFC 4627 (application/json)
would eventually grow a paragraph on its rules for items-ranges.

> > (Btw, one can easily imagine ranges "characters", "xpath", "xquery",
> > "grep"... even "session".  I'm not sure if that's a desirable road
to
> > go down.  Maybe it would be very useful.)
> 
> "date" ranges is the one other unit that I have felt would be useful,

Which dates did you have in mind?

> but "items" is certainly the most valuable alternate IMO.

Agreed. Collections are everywhere.


Robert Brewer
fumanchu@aminus.org

Received on Monday, 1 September 2008 18:13:05 UTC