GithubHelp home page GithubHelp logo

creative-quant / voltdb-client-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voltdb/voltdb-client-cpp

0.0 2.0 0.0 37.86 MB

VoltDB C++ wireprotocol and client implementation

License: Other

Shell 0.06% C++ 70.30% C 27.43% Assembly 0.90% Makefile 0.35% Java 0.96%

voltdb-client-cpp's Introduction

VoltDB CPP Client Library

The VoltDB client library implements the native VoltDB wire protocol. You can use the library to connect to a VoltDB cluster, invoke stored procedures and read responses.

The Using VoltDB Guide explains how to use the CPP library in [Chapter 15.1: C++ Client Interface.] (http://docs.voltdb.com/UsingVoltDB/ChapOtherClientAPI.php)

Binaries for 64-bit Linux and 64-bit OSX 10.5+ are provided. The linking instructions below apply to the Linux binaries.

New Features in V5.2

You can now use SHA-256 to hash password for authentication request. V5.2 onward server is required. The default is SHA-1. To use SHA-256 create client config as

voltdb::ClientConfig config("myusername", "mypassword", voltdb::HASH_SHA256);
voltdb::Client client = voltdb::Client::create(config);

New Features in V4

When connected to multiple nodes in the cluster, the client library will enable client affinity and can auto-reconnect to restarted nodes.

Prerequisites

  • Boost C++ Library 1.53.0 or above.

Building

This does not apply if you have downloaded the kit from voltdb.com

Simply type make in the unpacked directory to build the client library. It will generate a shared library and a static library for linking your program against.

Building the kit samples

In terminal go to the examples directory then run:

make

This will build the HelloWorld, AsyncHelloWorld and Voter applications that you can then run against a locally running HelloWorld or Voter database.

You can additionally view the source code of the c++ client library and the examples online at:

  https://github.com/VoltDB/voltdb-client-cpp

Linking against libvoltdbcpp.a

Only applies for linux distribution

The following command will compile and link an example client (clientvoter.cpp) libvoltdb.a.

Note that -lrt and -pthread must appear after the object files being compiled/linked in more recent Linux distributions.

Directory structure for this example:

./clientvoter.cpp        # Example client
./include                # Directory containing client library headers
./                       # Directory containing client library archive
g++ -I./include/                 \
clientvoter.cpp                  \
./libvoltdbcpp.a                 \
./libevent.a                     \
./libevent_pthread.a             \
-lrt                             \
-pthread                         \
-lboost_system                   \
-lboost_thread                   \
-o voter

Note that -lrt should not be included for the mac edition. See the example makefile for more detail.

voltdb-client-cpp's People

Watchers

 avatar  avatar

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.