PHPackages                             basho/riak-pb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. basho/riak-pb

ActiveLibrary[Database &amp; ORM](/categories/database)

basho/riak-pb
=============

Official Riak Protocol Buffers client for PHP

1.3.0(9y ago)77.2k6Apache-2.0PHPPHP &gt;=5.5

Since Dec 9Pushed 9y ago50 watchersCompare

[ Source](https://github.com/basho/riak-phppb-client)[ Packagist](https://packagist.org/packages/basho/riak-pb)[ Docs](http://basho.com/riak/)[ RSS](/packages/basho-riak-pb/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (7)Dependencies (4)Versions (11)Used By (0)

Riak PB Client for PHP
======================

[](#riak-pb-client-for-php)

- [![Packagist](https://camo.githubusercontent.com/08b08cf5c82b5609011783b5c8ea7587bda45edd3a9aa29c38834aea2b3b8cef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626173686f2f7269616b2d70622e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/basho/riak-pb)
- Build status: [![Build Status](https://camo.githubusercontent.com/df66592ff3238678ecfb2141f94de3db5ab440c1d993ca016ec758984ac5e00b/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f626173686f2f7269616b2d70687070622d636c69656e742e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/basho/riak-phppb-client)

**Riak PHP PB Client** is a client which makes it easy to communicate with [Riak](http://basho.com/riak/), an open source, distributed database that focuses on high availability, horizontal scalability, and *predictable* latency. Both Riak and this code is maintained by [Basho](http://www.basho.com/).

To see other clients available for use with Riak visit our [Documentation Site](http://docs.basho.com/riak/latest/dev/using/libraries)

Installation
------------

[](#installation)

### Dependencies

[](#dependencies)

This library requires PHP 5.4+ and allegro/protobuf PHP extension (instructions below).

### Composer Install

[](#composer-install)

Run the following `composer` command:

```
$ composer require "basho/riak-pb": "1.2.*"
```

Alternately, manually add the following to your `composer.json`, in the `require` section:

```
"require": {
    "basho/riak-pb": "1.2.*"
}
```

And then run `composer update` to ensure the module is installed and all dependencies retrieved.

Next, you need to run the following command to install the needed extension for PB support:

```
make install-protobuf
```

Finally, you need to make sure the newly installed extension is being included with your PHP environment via `php.ini`or a php configuration file (`*.conf`).

```
extension=protobuf.so

```

You can confirm that it is enabled for the command line environment with the following command.

```
php -m | fgrep protobuf
```

Documentation
-------------

[](#documentation)

A fully traversable version of the API documentation for this library can be found on [Github Pages](http://basho.github.io/riak-phppb-client).

### Example Usage

[](#example-usage)

Below is a short example of using the client. More substantial sample code is available [in examples](/examples).

```
// lib classes are included via the Composer autoloader files
use Basho\Riak;
use Basho\Riak\Api\Pb;
use Basho\Riak\Node;
use Basho\Riak\Command;

// define the connection info to our Riak nodes
$nodes = (new Node\Builder)
    ->onPort(10018)
    ->buildCluster(['riak1.company.com', 'riak2.company.com', 'riak3.company.com',]);

// instantiate the Riak client
$riak = new Riak($nodes, [], new Pb());

// build a command to be executed against Riak
$command = (new Command\Builder\StoreObject($riak))
    ->buildObject('some_data')
    ->buildBucket('users')
    ->build();

// Receive a response object
$response = $command->execute($command);

// Retrieve the Location of our newly stored object from the Response object
$object_location = $response->getLocation();
```

Contributing
------------

[](#contributing)

This repo's maintainers are engineers at Basho and we welcome your contribution to the project! You can start by reviewing [CONTRIBUTING.md](CONTRIBUTING.md) for information on everything from testing to coding standards.

### An honest disclaimer

[](#an-honest-disclaimer)

Due to our obsession with stability and our rich ecosystem of users, community updates on this repo may take a little longer to review.

The most helpful way to contribute is by reporting your experience through issues. Issues may not be updated while we review internally, but they're still incredibly appreciated.

Thank you for being part of the community! We love you for it.

License and Authors
-------------------

[](#license-and-authors)

- Author: Christopher Mancini ()
- Author: Alex Moore ()
- Author: Luke Bakken ()

Copyright (c) 2015 Basho Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"). For more details, see [License](License).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~88 days

Total

7

Last Release

3483d ago

PHP version history (2 changes)v1.0.0-alphaPHP &gt;=5.4

v1.1.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf74f27d9dc3da65ef59f9654dc4c3f9d3c7fd0b82f330adda0cafa5bda9c0d8?d=identicon)[christophermancini](/maintainers/christophermancini)

---

Top Contributors

[![christophermancini](https://avatars.githubusercontent.com/u/131620?v=4)](https://github.com/christophermancini "christophermancini (11 commits)")[![lukebakken](https://avatars.githubusercontent.com/u/514926?v=4)](https://github.com/lukebakken "lukebakken (9 commits)")[![alexmoore](https://avatars.githubusercontent.com/u/1438?v=4)](https://github.com/alexmoore "alexmoore (3 commits)")

---

Tags

clientdatadatabasenosqldriverriakdatatypebashokvcrdtpb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/basho-riak-pb/health.svg)

```
[![Health](https://phpackages.com/badges/basho-riak-pb/health.svg)](https://phpackages.com/packages/basho-riak-pb)
```

###  Alternatives

[basho/riak

Official Riak client for PHP

158247.7k7](/packages/basho-riak)[datastax/php-driver

DataStax PHP Driver for Apache Cassandra

436528.0k19](/packages/datastax-php-driver)[mroosz/php-cassandra

A pure-PHP client for Apache Cassandra and ScyllaDB with support for CQL binary protocol v3, v4 and v5 (Cassandra 2.1+ incl. 3.x-5.x; ScyllaDB 6.2 and 2025.x), synchronous and asynchronous APIs, prepared statements, batches, result iterators, object mapping, SSL/TLS, and LZ4 compression.

206.8k3](/packages/mroosz-php-cassandra)[tbolier/php-rethink-ql

A clean and solid RethinkDB driver for PHP.

5211.7k](/packages/tbolier-php-rethink-ql)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
