Should I write my own redis server?

54 views
Skip to first unread message

Irae Hueck Costa

unread,
Mar 19, 2024, 7:47:47 AMMar 19
to Redis DB

Hello,

I am considering writing a relatively simple redis server based on:

- and sqlite

redcon is a library in golang that implements the redis protocol. I would then basically map redis commands to SQL which would be executed in sqlite. This would give a redis with all typically used commands but with slightly different properties:

* Leveraging multi-core processes
* The database can be served from disk
* One static binary
* Extensions and customizations are easier as you can use golang instead of C

My question is more or less: Is there a business case for that? How many people really want to sacrifice the speed of serving from RAM in order to gain a cheap terabyte sized database? The performance-properties I would get in the end is also not clear to me. First tests showed that just the overhead from redcon makes everything roundabout twice as slow.

Any thoughts?

Cheers

Irae Hueck Costa




David Maier (Redis)

unread,
Mar 20, 2024, 3:44:40 AMMar 20
to redi...@googlegroups.com
Hi Irae,

Let me give you my two cents and answer from a technical point of view: Redis is not only about the protocol. One of the advantages is that you gain very efficient access to the underlying data structures (skip lists, zip lists, ...). There is overhead if doing for instance a "SELECT * FROM table WHERE id='x'" vs just doing "GET x". So translating a "GET" behind the scenes to a SELECT which involves parsing the query, building a query execution plan, doing a scan, fetching data into memory pages ... doesn't seem to be a good approach in regards to time complexity.

Regards,
David

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-db/f070ca31-f195-436d-9392-dbbb9fa94ea4n%40googlegroups.com.


Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

Reply all
Reply to author
Forward
0 new messages