Changelog
New Commands and Features
- Added support for
DUMP
command (TheRanomial) - Added support for
HKEYS
command (swarajrb7) - Added support for
HEXISTS
command (c-harish) - Added
JSON.RESP
Command (prateek.singh.rathore) - Added support for
JSON.ARRTRIM
(jujiale) - Added
HINCRBYFLOAT
command (ayushsatyam146) - Added
ZADD
andZRANGE
commands (Jyotinder Singh) - Added
HINCRBY
Command (ankkyprasad) - Added
HVALS
command (bijuli74) - Added
HRANDFIELD
command (Indranil0603) - Added
APPEND
Command (Aditya-Bhalerao)
Improvements and Refactoring
- Abstracted out Table implementation and supporting Swiss and Go maps (Arpit Bhayani)
- Eval Refactor for better compatibility with all protocols and multithreading (Ashwin Kulkarni)
- Made DiceDB build work on different architectures (swaingotnochill)
- Added Websocket support (prateek.singh.rathore)
- Improved code structure for evalHVALS (Jyotinder Singh)
Bug Fixes
- Fixed
BITPOS
command (Bhavya Jain) - Fixed
TYPE
command return encoding (apoorvyadav1111) - Fixed Child Process not working for
BGREWRITEAOF
on MacOS (KaviiSuri)
Testing and Documentation
- Added integration tests for
KEYS
,MGET
,MSET
,JSON
commands using HTTP (Shubh1815) - Added HTTP Integration Tests for various commands (Karan Dixit, HARSH VARDHAN SINGH, apoorvyadav1111)
- Added Websocket integration tests for
SET
andGET
(prateek.singh.rathore) - Updated documentation for various commands (multiple contributors)
- Improved consistency in documentation for multiple commands (multiple contributors)
Other
- Made keystat localized to store instance (soumya-codes)
- Added check for controlling the max TCP connections (Ayush Saluja)
- Updated README with various improvements (Arpit Bhayani, Dhroov Gupta)
- Version patch and updates (Arpit Bhayani)
Discussion
Points to discuss [from Arpit]
- Playground mono
- Let’s use the word DiceDB and not Dice, every where, there are variable and config places where the word Dice is used
- The config “REQUEST_LIMIT” should be “REQUEST_LIMIT_PER_MIN”
- The config “REQUEST_WINDOW” should be “REQUEST_WINDOW_SEC”
- What is the purpose of the package internals/cmds?
- Why is there a package called db that just is a wrapper over DiceDB commands? Supporting a new command in Playground now means making a change in both backend and frontend. Also, these functions are essentially useless now.
- Also, A better way would be for SDK to expose a generic command that takes command and argos and executes the. What do you think?
- With this, the need for diced.go vanishes
- Instead of exposing the endpoint as `/cli`, let’s call it `/shell/exec`
- We need all errors to be standardized w.r.t casing. I propose everything to be lowercase.
- server/httpServer.go -> server/http.go, why again the word “server”
- “errorResponse” function should do JSON marshal and not string format
- I see places where log and slog both being used, let’s just use slog everywhere
- Need to understand pkg/util/helpers.go, neither the name not the function made much sense.
- Playground Web
- Have a .env file that can take playground mono URL which points to API URL
- Do not call it `CLI_COMMAND_URL`, a bad name. Call it `PLAYGROUND_MONO_URL`
- Should we not check in package-lock.json? When I installed the file, it got modified
- README lacks node version requirement
- Does this output static site or does it require a server to run? I see the command `npm run start` to start the server in production. Ideally, we want a static website for the playground web. No servers.
- Why is Dockerfile_Backend file even present in web? Also, very bad name. We are calling it Playground Mono. Also, the name is neither snake nor camel case.
- “CLI” is a bad name, let’s call it Shell.
- “ // comment this to hide footer” is such a useless comment.
- Comments are supposed to be `// comment` and not `//comment`
- “DiceDB PlayGround” as name should be “DiceDB Logo” “Playground”
- “Cleanup in :” and “Command left:” have inconsistent styling. Also, it should be `Commands left`. Add a tool tip (i) button, next to both that tells what these limits are all about.
- Move commands from command.ts file to using DiceDB commands command
- Delete mock data file
- In api.ts, propagate the error to the use instead of just logging it to console. Show user the error that was emitted from the backend/mono.
- Constants file may not be required rightnow, given we should use Playground Mono URL from .env
- Instead of calling “blacklist” let’s use the word “blocklist”
- Why cliUtils has get and set and delete, do we not support any other command? Also, given this file is present in utils folder it should be called `utils/cli.ts` and not `utils/cliUtils.ts`