Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Add USING features to statement commands #87

Open
siscia opened this issue Sep 12, 2019 · 0 comments
Open

Add USING features to statement commands #87

siscia opened this issue Sep 12, 2019 · 0 comments

Comments

@siscia
Copy link
Collaborator

siscia commented Sep 12, 2019

This issues will hopefully serve

RediSQL is designed to use one thread for each database. This simplify a lot the design but it limits the throughput a lot.
There are several cases where multiple thread for a single database is welcome, mostly for read intensive workload.

Using multiple connection is possible, indeed we already have a function to create another connection and thread that point to the original connection.

Moreover, we showed, that is possible to have multiple connection acting on the same database with the REDISQL.EXEC command enhanced with the USING feature.

To recap, in RediSQL use REDISQL.CREATE_DB to create a new database and spawn a thread that act on this database.

REDISQL.CREATE_DB DB

(This create a connection to an in-memory database, and spawn a thread that manage such connection.)

I added a new command: REDISQL.ADD_CONNECTION that allow to create a new connection to the original database.

REDISQL.ADD_CONNECTION DB READ01

(This spawn a new thread, that holds a connection to the same database mentioned above.)

Also, the USING features was implemented.

REDISQL.EXEC DB "select 1;"

This one use the original connection associate with DB.

REDISQL.EXEC DB "select 2;" USING READ01

This use the new connection, just created with REDISQL.ADD_CONNECTION.

Now we would like to implement the USING features also for REDISQL.EXEC_STATEMENT, REDISQL.CREATE_STATEMENT, REDISQL.DELETE_STATEMENT and REDISQL.UPDATE_STATEMENT.

All the work was done in the remove_vtab branch: https://github.com/RedBeardLab/rediSQL/compare/remove_vtab

@siscia siscia changed the title Add pools into statement commands Add USING features to statement commands Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant