• Stars
    star
    1,057
  • Rank 43,651 (Top 0.9 %)
  • Language
    C
  • License
    BSD 2-Clause "Sim...
  • Created over 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

self-contained, serverless, zero-configuration, transactional redis-compatible database engine. rlite is to Redis what SQLite is to SQL.

rlite

Build Status

self-contained, serverless, zero-configuration, transactional Redis-compatible database engine. rlite is to Redis what SQLite is to SQL.

Example

require "redis"
require "hirlite/connection"

redis = Redis.new(host: ":memory:", driver: Rlite::Connection::Hirlite)

redis.set "key", "value"

puts redis.get "key"
# => "value"

Ruby bindings example. See golang, Java, Node.js, Objective-C, PHP, Python, R, and Rust

Example in C

#include <hirlite.h>

// ...

rliteContext *context = rliteConnect(":memory:", 0);

rliteReply* reply;
int argc_set = 3;
char *argv_set[] = {"SET", "key", "value"};
size_t argvlen_set[] = {3, 3, 5};
reply = rliteCommandArgv(context, argc_set, argv_set, argvlen_set);
rliteFreeReplyObject(reply);

int argc_get = 2;
char *argv_get[] = {"GET", "key"};
size_t argvlen_get[] = {3, 3};
reply = rliteCommandArgv(context, argc_get, argv_get, argvlen_get);
if (reply->type == RLITE_REPLY_STRING) {
	// reply->str is "value", reply->len is 5
}
rliteFreeReplyObject(reply);

Use Cases

This is a list of possible use cases where you might want to use rlite.

  • Mobile. If you are used to Redis data structure, and it is better suited for your mobile application than sqlite, you can use rlite as a database.

  • Replace Redis in development stack. By being embedded, rlite does not need a separate database process, and since it is compatible with Redis you can use it while developing, even if you use Redis instead in production.

  • Replace Redis in tests. The test stack can use rlite instead of Redis if you use the latter in production. It can simplify the CI stack, and the distribution of fixtures by being in binary form, and it will not require to load completely in memory to run each test.

  • Slave of Redis. You can run rlite-server as a slave of a master Redis instance. It works as third alternative to Redis's snapshot and append-only file.

  • Store client-side application data. Alternatively to a propetary format or sqlite, command line or simple applications can store its data using rlite.

Storage

All rlite data is stored in a single file using its own format. The format is not rdb or aof since those are optimized for fast reading the whole content and not for random access.

If file system persistence is no needed, use the magic file path ":memory:".

For more information about the file format check out its documentation.

Current Status and Roadmap

  • string (set, get...)
  • list (lpush, lpop...)
  • set (sadd, sismember...)
  • zset (zadd, zrank...)
  • hash (hset, hdel...)
  • key management (del, exists...)
  • transactions (multi, exec...)
  • lua scripting (eval, evalsha, ...)
  • rlite-server pass all Redis tests
    • unit/scan
    • integration/replication
    • unit/scripting
    • unit/introspection
  • pubsub
  • brpop/brpoplpush
  • multi process safe
  • write ahead log

Installation

rlite has no dependencies, just run make all.

Bindings

Command-line interface

License

Copyright (c) 2014-2015, Sebastian Waisbrot All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

More Repositories

1

rsedis

Redis re-implemented in Rust.
Rust
1,770
star
2

redislite

Redislite is a software library that implements a self-contained, serverless, zero-configuration, redis-compatible database engine.
C
172
star
3

nios

Node.js port for iOS
Objective-C
98
star
4

rlite-py

python bindings for rlite
Python
70
star
5

rlite-js

node.js bindings for rlite
JavaScript
22
star
6

sysarmy-sueldos-2019.1

Jupyter Notebook
21
star
7

promises-js-explanation

20
star
8

wikipedia-rs

Wikipedia API client in Rust
Rust
18
star
9

acrossoverepisode.com

TypeScript
16
star
10

pcitrw

Programming Concepts in the Real World
Python
15
star
11

sysarmy-sueldos-2020.1

Jupyter Notebook
14
star
12

deck.remote.js

Allow clients for deck.js
JavaScript
14
star
13

gitfuse

Filesystem in User Space using git to create version system
Python
12
star
14

rlite-rb

ruby bindings for rlite
C
12
star
15

disque-rs

Disque client library for rust
Rust
10
star
16

go-chat.workshop

Workshop para aprender golang haciendo un chat
Go
9
star
17

ohmoc

Object-hash mapping library for objc-rlite
C
7
star
18

objc-rlite

objective-c bindings for rlite
C
7
star
19

transcribbot

bot to transcribe telegram audio
Go
6
star
20

rlite-go

golang bindings for rlite
Go
6
star
21

taximetro

JavaScript
6
star
22

rlite-php

PHP bindings for rlite
C
5
star
23

