You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-250Lines changed: 3 additions & 250 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Moreover RediSQL support all the persistency features of Redis, hence RDB and AO
25
25
26
26
## Much more to explore...
27
27
28
-
There are a lot of features in RediSQL that is worth to explore more, here a short excerpt of those features, please follow the link on the main website.
28
+
There are a lot of features in RediSQL that is worth to explore more, here a short excerpt of those features.
29
29
30
30
#### Lightweight DBs
31
31
@@ -145,261 +145,14 @@ OK
145
145
4) "ccc"
146
146
127.0.0.1:6379>
147
147
```
148
-
149
-
150
-
151
-
152
-
153
-
## OLD
154
-
155
-
RediSQL is a module for Redis that embed a completely functional SQLite database.
156
-
157
-
RediSQL enables new paradigm where is possible to have several smaller decentralized databases instead of a single giant one.
158
-
159
-
_With great powers comes great responsability_ (cit. Uncle Ben)
160
-
161
-
# Documentation
162
-
163
-
This readme will provide you with the basics, however for deeper documentation you should look here: [redbeardlab.tech/rediSQL/](http://redbeardlab.tech/rediSQL/)
164
-
165
-
## Motivation
166
-
167
-
I love the agility provided by Redis, however, several times, I wished I had a little more structure in my in-memory database.
168
-
169
-
Even basic SQL is very powerful and years upon years of experience on several SQL implementations have brought us a very mature product that we can now exploit with confidence.
170
-
171
-
Between all the SQL implementation, the one that best fitted the need for this module is definitely SQLite, for its velocity, portability, simplicity, and capability to work in memory.
172
-
173
-
## Getting start
174
-
175
-
There are three main way to get RediSQL.
176
-
177
-
The first way is to download the public release directly from [this link](https://payhip.com/RediSQL).
178
-
179
-
These will provide you with the community version that is free, however, you have the possibility to leave a donation (20€ would be the suggested ammount). Indeed, is not necessary to pay anything for the community edition and feel free to just input 0€.
180
-
181
-
Another option is to download the module from [github release](https://github.com/RedBeardLab/rediSQL/releases)
182
-
183
-
With the `.so` you can start redis passing the object as argument like so:
184
-
185
-
```
186
-
./redis-server --loadmodule librediSQL.so
187
-
```
188
-
189
-
Please note that you need to run redis > 4.0 to use modules and RediSQL is not an exception.
190
-
191
-
The last way is to compile the module yourself:
192
-
193
-
## Tutorials:
194
-
195
-
We provide tutorials to get started with different languages, if you need help for a particular programming language please open an issue.
196
-
197
-
-[Using RediSQL with Python](http://redbeardlab.tech/rediSQL/blog/python/using-redisql-with-python/)
198
-
-[Using RediSQL with Golang](http://redbeardlab.tech/rediSQL/blog/golang/using-redisql-with-golang/)
199
-
-[Using RediSQL with Node.js](http://redbeardlab.tech/rediSQL/blog/node/using-redisql-with-node/)
200
-
201
-
## Compiling and contributing
202
-
203
-
If you want to compile the module yourself or contribute to the project you can simply clone the repo
6833:M 15 Dec 16:25:53.195 * Increased maximum number of open files to 10032 (it was originally set to 1024).
228
-
_._
229
-
_.-``__ ''-._
230
-
_.-`` `. `_. ''-._ Redis 3.9.101 (00000000/0) 64 bit
231
-
.-`` .-```. ```\/ _.,_ ''-._
232
-
( ' , .-` | `, ) Running in standalone mode
233
-
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
234
-
| `-._ `._ / _.-' | PID: 6833
235
-
`-._ `-._ `-./ _.-' _.-'
236
-
|`-._`-._ `-.__.-' _.-'_.-'|
237
-
| `-._`-._ _.-'_.-' | http://redis.io
238
-
`-._ `-._`-.__.-'_.-' _.-'
239
-
|`-._`-._ `-.__.-' _.-'_.-'|
240
-
| `-._`-._ _.-'_.-' |
241
-
`-._ `-._`-.__.-'_.-' _.-'
242
-
`-._ `-.__.-' _.-'
243
-
`-._ _.-'
244
-
`-.__.-'
245
-
246
-
6833:M 15 Dec 16:25:53.197 * Module 'rediSQL__' loaded from ./rediSQL.so
247
-
6833:M 15 Dec 16:25:53.197 * The server is now ready to accept connections on port 6379
248
-
```
249
-
250
-
## Walkthrough
251
-
252
-
After starting redis with the module rediSQL it will be just the redis you learn to love:
253
-
254
-
```
255
-
$ ~/redis-4.0-rc1/src/redis-cli
256
-
127.0.0.1:6379>
257
-
127.0.0.1:6379> SET A 3
258
-
OK
259
-
127.0.0.1:6379> GET A
260
-
"3"
261
-
```
262
-
263
-
But you will also able to use all the API described below:
264
-
265
-
```
266
-
127.0.0.1:6379> REDISQL.CREATE_DB DB
267
-
OK
268
-
# Start creating a table on the default DB
269
-
127.0.0.1:6379> REDISQL.EXEC DB "CREATE TABLE foo(A INT, B TEXT);"
270
-
DONE
271
-
# Insert some data into the table
272
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO foo VALUES(3, 'bar');"
273
-
OK
274
-
# Retrieve the data you just inserted
275
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM foo;"
276
-
1) 1) (integer) 3
277
-
2) "bar"
278
-
# Of course you can make multiple tables
279
-
127.0.0.1:6379> REDISQL.EXEC DB "CREATE TABLE baz(C INT, B TEXT);"
280
-
OK
281
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO baz VALUES(3, 'aaa');"
282
-
OK
283
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO baz VALUES(3, 'bbb');"
284
-
OK
285
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO baz VALUES(3, 'ccc');"
286
-
OK
287
-
# And of course you can use joins
288
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM foo, baz WHERE foo.A = baz.C;"
289
-
290
-
1) 1) (integer) 3
291
-
2) "bar"
292
-
3) (integer) 3
293
-
4) "aaa"
294
-
2) 1) (integer) 3
295
-
2) "bar"
296
-
3) (integer) 3
297
-
4) "bbb"
298
-
3) 1) (integer) 3
299
-
2) "bar"
300
-
3) (integer) 3
301
-
4) "ccc"
302
-
127.0.0.1:6379>
303
-
```
304
-
305
-
Also the `LIKE` operator is included:
306
-
307
-
```
308
-
127.0.0.1:6379> REDISQL.EXEC DB "CREATE TABLE text_search(t TEXT);"
309
-
OK
310
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO text_search VALUES('hello');"
311
-
OK
312
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO text_search VALUES('banana');"
313
-
OK
314
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO text_search VALUES('apple');"
315
-
OK
316
-
127.0.0.1:6379>
317
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM text_search WHERE t LIKE 'h_llo';"
318
-
1) 1) "hello"
319
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM text_search WHERE t LIKE '%anana';"
320
-
1) 1) "banana"
321
-
127.0.0.1:6379> REDISQL.EXEC DB "INSERT INTO text_search VALUES('anana');"
322
-
OK
323
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM text_search;"
324
-
1) 1) "hello"
325
-
2) 1) "banana"
326
-
3) 1) "apple"
327
-
4) 1) "anana"
328
-
127.0.0.1:6379> REDISQL.EXEC DB "SELECT * FROM text_search WHERE t LIKE 'a%';"
329
-
1) 1) "apple"
330
-
2) 1) "anana"
331
-
```
332
-
333
-
Now you can create tables, insert data on those tables, make queries, remove elements, everything.
334
-
335
-
# PRO version
336
-
337
-
The PRO version is available [here](https://plasso.com/s/epp4GbsJdp-redisql/signup/) it cost 990€ / years and of course you have 14 days money back if you are not satisfied with the product.
338
-
339
-
The PRO version provides two main capabilities and **dedicated support** from the creators of RediSQL.
340
-
341
-
### Non blocking commands
342
-
343
-
All (but `REDISQL.CREATE_DB`) commands in the module blocks the clients and execute the computation in a different thread.
344
-
345
-
This means that the redis engine is free to serve other clients and it doesn't freeze on long select and it can use more CPU power.
346
-
347
-
Blocking is the more sensible choice in the general case, however, in some case you may need `non blocking` command.
348
-
349
-
The PRO version provide you with that.
350
-
351
-
In the PRO version is enough to add the suffix `.NOW` to any command to invoke the blocking version.
352
-
353
-
### AOF & Replication
354
-
355
-
AOF and Replication in Redis works with the same underneath implementation.
356
-
357
-
It is quite complex to implement and usefull mostly to companies where redis is a critical piece of infrastructure.
358
-
359
-
For these reasone the AOF and the Replication are provide in the PRO version.
360
-
361
-
## About the cost
362
-
363
-
We set up the cost to make it a bargain for any company that actually use the product.
364
-
365
-
If you consider the ammount of time necessary to replicate this features:
366
-
367
-
1. Understand the code base of RediSQL
368
-
2. Understand how Redis itself works
369
-
3. Understand how SQLite works
370
-
4. Implement the features
371
-
5. Document it
372
-
6. Test it
373
-
7. Maintaint it
374
-
375
-
And you multiply for the hour cost of an engineer (~100€/hour).
376
-
377
-
You will see that RediSQL PRO will pay itself in a little more that 1 day of work.
378
-
379
-
All this without considering the dedicated support that comes with the plan.
380
-
381
-
Moreover, up to our knowledge we are the only one to provide a similar product (SQL, in memory inside a cache engine).
382
-
383
-
384
-
## API
148
+
## Documentation
385
149
386
150
The complete API are explained in the official documentation that you can access here: [API References][api]
387
151
388
152
## Contributing
389
153
390
154
I am going to accept pull request here on github.
391
155
392
-
## OpenSource and the necessity of real support and charge for my time.
393
-
394
-
[How to Charge for your Open Source](http://www.mikeperham.com/2015/11/23/how-to-charge-for-your-open-source/) by Mike Perham brings good arguments on the necessity to charge for work done by developers, even in the Open Source world.
395
-
396
-
I myself have started a lot of Open Source project that, eventually, are all dead because I wasn't able to dedicate the right amount of time to them.
397
-
398
-
I am hoping to find the necessary funds to keep maintain this project.
399
-
400
-
I am starting with only an Open Source version and then move to an enterprise version adding the necessary features.
401
-
402
-
403
156
## License
404
157
405
158
This software is licensed under the AGPL-v3, it is possible to purchase more permissive licenses.
@@ -408,4 +161,4 @@ This software is licensed under the AGPL-v3, it is possible to purchase more per
0 commit comments