hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2678) version the REST interface
Date Mon, 07 Jun 2010 18:56:39 GMT

    [ https://issues.apache.org/jira/browse/HBASE-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876361#action_12876361
] 

Andrew Purtell commented on HBASE-2678:
---------------------------------------

bq. Is the 'vnd.' prefix like 'x-'?  

vnd.foo+type is a common convention for vendor specific content types, like x-. 

bq. I seem to be missing how this versions the interface.  Where is the version number in
the above?

It's not a version per se, but an alternate and newer representation type. So the current
set of media types will correspond to "version 1" and the new media types will correspond
to "version 2". At the next major release, support for both sets of types will collapse to
just "version 2". If we ever have to do this again, we can use the "vnd.foo+type" media types
to select "version 3" etc.

But anyway we can actually provide numeric versioning like

{{vnd.hbase.vN+type}}

and so why not if that would possibly reduce confusion.



      




> version the REST interface
> --------------------------
>
>                 Key: HBASE-2678
>                 URL: https://issues.apache.org/jira/browse/HBASE-2678
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>
> As mentioned in HBASE-2563, we should deprecate all uses of _cell_ in the API and replace
with new APIs that use _value_ instead. So we need a way to version the REST interface, to
provide an updated API while maintaining access to the deprecated one until the next major
revision. However, something like this I consider wrong:
> {{/path/to/v1/resource}}
> and also:
> {{/v2/path/to/resource}}
> because the resource is the same regardless of the representation change. REST makes
a distinction between the representation and the resource using media types. 
> Currently Stargate supports the following encodings:
> * {{text/plain}}  (in some cases)
> * binary: {{application/octet-stream}} (freeform, no schema change needed)
> * XML: {{text/xml}}
> * JSON: {{application/json}}
> * protobufs: {{application/x-protobuf}}
> We can add Avro encoding support in HBASE-2557 with the new representation as {{application/x-avro-binary}}
immediately. For XML, JSON, and protobuf encoding, we can support new representations using
the following new media types in the current version:
> * XML: {{application/vnd.hbase+xml}}
> * JSON: {{application/vnd.hbase+json}}
> * protobufs: {{application/vnd.hbase+protobuf}}
> * and for sake of consistency: {{application/vnd.hbase+avro}}
> and then in the next major version recognize both MIME types but return the same (newer)
representation. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message