Skip to content

gree/flare

Repository files navigation

flare

flare is a distributed, and persistent key-value storage compatible with memcached, with several additional features (as follows):

  • persistent storage (you can use flare as persistent memcached)
  • pluggable storage
  • Tokyo Cabinet
  • Kyoto Cabinet (experimental)
  • data replication (synchronous or asynchronous)
  • data partitioning (automatically partitioned according to the number of master servers (transparent for clients)
  • dynamic reconstruction, and partitioning (you can dynamically (I mean, without any service interruption) add slave servers and partition master servers)
  • node monitoring and failover (if any server is down, the server is automatically isolated from active servers and another slave server is promoted to master server)
  • request proxy (you can always get same result regardless of servers you connect to, so you can think of a flare cluster as one big key-value storage)
  • over 256 bytes keys, and over 1M bytes values are available

flare is free software base on GNU GENERAL PUBLIC LICENSE Version 2.

Supported Operating Systems

flare is mainly developed under following platforms:

  • Debian GNU/Linux (etch or later, both i386 and amd64)
  • Mac OS X (Darwin 9.5.0, i386, amd64)
  • FreeBSD
  • other UNIX like OSs.

Dependent library

Run-time

Build-time

  • gcc
  • autoconf
  • automake
  • libtool

Install from source code on Ubuntu 14.04 (Trusty Tahr)

Installation of depending packages

First, install depending packages by apt-get.

$ sudo apt-get install \
	git \
	locales \
	zlib1g-dev \
	build-essential \
	autoconf \
	automake \
	libtool \
	libboost-all-dev \
	libhashkit-dev \
	libtokyocabinet-dev \
	uuid-dev

Installation of flare

Download source code, and compile it.

$ git clone https://github.com/gree/flare.git
$ cd flare
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install

If you want to optional packages, you should run ./configure with options.
You can see available options by ./configure --help.

For example (when use Kyoto Cabinet):

First, you must install libkyotocabinet-dev in addition to depending packages.

$ sudo apt-get install libkyotocabinet-dev

And run ./configure with --with-kyotocabinet option.

$ ./configure --with-kyotocabinet=/usr/include

Install flare via Nix on Ubuntu or MacOS

We experimentally support development with nix package manager.

Installation of flare

Just type following commands.

# Install nix package manager
$ curl -L https://nixos.org/nix/install | sh
# Install flare
$ nix profile install github:gree/flare

Development of flare via Nix

# Clone source code
$ git clone [email protected]:gree/flare.git

# Enter a development environment of nix
$ nix develop

# Build source codes
$ ./autogen.sh
$ ./configure
$ make
$ make test

Create configuration file

Copy default configuration files from etc, and modify it.

$ sudo cp etc/flarei.conf /etc/
$ sudo cp etc/flared.conf /etc/

Run

Now, you can run flare.

$ sudo /usr/local/bin/flarei -f /etc/flarei.conf --daemonize
$ sudo /usr/local/bin/flared -f /etc/flared.conf --daemonize