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
jainmohit2001
changed the title
Make the code for challenge 8 - Write Your Own Redis Server more modular and scalable
Make the code for challenge 8 more modular and scalable
Aug 30, 2023
Hey!
I know a different code structure for improve readability. Check object mapping / object dictionary. it's a better alternative of switch case.
I haven't seen the whole code, due to the less knowledge, so you can try it.
Currently the commands in the server implementation are handled via switch case statements as follows:
This way of writing code is not scalable.
What we can do is create a new folder, say
commands
, add the respective commands, and export them usingmodule.exports
.We can take the sample code from Challenge 19 as a reference and build the command handlers in a similar manner.
The text was updated successfully, but these errors were encountered: