DiceDB / dice

DiceDB is hyper-optimized for building and scaling truly real-time applications on modern hardware. It is a drop-in replacement for Redis with support for SQL-based reactivity.
https://dicedb.io/
Other
3.32k stars 420 forks source link

Add support for Commands Interacting with Byte Array datatype #143

Closed arpitbbhayani closed 1 week ago

arpitbbhayani commented 1 month ago

Add support for the byte array manipulation commands in DiceDB similar to the following commands in Redis. Please refer to the following commit in Redis to understand the implementation specifics - source.

Write unit and integration tests for the command referring to the tests written in the Redis codebase 7.2.5. For integration tests, you can refer to the tests folder. Note: they have used TCL for the test suite, and we need to port that to our way of writing integration tests using the relevant helper methods. Please refer to our tests directory.

For the command, benchmark the code and measure the time taken and memory allocs using benchmem and try to keep them to the bare minimum.

VipinRaiP commented 1 month ago

Shall i work on this?

arpitbbhayani commented 1 month ago

@VipinRaiP https://github.com/DiceDB/dice/issues/142 is a pre-requisite for this. @yashs360 is working on it. Once that is done, you can pick this up.

@yashs360 Keep this issue in mind while coming up with a design. Make sure you do not implement all commands :) Go with your gut feeling.

yashs360 commented 1 month ago

Good to go @VipinRaiP . I had to implement Get/set/count to verify that the underlying data structure works. You can take this on and work on the other data types

MohitVachhani commented 1 month ago

Hey @arpitbbhayani / @yashs360

Implementing all these commands under one PR will result in a very large PR. Is this acceptable for you, or would you prefer that we break it down into smaller, more manageable PRs for easier review?

Please let me know your preferences.

yashs360 commented 1 month ago

Smaller PRs are recommended for efficient reviews. Don't overdo however. Use your judgement.

MohitVachhani commented 1 month ago

I will start with BITCOUNT implementation 👍🏾

MohitVachhani commented 1 month ago

Hey @arpitbbhayani / @yashs360 I have tried to raise PR for BITCOUNT, please can you guys go through it and let me know if any changes required!

Thanks 🙇🏾

VipinRaiP commented 1 month ago

Shall I take up BITPOS ?

MohitVachhani commented 1 month ago

Hey @VipinRaiP , need to introduce byteArray new datatypes in this itself [Using @yashs360 's PR], so planning to implement all the commands in single PR..

MohitVachhani commented 1 month ago

To close this issue fully, need to implement: BITPOS, I will working on this and will be raising PR accordingly.