Project implementation function
Technology Selection
Yellow part : Design the packaging and parsing of rpc method parameters , that is, the serialization and deserialization of data, which are used protobuf
for RPC
serialization and deserialization of method calls.
Benefits of using protobuf:
protobuf
is binary storage, xml
and json
is text storage;
protobuf
There is no need to store additional information; while json
storage key-value
, key wastes space
Green part : network part, including finding rpc
service host, initiating rpc
call request and responding rpc
call result, using muduo
network library and left zookeeper
service configuration center (service discovery)
Project code project directory
bin
:executable file
build
: project compilation file
lib
: project library file
src
:Source File
test
: test code
example
: framework code usage example
CMakeLists.txt
: top-level cmake file
README.md
: project readme
autobuild.sh
: Compile the script with one click