Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elven9/electronic-voting-system
Experiment voting system that aim to realize some typical fault tolerance implementation in a scalable, distributed way
https://github.com/elven9/electronic-voting-system
Last synced: 24 days ago
JSON representation
Experiment voting system that aim to realize some typical fault tolerance implementation in a scalable, distributed way
- Host: GitHub
- URL: https://github.com/elven9/electronic-voting-system
- Owner: Elven9
- Created: 2022-06-20T06:56:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-20T06:59:14.000Z (over 2 years ago)
- Last Synced: 2024-11-21T14:47:05.414Z (3 months ago)
- Language: Go
- Size: 260 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fault Tolerant Computing Term Project
## Setup Dev Environment
- node `17.7.2`
- go `1.18`
- protoc `3.6.1`### OSX
```sh
# Install Golang compiler & toolchain
# Mac -> install with brew or directly download binary from the website
brew install go# Install golangci-lint for linter
brew install golangci-lint# Install protobuf compiler
brew install protobuf# Node env can be managed with nvm package manager.
# Initialize Npm Dev Environment
npm install
```### Linux
```sh
sudo apt-get update# Don't forget to check the version
sudo apt-get install golang-go# Install golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2# Install protobuf compiler
sudo apt-get install protobuf-compiler# Install plugins for protobuf compiler to generate go
go get google.golang.org/[email protected]
go get google.golang.org/grpc/cmd/[email protected]
```## Build
Build Commands
```sh
# This will build the project and output the binary
make build# Build independent test
make build-test# Clean the artifacts
make clean
```Build with docker
```sh
# Run in root directory
docker build -f build/package/prod.dockerfile -t online-voting-system .
```## Start the Server
Start with Docker-Compose
```sh
docker-compose up
```Server will open port from both instance from `8080` and `8081`
### References
Development Documents
- [golang-standards/project-layout: Standard Go Project Layout](https://github.com/golang-standards/project-layout)
- [Go | gRPC](https://grpc.io/docs/languages/go/)Style Guild:
- [Git Commit Message 這樣寫會更好,替專案引入規範與範例](https://wadehuanglearning.blogspot.com/2019/05/commit-commit-commit-why-what-commit.html)
- [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification)
- [conventional-changelog/commitlint: 📓 Lint commit messages](https://github.com/conventional-changelog/commitlint)
- [typicode/husky: Git hooks made easy 🐶 woof!](https://github.com/typicode/husky)
- [golangci/golangci-lint: Fast linters Runner for Go](https://github.com/golangci/golangci-lint)