Choices between HTTP interfaces to Riak
bryan at basho.com
Mon Feb 8 09:10:54 EST 2010
On Thu, Jan 28, 2010 at 4:22 PM, Jay Doane <jay.s.doane at gmail.com> wrote:
> On Jan 28, 2010, at 12:07 PM, Justin Sheehy wrote:
>> If you are using jiak in any way that depends on any of its
>> differences from raw, please pipe up so that we can discuss how best
>> to meet the needs of your use case.
> One difference between the two is that with jiak, keys and buckets are url
> quoted by the client and unquoted by the server so that words containing
> url-unsafe characters such "/", can be used in keys and bucket names. This
> is handy if you want to, e.g., use urls as keys.
Hi, Jay. Sorry we didn't respond to this earlier. In fact, this
difference would not exist between the Jiak and "raw" interfaces. We
fully intend to provide language-specific clients for the raw
interface, just as we have done so for the Jiak interface, and those
clients would handle quoting of buckets and keys, just like Jiak does
now. In fact, initial implementations of the raw clients have
provided very similar APIs to what Jiak has now.
> I'm currently working to understand the ramifications of trying to handle
> such cases entirely on the client side using the raw http interface.
The biggest ramification of switching from Jiak to raw is that the raw
interface does not enforce any sort of schema, like the Jiak one does.
This may sound scary to some, but we've found that most Riak users
are more confused by Jiak's schema system than they are helped by it.
The other difference is that the Jiak and raw resources store data in
Riak differently. So, even if you're using JSON trough the raw
interface, any JSON data you stored through the Jiak interface will
have to be converted. If there are enough people who need a
translation tool for existing data, we can clean up one we've written.
Given that the raw resource supports JSON just as well as it supports
BSON, XML, plain text, and binary data like images, while also being a
bit cleaner and more efficient, we feel that deprecating Jiak and
moving to the "raw" interface exclusively is a good tradeoff.
More information about the riak-users