Protobuf Installation
This project demonstrates a basic client-server communication using sockets and Protocol Buffers (protobuf) for serialization and deserialization. Here I use ProtoBuf for faster serialization and deserialization process instead of conventional serializer.
To get started, you need to install Protocol Buffers on your system. Follow the steps below to install protobuf version 3.19.1.
-
Update your package list:
sudo apt update
-
Install the required packages:
sudo apt install autoconf automake libtool curl make g++ unzip
-
Download the Protocol Buffers source code:
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protobuf-all-3.19.1.tar.gz
-
Extract the downloaded tarball:
tar -xzf protobuf-all-3.19.1.tar.gz cd protobuf-3.19.1
-
Configure the build environment:
./configure
-
Compile the source code:
make
-
Run tests to ensure everything is set up correctly:
make check
-
Install the compiled binaries:
sudo make install sudo ldconfig
-
Verify the installation:
protoc --version
If you encounter issues with the installation, particularly related to library paths, follow these additional steps:
-
Export the library path:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
-
Persist the library path in your bash profile:
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc
-
Verify the installation again:
protoc --version
Following these steps should ensure that Protocol Buffers is installed correctly on your system.
To run this project, ensure that you have Maven installed and configured. Then, use the following command to build the project:
mvn clean install