• 2013-01-01

    PHP working with LevelDB

    Views: 17127 | No Comments

    The Google LevelDB is a C/C++ key-value storage library, this means you can only write C/C++ code to use LevelDB. Unlike other key-value storage solution and MySQL, LevelDB doesn’t have a network server.

    If you wan your PHP code to work with LevelDB, you can either wrap LevelDB as a PHP module, or wrap LevelDB as a network server. Writing a PHP LevelDB module is not a good idea most of the time, because we always want to connect to one LevelDB from several machines across network.

    This is why I create SSDB – a LevelDB server with zset data type support. SSDB has a very simple network protocol, that can be implemented with many programming language, such as C, C++, PHP, Python, Cpy…

    Here is a example of PHP operates with SSDB(LevelDB):

    <?php
    require_once('SSDB.php');
    $ssdb = new SimpleSSDB('127.0.0.1', 8888);
    $resp = $ssdb->set('key', '123');
    $resp = $ssdb->get('key');
    echo $resp; // output: 123
    

    Download SSDB from: https://github.com/ideawu/ssdb

    Posted by ideawu at 2013-01-01 01:16:20
  • 2012-12-27

    SSDB has made a big progress!

    Views: 13277 | No Comments

    SSDB v1.1.0 is released! This version added the Online Backup feature, which allows to backup a SSDB instance without stopping service.

    Quick Start

    ./tools/ssdb-dump 127.0.0.1 8888 backup_dir
    

    A copy of SSDB instance(it is also the leveldb database) will be saved in a new created directory backup_dir.

    Recover

    Transfer the directory backup_dir to the server on which ssdb-server runs, then edit ssdb.conf to use backup_dir, restart ssdb-server.

    Next Step

    SSDB is now a productional storage server! The next feature that is planning to added is Replication(Master-Slave architecture). Replication is the base of distributed system.

    SSDB Project: https://code.google.com/p/zdb/

    Posted by ideawu at 2012-12-27 00:00:18 Tags: ,
  • 2012-12-18

    SSDB v1.0.1 supports more commands

    Views: 12852 | No Comments

    SSDB version 1.0.1 is released. In this version, more commands are supported, these commands are:

    keys, zkeys, hkeys, incr, decr, zincr, zdecr, hincr, hdecr
    

    SSDB is used as cache server on www.udpwork.com, it works very well! So, don’t doubt to use SSDB for your project.

    Posted by ideawu at 2012-12-18 00:36:19 Tags: ,
  • 2012-12-12

    SSDB – A leveldb server with zset data type

    Views: 20684 | No Comments

    The Google leveldb is just a c++ library, cannot be directly used by PHP/Java/Python. As it is a library, data can’t be accessed across multi machines(not even multiprocesses in one machine).

    SSDB(or zdb) is a network server that wrapping leveldb library, more important, besides key-value data type, SSDB supports zset(sorted set) and hash data type. Zset is the most valuable data type that widely used with Redis, to describe business abstracts such as inbox/outbox of a messaging system, posts list of a news site, etc.

    SSDB’s client APIs currently including PHP, Python, Cpy, and more can be added easily.

    Here is a list of SSDB features:

    • Network wrapping of Google leveldb, client-server supports
    • Persistent key-value, key-zset, key-hash storage
    • Very fast(benchmark)

    SSDB project: http://code.google.com/p/zdb/

    Posted by ideawu at 2012-12-12 11:15:58 Tags: ,
  • 2012-11-17

    Cpy is now open source

    Views: 16427 | No Comments

    Cpy provides you a C-like way to write Python programs. And now, Cpy is open source(the ANTLR grammar files).

    Download from here

    Posted by ideawu at 2012-11-17 16:41:23
|<<<101112131415161718>>>| 14/19 Pages, 91 Results.