Riak Protocol Buffers

Protocol buffers used to communicate with Riak

License

License

Categories

Categories

Protobuf Data Data Structures
GroupId

GroupId

com.basho.riak.protobuf
ArtifactId

ArtifactId

riak-pb
Last Version

Last Version

2.0.0.16
Release Date

Release Date

Type

Type

jar
Description

Description

Riak Protocol Buffers
Protocol buffers used to communicate with Riak
Project URL

Project URL

https://github.com/basho/riak_pb
Source Code Management

Source Code Management

http://github.com/basho/riak_pb

Download riak-pb

How to add to project

<!-- https://jarcasting.com/artifacts/com.basho.riak.protobuf/riak-pb/ -->
<dependency>
    <groupId>com.basho.riak.protobuf</groupId>
    <artifactId>riak-pb</artifactId>
    <version>2.0.0.16</version>
</dependency>
// https://jarcasting.com/artifacts/com.basho.riak.protobuf/riak-pb/
implementation 'com.basho.riak.protobuf:riak-pb:2.0.0.16'
// https://jarcasting.com/artifacts/com.basho.riak.protobuf/riak-pb/
implementation ("com.basho.riak.protobuf:riak-pb:2.0.0.16")
'com.basho.riak.protobuf:riak-pb:jar:2.0.0.16'
<dependency org="com.basho.riak.protobuf" name="riak-pb" rev="2.0.0.16">
  <artifact name="riak-pb" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.basho.riak.protobuf', module='riak-pb', version='2.0.0.16')
)
libraryDependencies += "com.basho.riak.protobuf" % "riak-pb" % "2.0.0.16"
[com.basho.riak.protobuf/riak-pb "2.0.0.16"]

Dependencies

compile (2)

Group / Artifact Type Version
com.google.protobuf : protobuf-java jar 2.5.0
org.antlr : antlr-complete jar 3.5.1

Project Modules

There are no modules declared in this project.

Riak Protocol Buffers Messages

  • master: Build Status
  • develop: Build Status

This repository contains the message definitions for the Protocol Buffers-based interface to Riak and various Erlang-specific utility modules for the message types.

This is distributed separately from the Riak server and clients, allowing it to serve as an independent representation of the supported messages. Additionally, the .proto descriptions are broken out by functional area:

  • riak.proto contains "global" messages like the error message and the "server info" calls.
  • riak_kv.proto contains messages related to Riak KV.

Other specifications may arise as more features are exposed via the PB interface.

Protocol

The Riak PBC protocol encodes requests and responses as Protocol Buffers messages. Each request message results in one or more response messages. As message type and length are not encoded by PB, they are sent on the wire as:

<length:32> <msg_code:8> <pbmsg>
  • length is the length of msg_code (1 byte) plus the message length in bytes encoded in network order (big endian).

  • msg_code indicates what is encoded as pbmsg

  • pbmsg is the encoded protocol buffer message

On connect, the client can make requests and will receive responses. For each request message there is a corresponding response message, or the server will respond with an error message if something has gone wrong.

The client should be prepared to handle messages without any pbmsg (i.e. length == 1) for requests where the response is simply an acknowledgment.

In some cases, a client may receive multiple response messages for a single request. The response message will typically include a boolean done field that signifies the last message in a sequence.

Registered Message Codes

Message codes and documentation can be found in the protocol-buffers section of the online docs.

Contributing

Generally, you should not need to modify this repository unless you are adding new client-facing features to Riak or fixing a bug. Nevertheless, we encourage contributions to riak_pb from the community.

  1. Fork the riak_pb repository on Github.

  2. Clone your fork or add the remote if you already have a clone of the repository.

    git clone [email protected]:yourusername/riak_pb.git
    # or
    git remote add mine [email protected]:yourusername/riak_pb.git
    
  3. Create a topic branch for your change.

    git checkout -b some-topic-branch
    
  4. Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.

  5. Push to your fork of the repository and then send a pull-request through Github.

    git push mine some-topic-branch
    
  6. A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.

Build Prerequisites

  • protoc v 2.5.0

On OSX the default version installed by brew is 2.6.x (Nov 2015) this version is too new for the Maven protocol-buffers plugin.

You can install the correct version like so.

  brew tap homebrew/versions
  brew install homebrew/versions/protobuf250
com.basho.riak.protobuf

Basho Technologies

Versions

Version
2.0.0.16
2.0.0.14
2.0.0.11
1.4.0
1.2.1
1.2