Giter VIP home page Giter VIP logo

clus's Introduction

Welcome to Hibari

A Distributed, Consistent, Ordered Key-Value Store

Hibari is a distributed, ordered key-value store with strong consistency guarantee. Hibari is written in Erlang and designed for being:

  • Fast, Read Optimized: Hibari serves read and write requests in short and predictable latency. Hibari has excellent performance especially for read and large value operations

  • High Bandwidth: Batch and lock-less operations help to achieve high throughput while ensuring data consistency and durability

  • Big Data: Can store Peta Bytes of data by automatically distributing data across servers. The largest production Hibari cluster spans across 100 of servers

  • Reliable: High fault tolerance by replicating data between servers. Data is repaired automatically after a server failure

Hibari is able to deliver scalable high performance that is competitive with leading open source NOSQL (Not Only SQL) storage systems, while also providing the data durability and strong consistency that many systems lack. Hibari's performance relative to other NOSQL systems is particularly strong for reads and for large value (> 200KB) operations.

As one example of real-world performance, in a multi-million user webmail deployment equipped with traditional HDDs (non SSDs), Hibari is processing about 2,200 transactions per second, with read latencies averaging between 1 and 20 milliseconds and write latencies averaging between 20 and 80 milliseconds.

Distinct Features

Unlike many other distributed databases, Hibari uses "chain replication methodology" and delivers distinct features.

  • Ordered Key-Values: Data is distributed across "chains" by key prefixes, then keys within a chain are sorted by lexicographic order

  • Always Guarantees Strong Consistency: This simplifies creation of robust client applications

    • Compare and Swap (CAS): key timestamping mechanism that facilitates "test-and-set" type operations
    • Micro-Transaction: multi-key atomic transactions, within range limits
  • Custom Metadata: per-key custom metadata

  • TTL (Time To Live): per-key expiration times

Travis CI Status

http://travis-ci.org/hibari/hibari-ci-wrapper

Branch Erlang/OTP Versions Status Remarks
master 17.5, R16B03-1 master
dev 18.1, 17.5, R16B03-1 dev
hibari-gh54-thrift-api 18.1, 17.5, R16B03-1 hibari-gh54-thrift-api
gbrick-gh17-redesign-disk-storage 18.1, 17.5 gbrick-gh17-redesign-disk-storage no tests, compile only

News

  • Apr 5, 2015 - Hibari v0.1.11 Released. Release Notes

    • Update for Erlang/OTP 17 and R16. (Note: Erlang/OTP releases prior to R16 are no longer supported)
    • Update external libraries such as UBF to the latest versions
    • Enhanced client API: server side rename and server side timestamp
    • New logging format. Introduce Basho Lager for more traditional logging that plays nicely with Unix logging tools like logrotate and syslog
  • Feb 4, 2013 - Hibari v0.1.10 Released. Release Notes

    • A bug fix in Python EBF Client
    • Update for Erlang/OTP R15
    • Support for building on Ubuntu, including ARMv7 architecture
    • Remove S3 and JSON-RPC components from Hibari distribution. They will become separate projects
  • Older News

Quick Start

Please read Getting Started section of Hibari Application Developer Guide.

Hibari Documentation

They are a bit outdated -- sorry, but documentation rework is planned for Hibari v0.6.

Mailing Lists

Hibari Clients

As of Hibari v0.1 (since year 2010), only the native Erlang client is used in production. All other client APIs (Thrift, JSON-RPC, UBF, and S3) are still in proof of concept stage and only implement basic operations.

If you need a client library for other programming language, please feel free to post a request at the Hibari mailing list.

Supported Platforms

Hibari is written in pure Erlang/OTP and runs on many Unix/Linux platforms.

Please see the Supported Platforms page in Hibari Wiki for details.

Roadmap

Please see the Roadmap page in Hibari Wiki for the planned features for Hibari v0.3, v0.5, and v0.6.

Hibari's Origins

Hibari was originally written by Cloudian, Inc., formerly Gemini Mobile Technologies, to support mobile messaging and email services. Hibari was open-sourced under the Apache Public License version 2.0 in July 2010.

Hibari has been deployed by multiple telecom carriers in Asia and Europe. Hibari may lack some features such as monitoring, event and alarm management, and other "production environment" support services. Since telecom operator has its own data center support infrastructure, Hibari's development has not included many services that would be redundant in a carrier environment.

We hope that Hibari's release to the open source community will close those functional gaps as Hibari spreads outside of carrier data centers.

What does Hibari mean?

The word "Hibari" means skylark in Japanese; the Kanji characters stand for "cloud bird".

License

Copyright (c) 2005-2017 Hibari developers.  All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Note for License

Hibari has decided to display "Hibari developers" as the copyright holder name in the source code files and manuals. Actual copyright holder names (contributors) will be listed in the AUTHORS file.

EOF

clus's People

Contributors

norton avatar tatsuya6502 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clus's Issues

Erlang cookie is visible by ps command

