mrb/riakpbc — pull request #2 by boj (2013-05-23 10:02:00+00:00)
Title: update to 1.4 riak protobuf + bug fixes

Hello.

This is quite a massive update, although no actual API changes. I will detail the important pieces below.

## Update to Riak Protocol Buffers v1.4

They have broken the `.proto` files out, this update adds the new change.

## Testing and Benchmarks

These were broken in the original master branch. They now correctly run.

I changed the test assertions to display the err messages, since asserting that they aren't nil alone isn't very useful for debugging.

I also changed the port they run on to the Riak default of `8087`.

## Idiomatic Go

I shortened various things into more idiomatic Go, such as compact parameter types, and better err handling.

## Connection Read()

Your latest fix from 512 to 1024*1024*5 was allocating **5mb** of memory for every single Read. I've changed it so it only allocates and reads the necessary amount of data based on the initial message length as defined by the first 4 bytes of the message header.

## Bug Fixes

There were a lot of weird places with err being checked that didn't make sense, code written in such a way that everything beyond it would never execute, and some misplaced code as well (specifically the request/response Write/Read retries).

If you are curious what was broken please check the diffs for this update.

## Etc.

Anyways, nice little code base. I mean no disrespect to the group working on `goriakpbc`, but your library seemed a tad cleaner to me.

Hope these changes make sense and can find their way into the master branch. If there's anything I missed don't hesitate to point it out.