• This repository has been archived on 18/Mar/2022
  • Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 3 years ago

Reviews

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

Repository Details

RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.

RedisLess

Discord Test and Build


THIS PROJECT IS TESTABLE, BUT NOT PRODUCTION READY YET!!


RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.

RedisLess is the concatenation of Redis and Serverless.

Motivation

As a backend developer, I mostly work on providing web API for frontend developers and backend developers. Redis is part of my toolset - especially when I share data and sync states between my backend apps. For those simple use cases, I don't want to have to spawn a Redis server.

So, imagine a world where your Redis instance is nothing more than a lib in your app. Imagine that this lib can sync the data with other neighborhood instances?

That's the idea behind RedisLess, a lightweight, embedded, and scalable in-memory Key/Value store library compatible with the Redis API.

Follow me on Twitter πŸ™‹β€β™‚οΈ

Read more about RedisLess:

How to use it?

To use RedisLess, you only need to:

  1. Install RedisLess library for your favorite language (see supported clients below).
  2. Connect your favorite Redis client to redis://localhost:16379.
  3. You don't need to change your code - RedisLess is Redis API compatible. (see supported Redis commands)

Under the hood, the RedisLess library starts a local Redis API compatible instance on port 16739 (you can change the port).

NodeJS client

Install

# RedisLess library with Python binding
npm install redisless

# redis client
npm install async-redis

Usage

const {RedisLess} = require('redisless');
const redis = require('async-redis');

const port = 16379;
const redisless = new RedisLess(port);

redisless.start();

const r = redis.createClient({host: 'localhost', port: port});

await r.set('foo', 'bar');
await r.get('foo'); // return 'bar'
await r.del('foo'); // delete key 'foo'

redisless.stop();

Python client

Install

# RedisLess library with Python binding
pip install redisless

# redis client
pip install redis

Usage

from redisless import RedisLess
import redis

redisless = RedisLess()

# start RedisLess embedded instance
redisless.start()

# Connect to RedisLess on localhost:16379
redis = redis.Redis(host='localhost', port=16379)

redis.set('foo', 'bar')
redis.get('foo')  # return bar 
redis.delete('foo')  # return 1 

# stop RedisLess embedded instance
redisless.stop()

What is RedisLess

  • Embedded in-memory. (No Redis server required!).
  • Compatible with the Redis API (RESP).
  • Not intrusive: you don't need to modify you code to use RedisLess!
  • Built with DX and performance in mind.
  • Cloud native friendly.

What RedisLess is not:

  • Production ready yet.
  • 1:1 Redis implementation.

Use cases

The goal of RedisLess is not to remove the need of Redis server for heavy workload. If you consider to store more than 2 GB of data in RedisLess you are better to use Redis. There is no hard limit, but RedisLess is designed to manage and share small dataset between apps.

βœ… Good use cases:

  • Distributed lock between your apps.
  • Share data (lower than 2 GB) between your apps.
  • Cache where reads are more important than writes.

❌ Bad use cases:

  • Store more than 2 GB of data.
  • Cache where writes are more important than reads.

Planned features

Planned supported clients

Expected performance

Strong attention to performance and code cleanliness is given when designing RedisLess. It aims to be crash-free, super-fast and put a minimum strain on your server resources.

RedisLess is written in Rust and export functions through FFI (Foreign Function Interface), making it usable from any language. We provide clients for NodeJS, Python, Golang, Java, and Rust. Supporting a new language can be done in 5 minutes. Look at Python and NodeJS clients implementation for inspiration.

Contribution welcome!

It is never too soon to contribute to a great project. If you are interested in contributing, please join us on Discord, then we can discuss. The project is in its early days, but we are serious about building a solid library to help thousands of developers.

Set up MacOSX development environment

Pre-requisites

  1. Install Xcode
  2. Install Brew
  3. Install Rust
  4. Run brew install mingw-w64 to cross build for Windows
  5. Run brew install FiloSottile/musl-cross/musl-cross to cross build for Linux
  6. Run brew tap SergioBenitez/osxct && brew install x86_64-unknown-linux-gnu # to cross build for Linux

Build clients

To build NodeJS, Python, Golang and other libs you need to run:

cd scripts && ./build-for-mac.sh && cd ..

Use clients

Once the libs built, you are ready to use the clients into the clients folder.

Contributors

Thanks to our contributors ❀️

References

More Repositories

1

Replibyte

Seed your development database with real data ⚑️
Rust
4,136
star
2

engine

The Orchestration Engine To Deliver Self-Service Infrastructure ⚑️
Rust
2,288
star
3

pleco

Automatically removes Cloud managed services and Kubernetes resources based on tags with TTL
Go
222
star
4

console

Qovery Web Console V3 ⚑️
TypeScript
203
star
5

Torii

Torii ⛩️ is a simple, powerful and extensible open-source Internal Developer Portal
TypeScript
175
star
6

qovery-cli

Qovery Command Line Interface
Go
78
star
7

helm-freeze

Freeze your charts in the wished versions
Go
57
star
8

terraform-examples

This repository contains ready to use Terraform examples with Qovery to create outstanding infrastructure
50
star
9

iam-eks-user-mapper

A tool to automatically give AWS IAM users access to your Kubernetes cluster.
Rust
48
star
10

documentation

Qovery documentation website
HTML
15
star
11

terraform-provider-qovery

Qovery Terraform Provider
Go
15
star
12

react-xtermjs

Xterm.js for React
TypeScript
13
star
13

qovery-github-actions

Qovery Github action allowing to deploy application.
Go
13
star
14

qovery-client-go

Qovery Golang SDK
Shell
12
star
15

qovery-migration-ai-agent

Qovery Migration AI Agent to Automate and Ease the Migration From Cloud Providers with Qovery
TypeScript
11
star
16

scaleway-api-rs

Rust lib for Scaleway API
Rust
9
star
17

qovery-openapi-spec

Qovery API specs - OpenAPI format
Shell
7
star
18

lifecycle-job-examples

This repository contains ready to use Qovery Lifecycle Jobs examples
7
star
19

simple-example-node

JavaScript
6
star
20

vscode-qovery-extension

Vscode plugin with auto completion
TypeScript
6
star
21

simple-example-gin-with-postgresql

Go
5
star
22

digital-mobius

Automatically recycle not ready Kubernetes nodes on Digitial Ocean
Go
5
star
23

simple-example-node-with-postgresql

JavaScript
4
star
24

qovery-client-typescript-axios

TypeScript
4
star
25

qovery-client-python

Qovery Python Client
Python
3
star
26

spring-boot-api-token

Kotlin
3
star
27

posthog-proxy

Ready to use reverse proxy for Posthog
Dockerfile
3
star
28

qovery-rust-rocket-sample

Rust
2
star
29

intellij-qovery-plugin

Intellij plugin with auto completion
Java
2
star
30

doners

Scale your DNS management in a secure way on Kubernetes
2
star
31

qovery-client-javascript

Qovery Javascript Client
JavaScript
2
star
32

simple-example-laravel-with-postgresql

PHP
2
star
33

doc

Qovery documentation
2
star
34

simple-example-django-with-postgresql

Python
2
star
35

flask-todo

Flask example with Qovery
Python
2
star
36

qovery-javascript-client

JavaScript
1
star
37

migrate-webapp-from-heroku-to-qovery

JavaScript
1
star
38

nginx-gateway

NGINX Gateway
Shell
1
star
39

homebrew-replibyte

Ruby
1
star
40

qovery-templates

Templates to bootstrap popular frameworks on Qovery
Java
1
star
41

http-handler-to-redeploy

This project is a good starting point to create an HTTP handler to redeploy your app on Qovery
Go
1
star
42

scoop-qovery-cli

Scoop to install and update qovery cli
1
star
43

homebrew-qovery-cli

Brew tap Formula to install and update qovery cli
Ruby
1
star
44

qovery-client-typescript

TypeScript
1
star
45

engine-testing-lfs

Repository to test integration of git lfs
Dockerfile
1
star
46

frontend-boilerplate

Boilerplate of Qovery console technical stack (Nx, Ngxs, Rxjs)
TypeScript
1
star
47

simple-example-with-postgresql

Kotlin
1
star
48

undertaqer

Automatically destroy crash looped pods
Smarty
1
star
49

e2e-app

Go
1
star
50

qovery-chart

Qovery Helm Chart for Self-Managed version
Smarty
1
star
51

qovery-php-client

Qovery PHP client library
PHP
1
star
52

qovery-go-client

Qovery Go client library
Go
1
star
53

qovery-python-client

Python
1
star