GithubHelp home page GithubHelp logo

ghalliday / libcouchbase Goto Github PK

View Code? Open in Web Editor NEW

This project forked from couchbase/libcouchbase

0.0 2.0 0.0 12.69 MB

The couchbase client for C.

License: Apache License 2.0

CMake 1.52% Perl 0.11% C 47.78% C++ 50.46% Shell 0.03% Makefile 0.10% Batchfile 0.01%

libcouchbase's Introduction

Couchbase C Client

This is the C client library for Couchbase It communicates with the cluster and speaks the relevant protocols necessary to connect to the cluster and execute data operations.

Features

  • Can function as either a synchronous or asynchronous library
  • Callback Oriented
  • Can integrate with most other asynchronous environments. You can write your code to integrate it into your environment. Currently support exists for
    • libuv (Windows and POSIX)
    • libev (POSIX)
    • libevent (POSIX)
    • select (Windows and POSIX)
    • IOCP (Windows Only)
  • Support for operation batching
  • Cross Platform - Tested on Linux, OS X, and Windows.

Building

Before you build from this repository, please check the installation page to see if there is a binary or release tarball available for your needs. Since the code here is not part of an official release it has therefore not gone through our release testing process.

Dependencies

By default the library depends on:

  • libevent (or libev) for the primary I/O backend.
  • openssl for SSL transport.
  • CMake version 2.8.9 or greater (for building)

On Unix-like systems these dependencies are checked for by default while on Windows they are not checked by default.

On Unix, the build system will expect to have libevent or libev installed, unless building plugins is explicitly disabled (see further).

Building on Unix-like systems

Provided is a convenience script called cmake/configure. It is a Perl script and functions like a normal autotools script.

$ git clone git://github.com/couchbase/libcouchbase.git
$ cd libcouchbase && mkdir build && cd build
$ ../cmake/configure
$ make
$ ctest

Building on Windows

Assuming git and Visual Studio 2010 are installed, from a CMD shell, do:

C:\> git clone git://github.com/couchbase/libcouchbase.git
C:\> mkdir lcb-build
C:\> cd lcb-build
C:\> cmake -G "Visual Studio 10" ..\libcouchbase
C:\> cmake --build .

This will generate and build a Visual Studio .sln file.

Windows builds are known to work on Visual Studio versions 2008, 2010 and 2012.

If you wish to link against OpenSSL, you should set the value of OPENSSL_ROOT_DIR to the location of the installation path, as described here

Running tests

To run tests, you can use either ctest directly or generated build targets. For Unix-like:

make test

For windows:

cmake --build . --target alltests
ctest -C debug

By default tests will use CouchbaseMock project to simulate the Couchbase Cluster. It allows to cover more different failure scenarios, although does not implement all kinds of APIs provided by real server.

If you need to test against real server, you have to provide comma-separated configuration in LCB_TEST_CLUSTER_CONF environment variable. For example, the following command will run tests against local cluster and bucket default using administrator credentials:

export LCB_TEST_CLUSTER_CONF=couchbase://localhost,default,Administrator,password
make test

Note that specifying username will automatically switch to RBAC mode, which supported by Couchbase Server 5.0+. For old servers the spec will look like couchbase://localhost,default or couchbase://localhost,protected,,secret.

Also tests expecting beer-sample bucket loaded. It comes with the server. Look at "Sample buckets" section of Admin Console.

Bugs, Support, Issues

You may report issues in the library in our issue tracked at https://issues.couchbase.com. Sign up for an account and file an issue against the Couchbase C Client Library project.

The developers of the library hang out in IRC on #libcouchbase on irc.freenode.net.

Examples

Documentation

Documentation is available in guide format (introducing the basic concepts of Couchbase and the library). It is recommended for first-time users, and can be accessed at our Documentation Site.

API documentation is also available and is generated from the library's headers. It may contain references to more advanced features not found in the guide.

API documentation may be generated by running doxygen within the source root directory. When this is done, you should have a doc/html/index.html page which may be viewed.

Doxygen may be downloaded from the doxygen downloads page. Note however that most Linux distributions as well as Homebrew contain Doxygen in their repositories.

$ doxygen
$ xdg-open doc/html/index.html # Linux
$ open doc/html/index.html # OS X

You may also generate documentation using the doc/Makefile which dynamically inserts version information

$ make -f doc/Makefile public # for public documentation
$ make -f doc/Makefile internal # for internal documentation

The generated documentation will be in the doc/public/html directory for public documentation, and in the doc/internal/html directory for internal documentation.

Contributors

The following people contributed to libcouchbase (in alphabetic order) (last updated Nov. 27 2014)

License

libcouchbase is licensed under the Apache 2.0 License. See LICENSE file for details.

libcouchbase's People

Contributors

1tylermitchell avatar avsej avatar brett19 avatar bsubhashni avatar daverigby avatar funny-falcon avatar hisundar avatar ingenthr avatar janl avatar jrepp avatar mcpaddy avatar mnunberg avatar mody avatar nathanejohnson avatar pavel-paulau avatar pierrejoye avatar remicollet avatar stakach avatar stunney avatar trondn avatar vladimirmarkelov avatar vmx avatar wcummings 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.