frinkiac-gif

Create GIFs from frinkiac (the Simpson)
JavaScript
4
star
24

sha1-node

Comparison of native nodejs, wasm and neon performance using sha1
JavaScript
4
star
25

memindexbot

Go
4
star
26

ohmers

Object-hash mapping library for Rust
Rust
4
star
27

rlite-server

C
4
star
28

libae

A simple event-driven programming library extracted from Redis.
C
4
star
29

rlite-rs

rust bindings for rlite
Rust
3
star
30

test-markdown-code

Run blocks of code in your markdown files
Python
3
star
31

rustc-version-runtime-rs

Simple library for getting the version information of a `rustc` compiler in runtime.
Rust
3
star
32

stal-rs

Set algebra solver for Redis
Rust
3
star
33

rust-abajo-arriba

Slides & ejemplos para Nardoz
Rust
3
star
34

migoya-challenge

Jupyter Notebook
2
star
35

gandalf

Gandalf test runner
Shell
2
star
36

minisearch-indexrs

Create a minisearch index faster using rust
Rust
2
star
37

odiostats

Measure Facebook group monthly statistics.
PHP
2
star
38

quicksetup

Personal quicksetup
Shell
2
star
39

EspressoTest

Testing espresso problems with RecyclerView
Java
2
star
40

the-a-b-effect

Jupyter Notebook
2
star
41

fb-fuse

Fuse driver to manage facebook account
Python
2
star
42

hornallas

¿Por qué? No podemos decirlo. ¿Con qué fin? No pueden saberlo. ¿Cómo? Léanlo acá
Jupyter Notebook
2
star
43

pikachu-failure

Shell
2
star
44

Tuit-ar

Twitter client
Java
2
star
45

disqrust

Disque high-level client library
Rust
2
star
46

iphone-lib

Just a bunch of libraries I'd like to have when I start an iphone app
Objective-C
2
star
47

Facepalm

How long can you be without thinking "I am such an idiot"?
PHP
2
star
48

qubic

qubic planner
JavaScript
2
star
49

movies-recommendation

Machine learning tests for movie recommendations
Jupyter Notebook
2
star
50

building-stuff

Building stuff with rust
Rust
2
star
51

sysarmy-aislamiento-2020.2

Jupyter Notebook
1
star
52

derecho-plan3

TypeScript
1
star
53

lenguajeinclusivo

Go
1
star
54

bash-intro.workshop

Workshop de introducción a Bash.
Shell
1
star
55

bill-splitter

Split your bill, with gender consciously
JavaScript
1
star
56

wikipedia-go

Go
1
star
57

i-prode

Prode
PHP
1
star
58

notion-ios

guess words through the association of icons
Objective-C
1
star
59

1bondi20

HTML
1
star
60

nodejs-lessons-sp

1
star
61

boludeces

Jupyter Notebook
1
star
62

redislite-server

A Redis server, using redislite as backend. The main idea is to take advantage of Redis tests in Redislite.
C
1
star
63

blogpost-to-podcast

Fetch your bookmarked posts in pocket, turn them into audio and upload to soundcloud
Python
1
star
64

hd

A fork of "hd" to fix some C99 problems and make it work in Mac.
C
1
star
65

presentaciones

Disfruto preparar y compartir presentaciones.
SCSS
1
star
66

aquiestamos

Simple wordpress plugin for users checkin
PHP
1
star
67

quick-query-quality

TypeScript
1
star
68

Justicia-Digital-Clase-Computaci-n

C
1
star
69

aRSS

An RSS Reader
Ruby
1
star
70

rust-wasm-boilerplate

JavaScript
1
star
71

ios-builder

Tool to build and upload iOS applications for development.
PHP
1
star
72

clarinete

Python
1
star
73

facebook-friends-migrations

Graphicate your Facebook Friends migrations. Where are they from and where they live now.
Python
1
star
74

read-financial-data

Dibujar datos extraidos de información financiera.
Jupyter Notebook
1
star
75

rlite-cli

command line interface for rlite
C
1
star
76

rusttojs

Rust
1
star
77

vortices

RTC (Real-Time Communications) and ICE (Interactive Connectivity Establishment) testing idea
Go
1
star
78

rlite-java

java bindings for rlite
Java
1
star
79

go-chat.intro

JavaScript
1
star
80

twitter-saved-media

Use custom media in Twitter GIF search
JavaScript
1
star
81

progol-js

Compile progol to javascript. See https://www.doc.ic.ac.uk/~shm/progol.html
C
1
star
82

sysarmy-sueldos-2020.2

Jupyter Notebook
1
star
83

wikipedia-graphql-go

Go
1
star
84

sokoband

Multiplayer version of the famous box game.
JavaScript
1
star
85

notion

guess words through the association of icons
HTML
1
star