RediSQL 是Redis模塊,它嵌入了功能齊全的SQLite數據庫。
據我們所知,這是唯一一個提供SQL功能同時又非常快的系統,它可以用作緩存,可以輕鬆地與任何編程語言集成,因為每個Redis客戶端都可以使用它,並且維護成本非常低。
而且,它還可以用作主數據庫,它不僅可以將數據存儲在內存中,還可以存儲在文件中,還可以使用redis本身相同的持久性機制。
RediSQL is the Fast, in-memory, SQL engine with batteries included.
It provides several benefits for your application.
- Fast, it can top up to 130k inserts per second.
- Familiar, it works with standard SQL, no weird dialect or syntax to learn.
- Easy to Operate, it is based on Redis, just start the standard Redis binary and and pass the RediSQL binary.
- Easy to Use, being based on Redis there are already bindings for any language.
Novel features on top of battle-tested SQL
Fast
RediSQL works mainly in memory, it can reach up to 130.000 transaction per second.
Familiar
RediSQL works with standard SQL, no weird dialects or new syntax to learn.
Easy to operate
Just start Redis and load the RediSQL module.
Easy to use
There are already binding available for most languanges, including python, go, javascript, ruby, php, rust and many more.
Lightweight DBs
RediSQL provides you with lightweight in-memory databases. It could completely shift your architecture. For example, you could create a new isolated database each day, one for each application tenant, or even one per user.
On disk storage
While RediSQL focuses on in-memory database, it can also store data in a regular file. Of course this makes operations slower, but it allows RediSQL to reach a level of data persistency on par with incumbent databases such as Postgres or MySQL.
Directly expose the DB to users
With the ability to create several lightweight databases you could directly expose the databases to the end users instead of exposing an API that you would need to maintain. Just load all the data that the user may need into a RediSQL database, document the tables that are available, and give access to it to the users. They will write their own API without waiting on you.
Stream and cache query results
RediSQL can also store results of queries into a Redis Streams. This allows different clients to consume part of the result, or to delay the consuption of a result. Moreover, it allows caching the result of expensive queries as Redis Streams to consume them over and over again.
Complete JSON support
JSON is the de-facto standard for sharing data between applications. RediSQL exploits the JSON1 module of SQLite to bring that capability to easy and quickly manage JSON data inside SQL statements and tables. In RediSQL you are able to manipulate JSON in every standard way.
Full text search support
RediSQL fully supports also the FTS{3,4,5} engine from SQLite, giving you a full text engine at your fingertip. You will be able to manage and search for data.