Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/comradeprogrammer/ds-sequencealignment
coderen voor het lab van de cursus "Distributed System"
https://github.com/comradeprogrammer/ds-sequencealignment
Last synced: 17 days ago
JSON representation
coderen voor het lab van de cursus "Distributed System"
- Host: GitHub
- URL: https://github.com/comradeprogrammer/ds-sequencealignment
- Owner: ComradeProgrammer
- Created: 2023-11-02T09:37:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-16T13:01:08.000Z (11 months ago)
- Last Synced: 2023-12-16T18:40:57.490Z (11 months ago)
- Language: C++
- Size: 18.3 MB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
coderen voor het lab van de cursus "Distributed System"
# For developers
## Third-party frameworks and libraries
Sometimes you may want to know about third-party frameworks and libraries used in this project, and sometimes you **may** want to read the official docs or APIs in order to implement some features. Here are the introductions and links to them. When necessary, you can refer to the following materials:For websocket server, we use crow framework. The official doc is here https://crowcpp.org/master/
For websocket client, we use websocketpp. The repo is https://github.com/zaphoyd/websocketpp and the official doc is https://www.zaphoyd.com/projects/websocketpp/
For json serialization, we use nlohmann::json. The repo (and official guide) is here https://github.com/nlohmann/json
For command line argument parsing, we use google gflag. The repo is https://github.com/gflags/gflags
For unittest, we use googletest. The repo is https://github.com/google/googletest and the official doc is https://google.github.io/googletest/
## Installation guide
### 1. Preparation
You need to have the following things installed
- make
- cmake
- gcc/g++ or clang/clang++### 2. Install dependency libraryies
This project requires boost and asio (we don't need to link them because we only need their header-only part).For macOS, run
```
brew install asio
brew install boost
```For ubuntu, you can also use apt for these libraries.
### 3. Fetch the code and update the submodule
There are 2 submodules included in this project, so after clone the repo you also need to fetch them。
```
git clone --recursive [email protected]:ComradeProgrammer/DS-SequenceAlignment.git
```### 4. Compile and run
There should be 3 executable binaries
- master
- slave
- bmasterIn the project folder, run
```
cmake . -B build
cmake --build build -j32
```
`-j32 means use 32 parallel threads. You can modify this number according to the harware of your own computer`You should be able to see the binaries generated in the build folder.
Just run
` ./build/master --port=8000`
`./build/bmaster --port=8001 --master_uri=ws://localhost:8000/websocket`
` ./build/slave --master_uri=ws://localhost:8000/websocket --backup_master_uri=ws://localhost:8001/websocket --node_id=slave1`
to start them## 5. Unittest
Use`./build/unittest` to run unittests.*You can also use `ctest --test-dir build`. We also support ctest in CMakeList.txt, but this is not recommended since you cannot see actual details of unit tests*
## 6. debug
when generating configuration, use this instead
```
cmake --build build -j32 -DCMAKE_BUILD_TYPE=Debug
```if you are mac os user,in order to have the core dumped when crash, every time you build, you also need run
```
/usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" segv.entitlements
codesign -s - -f --entitlements segv.entitlements ./build/unittest
rm segv.entitlements
ulimit -c unlimited
```