- C++17 or higher
- Boost
- AWS SDK for C++
- hiredis
- Clone this repository
- Add to your CMakeLists.txt:
add_subdirectory(path_to_repo/SMI/)
target_link_libraries(${PROJECT_NAME} PRIVATE SMI)
target_include_directories(${PROJECT_NAME} PRIVATE ${SMI_INCLUDE_DIRS})
- Integrate the library into your project:
#include <Communicator.h>
...
SMI::Communicator comm(peer_id, num_peers, "config/smi.json", "MyApp", 512);
- Clone this repository
cd python
mkdir build
cd build
cmake ..
make
smi.so
gets created in thepython/build
directory. You can copy it into your Python module path or include the build directory viaPYTHONPATH
. The library can then be integrated into your project:
import smi
comm = smi.Communicator(peer_id, num_peers, "config/smi.json", "MyApp", 512);
The Docker containers SMI-build-docker contain all necessary dependencies and set up the environment for you. See the repo for details.
C++ sample code for the library is available at tests/communicator.cpp, the usage from Python is demonstrated in python/tests/client.py.