Giter VIP home page Giter VIP logo

riack's Introduction

#Riack Is a C client library for Riak.

##Compilation ###Dependencies

####cmake Riack uses cmake build system which means it can be compiled on most systems. Make sure you have installed cmake if not find it here http://www.cmake.org/ or if your fortunate enough to be an OS with a package manager just install it with that.

###Ready Get a prompt and move to Riack top folder and do

cmake src/

This will generate make files, and you can run a make afterwards, unless your on windows in which case I recommend generating a visual studio project this is done like this:

cmake src/ -G "Visual Studio 10"

Note on windows you might need to tell cmake where to find the Protobuf-C files You can do this by passing some options to cmake which is hard to remember ;) I recommend to just edit src\cmake\Modules\FindProtoBufC.cmake lines 19 & 20.

##Examples To se examples of this look in the examples directory.
Before the examples can run you must place the compiled library files in the precompiled folder (see the precompiled/README.md file for details).

##Tests To make all tests succeed you need a running riak server with eleveldb backend and riak search enabled in app.config. You also need to have seach enabled on the ´testsearch´ bucket, this can be done using the riak search-cmd like this:

search-cmd install testsearch

Futhermore an active bucket type called ´riack_bt_test´ needs to exist, can be done like this:

riak-admin bucket-type create riack_bt_test
riak-admin bucket-type activate riack_bt_test

If your server is running on localhost with port 8087 set as protocol buffer port, you can run it right away, if not you need to input the ip and port in src/CMakeLists.txt line 4 & 5 and rerun cmake When ready you can simply do a make test. (on windows just choose the correct build target in Visual Studio)

##Built with Riack

###php_riak PHP extension featuring persistent connection, autoreconnect and a PHP session module. https://github.com/TriKaspar/php_riak

###Riack++ A C++ wrapper can be found here https://github.com/TriKaspar/riack_cpp It does not require anything but riack and a C++ compiler.

##Disclamer This is a sparetime project, so if you so a silly bug don't blame my employer, instead make a pull request ;)

riack's People

Contributors

bachpedersen avatar dowski avatar guilhermeblanco avatar horms avatar radev avatar yohabe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riack's Issues

Building problems

Trying to build some examples. There is function (at least it should be according to the code) riak::make_client. I cannot find it in sources.
How to build these examples?
For example: riak-cpp-master/test/load/readwrite.cxx.

Event handling

Streaming needs two connections to make sense without, which is sad.

installed riack_defines.h references ints.h which is not installed

ints.h is #included from riack_defines.h whereas is it not installed. Actually installing that file does not resolve the issue either as ints.h is #including riack_config.h which I believe is internal and should not be installed.
With the current setup, it is not possible to #include "riack.h" from third party code.
Removing the #include ints.h line from the installed riack_defines.h solves the compilation issue, at least on debian and centos.
Edit: This is using the 1.4 release and/or branch

consistency level

hi, just simple question.

can i set the consistency level of read/write by setting object.content_count?

thanks

HTTP Support

Why not, it should be possible without changing much in the API.
A lot of refactoring of code needed, it would be a good thing to get some better code separation anyways.

Invalid error code used for riack_send_message and need to check get_resp

riack_send_message is defined as returning an uint32_t but it has a return -1 on error. Changing this to return 0 fixes the issue but since this is one of the few functions that is uint32_t instead of int I wasn't sure whether it would be better to convert it to return int instead.

Also in riack_get there is a missing check for whether the get_resp is valid. If the rpb_get_resp__unpack fails then the code will dereference an invalid pointer.

Implement PBC head support

Hi,

According to Riak PBC Client Adapter, it's possible to check if a key exists on Riak Cluster without actually transferring the content. It's called a HEAD operation.

It operates the same way as a get operation, but your response is a RiakObject with all meta but value as null.

http://basho.github.io/riak-java-client/1.1.1/com/basho/riak/client/raw/pbc/PBClientAdapter.html#head%28java.lang.String,%20java.lang.String,%20com.basho.riak.client.raw.FetchMeta%29

Cheers,

Keep alive

Enable keep-alive options on socket communication

Windows build failes, missing protoc

I am getting this error when I try to compile the code because I am missing protocol buffers. I have protoc on my PC but how do I tell riack to use it?

cmake src
CMake Error at e:/dev/3rdparty/cmake/cmake-2.8.10.2-win32-x86/share/cmake-2.8/Mo
dules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find ProtoBufC (missing: PROTOBUFC_INCLUDE_DIR
PROTOBUFC_LIBRARIES)
Call Stack (most recent call first):
e:/dev/3rdparty/cmake/cmake-2.8.10.2-win32-x86/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindProtoBufC.cmake:46 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:13 (find_package)

-- Configuring incomplete, errors occurred!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.