2017 © Pedro Peláez
 

library slowdb

A Key/Value Store written in PHP

image

kmfk/slowdb

A Key/Value Store written in PHP

  • Monday, March 16, 2015
  • by kmfk
  • Repository
  • 2 Watchers
  • 6 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

SlowDB

SlowDB, (*1)

When you don't want Redis, Memcached, or any other Key/Value store., (*2)

SlowDB is the Key/Value store written purely in PHP that'd you be upset to find your co-worker running in production., (*3)

Features:

  • Multiple named Collections
  • In-memory indexes
  • Safe persistence to disk

SlowDB allows for storing Key/Value pairs in multiple collections. Indexes are built/rebuilt on startup to map Keys to file locations on disk. This allows performant binary searches across database files and writing directly to disk for safe, consistent writes., (*4)

Installation

Clone the repository locally and run composer install:, (*5)

$> git clone https://github.com/kmfk/slowdb
$> cd slowdb/
$> php composer.phar install

Usage

Technically, SlowDB can be instantiated as a service in your application., (*6)

However, when SlowDB is used as a service, the Database needs to be instantiated and the indexes built on every request. On small datasets, this should be negligible - while large datasets, this can add unwanted latency to requests., (*7)

The best way to use SlowDB is by using the included socket server (built on ReactPHP) and the driver., (*8)

While only single threaded, this will keep the database indexes in memory and provide better performance., (*9)

$> ./slowdb &

Basic Example

Once the server is running, you can use it like this:, (*10)

    <?php

    require 'vendor/autoload.php';

    use SlowDB\Driver;

    $driver = new Driver('localhost', 1337);

    $driver->test->set('abc', ['foo' => 'bar']);

    $value = $driver->test->get('abc');

    print_r($value);

The Versions

16/03 2015

dev-master

9999999-dev

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

16/03 2015
16/03 2015
16/03 2015
16/03 2015
29/09 2014

1.0.9

1.0.9.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.8

1.0.8.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.7

1.0.7.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.6

1.0.6.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.5

1.0.5.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.4

1.0.4.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.3

1.0.3.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.2

1.0.2.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.1

1.0.1.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires

29/09 2014

1.0.0

1.0.0.0

A Key/Value Store written in PHP

  Sources   Download

The Requires

 

The Development Requires