Hibari's erlang cookie is stored in the vm.args configuration file. This file is given as an argument to erl as -arg_file. Unfortunately, this file is not read by the beam.smp process directly but passed as command line arguments that are visible by the ps command.

I'd prefer to use the ~/.erlang.cookie approach to provide a little bit more security over the current behavior. This issue is common to rebar and it's default templates (e.g. nodetool).

1 S hibari   27469     1  0  78   0 -  2631 -      19:09 ?        00:00:00 /usr/local/var/lib/hibari/hibari/erts-5.8.2/bin/run_erl -daemon /usr/local/var/lib/hibari/hibari/tmp/ /usr/local/var/lib/hibari/hibari/log exec /usr/local/var/lib/hibari/hibari/bin/hibari console
0 S hibari   27470 27469  0  85   0 - 52439 stext  19:09 pts/0    00:00:16 /usr/local/var/lib/hibari/hibari/erts-5.8.2/bin/beam.smp -K true -A 64 -- -root /usr/local/var/lib/hibari/hibari -progname hibari -- -home /usr/local/var/lib/hibari -- -boot /usr/local/var/lib/hibari/hibari/releases/0.1.0/hibari -embedded -config /usr/local/var/lib/hibari/hibari/etc/app.config -sname hibari@perf02 -setcookie j7FNiO1lFDxmIXxsPqphxEOVG -kernel net_ticktime 20 --env ERL_MAX_ETS_TABLES 10007 -- console

ssh-copy-id fail (?)

Probably a user or docs issue...

context:
setting up a three node cluster on Centos 5.7
have "admin" / root accounts configured for password-less SSH to each node from an admin node (admin-vm)
node names are simple (vm1 vm2 vm3).
network connectivity verified between all four nodes

attempting to set up the runtime user ("hibari") with ./clus/priv.clus.sh

running clus.sh from "admin" account on a the admin node, successfully completes the init functions using SSH with the "admin" account:

  • killing current procs (verified)
  • deleting the old user / group (verified)
  • adding new group / user (verified)
  • generating the passwd (verified)
  • setting the password (verified)
  • unlocking the account (verified)

I can verify each of the above steps on the target node.
It then it appears to complete the ssh-copy-id, after which it successfully locks the account (using the "admin" creds)

but fails on the test (where it does SSH $USER_NODE@$HOST_NODE echo $USER_NODE@$HOST_NODE)

I suspect that I have missed a step in the setup relating to configuration of the runtime user ("hibari"), but having re-read the dev guide (setting up a cluster) & the readme, I'm stumped as to what it is (ssh-agent or .ssh/config ?)

clus.sh init fails at running ssh-copy-id command under slow ssh session

The init command in clus.sh uses expect command when it runs ssh-copy-id command.

    { eval "$EXPECT -c 'spawn $SSHCOPYID $NODE_USER@$NODE_HOST' -c 'expect password:' -c 'send $passwd\n' -c 'expect eof' &> $NULLFILE"; } || \
        die "remote user '$NODE_USER@$NODE_HOST' ssh-copy-id failed"

There seems two problems with this implementation:

  1. The default timeout for expect seems too short, so if ssh session is slow (e.g. sshd can't resolve ssh client's host name -- UseDNS yes), expect will fire send $passwd\n before establishing the session. This causes ssh-copy-id command to fail.
  2. When the timeout occurs, die ... part won't detect the error.

clus.sh does not use optional fourth parameter <installer_user>

clus.sh's init and delete commands takes optional fourth parameter installer_user, which, I believe, is used as the ssh login user to run remote commands. However clush.sh does not use it for ssh sessions even though it sets up $INSTALLER_USER variable. For instance, it does $SSH $NODE_HOST '$SUDO true' || die ... instead of $SSH $INSTALLER_USER@$NODE_HOST ...

As a result, $USER is always used as the ssh login user.

$ ./priv/clus.sh

Usage: ./priv/clus.sh [-f] <command> ...

  <command> is one of the following:
    init <user> <host> [<installer_user>]
    delete <user> <host> [<installer_user>]

  - "-f" is enable force mode.  disable safety checks to prevent
     deleting and/or overwriting an existing installation.
  - <user> is the account on the server where you will be installing
  - <host> is that server's hostname (or IP address)
  - <installer_user> is *your* loginname

Example usage:
  ./priv/clus.sh init skylark `hostname`

Notes:
  - <user>, <host>, and <installer_user> must be simple names -- no
    special characters etc please (only alphanumerics, dot, hyphen,
    underscore)
  - <user> must be different than <installer_user>.
  - <installer_user> should be your name, for clarity, or whoever will
    be the installer user.  The default <installer_user> is "$USER"

$ grep INSTALLER_USER priv/clus.sh 
        INSTALLER_USER=$USER
        INSTALLER_USER=$4
    if [[ "$NODE_USER" = "root" || "$NODE_USER" = "$INSTALLER_USER" ]] ; then
    echo $INSTALLER_USER | $PERL -lne 'exit 1 if /[^a-zA-Z0-9._-]/' || \
        die "installer_user '$INSTALLER_USER' invalid"

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.