Implement Redis using c++.
- Data structure: skiplist, hash table
- Network library: using boost asio / asio(c++20) instead of native io(epoll, iocp etc.)
- Provide multithread ability: lock manager or mvcc
- Distributed system feature(raft master elaction, consistent hash)
- Provide sql interface to access data
-
install vcpkg following the steps in https://github.com/microsoft/vcpkg
-
run integrate command of vcpkg
vcpkg integrate install
see details in https://github.com/microsoft/vcpkg/blob/master/docs/users/integration.md
-
install spdlog, gtest with vcpkg
-
install CMake Tools and CMake plugin in visual studio code
-
change CMAKE_TOOLCHAIN_FILE conf in settings.json to your vcpkg path
-
ctrl/cmd + shift + p, select "cmake: build" option, you will see the binary in a few seconds.
Note: pay attention to Triplet selection when you install package with vcpkg, it must be consistent with the CMake configure of the project. for example, if the Triplet selection is x86-windows, you should configure the project with x86.