Giter Site home page Giter Site logo

aerospike-client-hhvm's Introduction

Aerospike HHVM Client

This is a prototype of an Aerospike client implemented as a HHVM Native Interface extension.

Currently builds on 64-bit Ubuntu 14.04 LTS against HHVM 3.9.1, with the aerospike C client release 3.1.16. We intend to support HHVM LTS releases.

Documentation

Documentation of the Aerospike HHVM Client may be found in the doc directory. The API described there is the specification for the PHP Client. Notes on the internals of the implementation are in doc/internals.md.

Example PHP code can be found in the examples/ directory.

Full documentation of the Aerospike database is available at http://www.aerospike.com/docs/

Install HHVM

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository "deb http://dl.hhvm.com/ubuntu trusty-lts-3.9 main"
sudo apt-get update
sudo apt-get install -y hhvm
sudo apt-get install -y hhvm-dev

Install HHVM on Other Distros

The HHVM manual provides prebuilt packages for different distributions. You need to install the hhvm and hhvm-dev packages.

HHVM requires g++ >= 4.8. The individual distribution links in the Distro Building Instructions article explain how to upgrade to this version in older distros such as Debian 7.

Install Aerospike C client

Get the 3.1.16 release of the Aerospike C Client library, and install the development package contained in the tar archive.

For example, on Ubuntu 14.04:

wget -O aerospike-c-client.tgz http://www.aerospike.com/download/client/c/3.1.16/artifact/ubuntu12
tar zxvf aerospike-c-client.tgz
cd aerospike-client-c-3.1.16.ubuntu12.04.x86_64
sudo dpkg -i aerospike-client-c-devel-3.1.16.ubuntu12.04.x86_64.deb

Build and Install the Aerospike HHVM Client

In the cloned repo:

cd src/aerospike
hphpize
cmake . && make
sudo make install

The make install step should state the path where the extension is installed. You will use that path in the next step (Configure). On Ubuntu you will often see the following:

-- Installing: /usr/lib/x86_64-linux-gnu/hhvm/extensions/20150212/aerospike-hhvm.so

Troubleshooting

If during the build you see an error that complains about the location of Aerospike header files (for example, fatal error: aerospike/aerospike_key.h: No such file or directory) you will need to edit the config.cmake file.

  • Edit the target_link_libraries to the path containing the C client (libaerospike.so).
  • Edit include_directories to the directory which contains the C client's header files.

Configure HHVM to Load the Extension

Add the extension to HHVM by editing /etc/hhvm/php.ini as follows:

hhvm.extensions[] = /path/to/aerospike-hhvm.so

On Ubuntu this is often:

hhvm.extensions[] = /usr/lib/x86_64-linux-gnu/hhvm/extensions/20150212/aerospike-hhvm.so

Test

Run the unit tests as described in the tests section README.

aerospike-client-hhvm's People

Contributors

pavanrao-gslab avatar pratimamane-gslab avatar raunaksabhani-gslab avatar rbotzer avatar vishalbudhawant-gslab avatar wchu-citrusleaf avatar

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.