Client Libraries
Basho officially supports a number of open-source client libraries for various programming languages and environments.
| Language | Source | Documentation | Download |
|---|---|---|---|
| Erlang | riak-erlang-client (riakc) riak-erlang-http-client (rhc) | edoc | |
| Java | riak-java-client | javadoc, wiki | Maven Central |
| PHP | riak-php-client | doxygen | |
| Python | riak-python-client | sphinx | PyPI |
| Ruby | riak-ruby-client | rdoc, wiki | RubyGems |
All official clients use the integrated issue tracker on Github for bug reporting.
In addition to the official clients, Basho provides some unofficial client libraries, listed below. There are also many client libraries and related projects provided by the community.
| Language | Source |
|---|---|
| C/C++ | riak-cxx-client |
| Javascript (jQuery) | riak-javascript-client |
Feature Matrix
Below is a series of tables that compares the functionality of our official client libraries with the features exposed by Riak’s API, and also compares features that are desirable in well-developed clients. We have developed this matrix in an effort to ensure feature-parity across the different clients.
Legend:
✓- has feature✗- lacks featuretext- partially supports feature- (blank) - unknown
HTTP
| Bucket Operations | Erlang (rhc) | Java | PHP | Python | Ruby |
|---|---|---|---|---|---|
| List buckets | ✓ | ✓ | ✓ | ✓ | ✓ |
| List keys | ✓ | ✓ | ✓ | ✓ | ✓ |
| Get Bucket Properties | partial | ✓ | ✓ | ✓ | ✓ |
| Set Bucket Properties | partial | ✓ | ✓ | ✓ | ✓ |
| Object/Key Operations | Erlang (rhc) | Java | PHP | Python | Ruby |
| Fetch Object (get) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Fetch w/quorums | no PR | ✓ | no PR | ✓ | ✓ |
| Store Object (put) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Store w/quorums | no PW | ✓ | no PW | ✓ | ✓ |
| Delete Object | ✓ | ✓ | ✓ | ✓ | ✓ |
| Query Operations | Erlang (rhc) | Java | PHP | Python | Ruby |
| Link Walking | ✗ | ✓ | ✗ | ✗ | ✓ |
| MapReduce | ✓ | ✓ | ✓ | ✓ | ✓ |
| Secondary Indexes | ✗ | ✓ | ✓ | ✓ | ✓ |
| Search | emulated via MapReduce | ✓ | emulated via MapReduce | ✓ | ✓ |
| Server Operations | Erlang (rhc) | Java | PHP | Python | Ruby |
| Ping | ✓ | ✓ | ✓ | ✓ | ✓ |
| Status | partial | ✓ | ✗ | partial | ✓ |
| List Resources | ✗ | ✗ | ✗ | partial | ✓ |
| Luwak Operations (pre 1.1) | Erlang (rhc) | Java | PHP | Python | Ruby |
| Store file | ✗ | ✗ | ✗ | ✓ | ✓ |
| Fetch file | ✗ | ✗ | ✗ | ✓ | ✓ |
| Delete file | ✗ | ✗ | ✗ | ✓ | ✓ |
Protocol Buffers
Note: The PHP client does not support Protocol Buffers and so is excluded from this matrix.
| Bucket Operations | Erlang (riakc) | Java | Python | Ruby |
|---|---|---|---|---|
| List buckets | ✓ | ✓ | ✓ | ✓ |
| List keys | ✓ | ✓ | ✓ | ✓ |
| Get Bucket Properties | ✓ | ✓ | ✓ | ✓ |
| Set Bucket Properties | ✓ | ✓ | ✓ | ✓ |
| Object/Key Operations | Erlang (riakc) | Java | Python | Ruby |
| Fetch Object (get) | ✓ | ✓ | ✓ | ✓ |
| Fetch w/quorums | ✓ | ✓ | ✓ | ✓ |
| Store Object (put) | ✓ | ✓ | ✓ | ✓ |
| Store w/quorums | ✓ | ✓ | ✓ | ✓ |
| Delete Object | ✓ | ✓ | ✓ | ✓ |
| Query Operations | Erlang (riakc) | Java | Python | Ruby |
| MapReduce | ✓ | ✓ | ✓ | ✓ |
| Secondary Indexes (emulated, native) | ✓✗ | ✓✗ | ✓✓ | ✓✓ |
| Search (emulated, native) | ✓✗ | ✓✗ | ✓✓ | ✓✓ |
| Server Operations | Erlang (riakc) | Java | Python | Ruby |
| Ping | ✓ | ✓ | ✓ | ✓ |
| Server Info | ✓ | ✗ | partial | ✓ |
| Get Client ID | ✓ | ✓ | ✓ | ✓ |
| Set Client ID | ✓ | ✓ | ✓ | ✓ |
Additional features
| Protocols | Erlang | Java | PHP | Python | Ruby |
|---|---|---|---|---|---|
| Cluster connections/pools | ✗ | ✓ | ✗ | partial | ✓ |
| Retry failures (on other nodes) | ✗ | ✓ | ✗ | ✗ | ✓ ✓ |
| Failure-sensitive node selection | ✗ | ✗ | ✗ | ✗ | ✓ |
| Automatic protocol selection | ✗ | ✗ | ✗ | ✗ | ✓ |
| Media-Type Handling | Erlang | Java | PHP | Python | Ruby |
| Use arbitrary media types | ✓ | ✓ | ✓ | ✓ | ✓ |
| JSON (de-)serialization | ✗ | ✓ | ✓ | ✓ | ✓ |
| Other included (de-)serializers | Erlang Binary Term Format | ✗ | ✗ | ✗ | YAML, Marshal |
| Custom (de-)serializers | ✗ | ✓ | ✗ | ✓ | ✓ |
| Eventual Consistency | Erlang | Java | PHP | Python | Ruby |
| Exposes siblings | ✓ | ✓ | ✓ | ✓ | ✓ |
| Sibling resolution policies/strategies | ✗ | ✓ | ✗ | ✗ | ✓ |
| Mutators (encapsulating change ops) | ✗ | ✓ | ✗ | ✗ | ✗ |
| Domain Types/Object Mapping | Erlang | Java | PHP | Python* | Ruby* |
| Abstract domain types w/reification | ✗ | ✓ | partial | ✓ | ✓ |
| Embedded/nested domain types | ✗ | ✓ | ✓ | ✓ | |
| Domain-level sibling resolution | ✗ | ✓ | ✗ | ✗ | ✓ |
| Secondary index integration | ✗ | ✓ | partial | ✓ | ✓ |
| Search integration | ✗ | ✓ | ✗ | ✓ | ✗ |
Various community projects provide support for domain types and object mapping in Python and Ruby. The values in the table above represent the aggregate features of the projects listed below:
- Ruby: ripple, risky, and curator.
- Python: riakkit, riakalchemy, and django-riak-engine.
