APIs and Clients #11
martinsumner
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The subject of client development and maintenance has been raised on OpenRiak team calls, so I thought it would be useful to have a discussion available here.
Two APIs
Riak has two APIs at present - one HTTP-based, and one PB-based. There is then the option for each API to overlay TLS encryption and authentication. Some points of note:
riak_test
system generally tests each service using only one of the APIs, and not both, and if both are tested the tests are not necessarily identical;Anecdotally, it seems that most large users of Riak use the PB API, as performance matters, but use of the HTTP API exists. Preference for the HTTP API is generally because:
There would be advantages of having a single API in the future - but if so which one should it be?
The existence of two APIs complicates future choices about client development:
If two APIs are maintained, should there be a preferred API for clients to be developed against?
Clients
Previously, basho supported 8 different clients (Java, Ruby, C#, Python, PHP, Node.js, Erlang, Go), and there were around 100 community-led client projects. On basho's demise, the decision was made to maintain only the two Erlang clients. These clients were maintained for testing purposes only, so without effort to maintain usability.
The decision to drop client support was based on the following:
There remains though an appetite for clients, and a negative perception on the project created by all the open-source available clients being so far out-of-date.
As a workaround for having clients, documenting the Riak HTTP API in OpenAPI has been investigated. The initial results of that is that the existing HTTP API is not OpenAPI compatible. The OpenAPI specification does not allow for templated HTTP header names, and expects headers to be used to carry information about the request not the data - and this causes immediate problems with the use of headers for secondary indexes and object-specific metadata.
It is assumed at this point, that the resolution to this is not to have a second HTTP (third overall) API that is OpenAPI compatible.
If there are to be clients in the future though, what should be the priority for the development of those clients:
node_confirms
,sync_on_write
in preference todw
,pw
values - focus on exposing the usable/explainable options).Beta Was this translation helpful? Give feedback.
All reactions