Git Product home page Git Product logo

libslave's Introduction


ABOUT
-------------------------------------------------------------------

This is a library that allows any arbitrary C++ application to connect
to a Mysql replication master and read/parse the replication binary
logs.

In effect, any application can now act like a Mysql replication slave,
without having to compile or link with any Mysql server code.

One important use-case for this library is for receiving changes in
the master database in real-time, without having the store the
master's data on the client server.


USAGE
-------------------------------------------------------------------

Build requirements:

For building the library, you will need:

 * g++

 * The standard mysql C client libraries. (libmysqlclient)

 * The headers of the boost libraries. (http://www.boost.org)
   At the minimum, you will need at least the shared_ptr.hpp, function.hpp,
   any.hpp and bind.hpp.

 * You (likely) will need to review and edit the contents of Logging.h
   and SlaveStats.h
   These headers contain the compile-time configuration of the logging
   and monitoring subsystems.
   The provided defaults are sub-standard and an example only.

Usage requirements:

 * Requires Mysql 5.1.23 or above. Tested only with some of the 5.1
   versions of mysql servers.

Compiling:

Edit Makefile to set the path of your boost includes and your build
options; type 'make' to build a static and a shared version of the
library. And You will use a cmake by your shell:

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=PATH_TO_INSTALL
make && make install

Support same without static lib -DENABLE_STATIC=OFF.


Review and edit Logging.h and SlaveStats.h to interface the library to
your app's logging and monitoring subsystems.

Note: The enclosed Makefile is intended only as a demonstration,
not a complete build solution.


Using the library: 

Please see the examples in 'test/'. 

You can find the programmer's API documentation on our github wiki
pages, see https://github.com/Begun/libslave.


CREDITS
-------------------------------------------------------------------

(c) 2011, ZAO "Begun"

https://github.com/Begun/libslave

This library is licensed under the GNU LGPL. Please see the file LICENSE.

libslave's People

Contributors

ivan-tkatchev avatar vozbu avatar zloidemon avatar itkatchev avatar jwatte avatar yalekseev avatar

Watchers

 avatar James Cloos 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.