Skip to content

Commit 98d1336

Browse files
committed
fix: Fixing panic in cluster manager and adding a cluster example
1 parent 56026b6 commit 98d1336

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2480
-186
lines changed

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+
5+
### [1.0.3](https://devt.de///compare/v1.0.2...v1.0.3) (2020-03-08)
6+
7+
8+
### Bug Fixes
9+
10+
* Adding compose files and frontend files ([f33d23f](https://devt.de///commit/f33d23f912a3e3d05192a88afadb592b05229040))
11+
* Adding mining example ([c585876](https://devt.de///commit/c585876025a37539aed7f81c514f0f802baf9c9f))
12+
* Adding UInt64 conversion function ([a63fe0f](https://devt.de///commit/a63fe0f575fe977e06c6f534718b184d40817128))
13+
* Make cluster translationRec and transferRec gobable ([34623d8](https://devt.de///commit/34623d897286960180474fb466cec499ec1e0188))
14+
15+
### [1.0.2](https://devt.de///compare/v1.0.1...v1.0.2) (2020-02-22)
16+
17+
18+
### Bug Fixes
19+
20+
* Adding more debug tools to cluster ([7ca3ae0](https://devt.de///commit/7ca3ae04cdf3816edb950be0b066c94aff87a70f))
21+
* Adding proper Graph Manager global values for tests ([127477f](https://devt.de///commit/127477fd541d45258bad36e36f17648bf95bd4d2))
22+
* Cluster Distributed Storage must assign new locations from 1 ([6c24001](https://devt.de///commit/6c240016c1414f945adb2e47c26542c3a226ef5b))
23+
* Small fix for debug code and better comments ([3b68724](https://devt.de///commit/3b68724d2ab936ec0c29afc6cc0d191714cd1a23))
24+
25+
### [1.0.1](https://devt.de///compare/v1.0.0...v1.0.1) (2019-12-15)
26+
27+
28+
### Bug Fixes
29+
30+
* Minor restructuring ([137c0ae](https://devt.de///commit/137c0ae6e7460fdb96614a555030cde2dcb3d7df))
31+
32+
## 1.0.0 (2019-08-30)
33+
34+
35+
### Features
36+
37+
* BREAKING CHANGE: Restructure EliasDB code for go modules / Adding GraphQL interface ([65c38db59e](https://devt.de///commit/65c38db59e))
38+
* Initial commit ([b2e9cd9a8a](https://devt.de///commit/b2e9cd9a8a))

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ENTRYPOINT ["../eliasdb"]
4141
#
4242
# docker run --rm --user $(id -u):$(id -g) -v $PWD:/data -p 9090:9090 krotik/eliasdb server
4343

44-
# To run the console as the current user, use the eliasdb.config.json in
45-
# the local directory
44+
# To run the console as the current user and use the eliasdb.config.json in
45+
# the local directory run:
4646

4747
# docker run --rm --network="host" -it -v $PWD:/data --user $(id -u):$(id -g) -v $PWD:/data krotik/eliasdb console

Jenkinsfile

+7-13
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,9 @@ pipeline {
1212
* a new product version. The versioning will be according to the rules
1313
* of “Semantic Versioning” (https://semver.org/).
1414
*
15-
* Building is done using goreleaser (https://goreleaser.com/) for different
16-
* platforms.
15+
* Building is done using simple make.
1716
*
18-
* Testing produces code coverage badges which can be embedded on other
19-
* pages.
20-
*
21-
* Everything runs in docker containers to ensure isolation of the build
22-
* system and to allow painless upgrades.
17+
* Testing produces code coverage badges which can be embedded web pages.
2318
*/
2419

2520
stages {
@@ -60,8 +55,7 @@ pipeline {
6055
sh 'git fetch --tags'
6156
}
6257

63-
sh 'mkdir -p .cache'
64-
sh 'docker run --rm --user $(id -u):$(id -g) -v $PWD/.cache:/.cache -v $PWD:/go/code -w /go/code goreleaser/goreleaser --snapshot --skip-publish --rm-dist'
58+
sh '/opt/env-go/bin/env-go make dist'
6559
}
6660
}
6761
stage('Test') {
@@ -74,12 +68,12 @@ pipeline {
7468

7569
sh """echo '<svg width="88" height="20" xmlns="http://www.w3.org/2000/svg"><g shape-rendering="crispEdges"><path fill="#555" d="M0 0h41v20H0z"/><path fill="#fc1" d="M41 0h40v20H41z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="20.5" y="14">tests</text><text x="60" y="14">fail</text></g></svg>' > test_result.svg"""
7670

77-
sh 'docker run --rm -e GOPATH=/tmp -v $PWD:/go golang go test -p 1 --coverprofile=coverage.out ./...'
78-
sh 'docker run --rm -e GOPATH=/tmp -v $PWD:/go golang go tool cover --html=coverage.out -o coverage.html'
71+
sh 'CGO_ENABLED=0 /opt/env-go/bin/env-go go test -p 1 --coverprofile=coverage.out ./...'
72+
sh '/opt/env-go/bin/env-go go tool cover --html=coverage.out -o coverage.html'
7973

8074
echo 'Determine overall coverage and writing badge'
8175
script {
82-
coverage = sh(returnStdout: true, script: 'docker run --rm -e GOPATH=/tmp -v $PWD:/go golang go tool cover -func=coverage.out | tee coverage.txt | tail -1 | grep -o "[0-9]*.[0-9]*%$" | tr -d "\\n"')
76+
coverage = sh(returnStdout: true, script: '/opt/env-go/bin/env-go go tool cover -func=coverage.out | tee coverage.txt | tail -1 | grep -o "[0-9]*.[0-9]*%$" | tr -d "\\n"')
8377

8478
echo "Overall coverage is: ${coverage}"
8579

@@ -105,7 +99,7 @@ pipeline {
10599
sshagent (credentials: ['Gogs']) {
106100
sh 'git fetch --tags'
107101
}
108-
sh 'docker run --rm -v $PWD:/app standard-version'
102+
sh 'standard-version'
109103

110104
// The new version is inserted into the code
111105
//

Makefile

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
export NAME=eliasdb
2+
export TAG=`git describe --abbrev=0 --tags`
3+
export CGO_ENABLED=0
4+
export GOOS=linux
5+
6+
all: build
7+
clean:
8+
rm -f eliasdb
9+
10+
mod:
11+
go mod init || true
12+
go mod tidy
13+
test:
14+
go test -p 1 ./...
15+
cover:
16+
go test -p 1 --coverprofile=coverage.out ./...
17+
go tool cover --html=coverage.out -o coverage.html
18+
sh -c "open coverage.html || xdg-open coverage.html" 2>/dev/null
19+
fmt:
20+
gofmt -l -w -s .
21+
22+
vet:
23+
go vet ./...
24+
25+
build: clean mod fmt vet
26+
go build -o $(NAME) cli/eliasdb.go
27+
28+
build-win: clean mod fmt vet
29+
GOOS=windows GOARCH=amd64 go build -o $(NAME).exe cli/eliasdb.go
30+
31+
dist: build build-win
32+
rm -fR dist
33+
34+
mkdir -p dist/$(NAME)_linux_amd64
35+
mv $(NAME) dist/$(NAME)_linux_amd64
36+
cp LICENSE dist/$(NAME)_linux_amd64
37+
cp NOTICE dist/$(NAME)_linux_amd64
38+
tar --directory=dist -cz $(NAME)_linux_amd64 > dist/$(NAME)_$(TAG)_linux_amd64.tar.gz
39+
40+
mkdir -p dist/$(NAME)_windows_amd64
41+
mv $(NAME).exe dist/$(NAME)_windows_amd64
42+
cp LICENSE dist/$(NAME)_windows_amd64
43+
cp NOTICE dist/$(NAME)_windows_amd64
44+
tar --directory=dist -cz $(NAME)_windows_amd64 > dist/$(NAME)_$(TAG)_windows_amd64.tar.gz
45+
46+
sh -c 'cd dist; sha256sum *.tar.gz' > dist/checksums.txt

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Features
2626

2727
Getting Started (standalone application)
2828
----------------------------------------
29-
You can download a precompiled package for Windows (win64) or Linux (amd64) [here](https://void.devt.de/pub/eliasdb).
29+
You can download a pre-compiled package for Windows (win64) or Linux (amd64) [here](https://void.devt.de/pub/eliasdb).
3030

3131
Extract it and execute the executable with:
3232
```
@@ -58,14 +58,18 @@ docker run --rm --network="host" -it -v $PWD:/data --user $(id -u):$(id -g) -v $
5858

5959
### Tutorial:
6060

61-
To get an idea of what EliasDB is about have a look at the [tutorial](https://devt.de/krotik/eliasdb/src/master/examples/tutorial/doc/tutorial.md). This tutorial will cover the basics of EQL and show how data is organized.
61+
To get an idea of what EliasDB is about have a look at the [tutorial](examples/tutorial/doc/tutorial.md). This tutorial will cover the basics of EQL and show how data is organized.
6262

63-
There is a separate [tutorial](https://devt.de/krotik/eliasdb/src/master/examples/tutorial/doc/tutorial_graphql.md) on using ELiasDB with GraphQL.
63+
There is a separate [tutorial](examples/tutorial/doc/tutorial_graphql.md) on using ELiasDB with GraphQL.
6464

6565
### REST API:
6666

6767
The terminal uses a REST API to communicate with the backend. The REST API can be browsed using a dynamically generated swagger.json definition (https://localhost:9090/db/swagger.json). You can browse the API of EliasDB's latest version [here](http://petstore.swagger.io/?url=https://devt.de/krotik/eliasdb/raw/master/swagger.json).
6868

69+
### Clustering:
70+
71+
EliasDB supports to be run in a cluster by joining multiple instances of EliasDB together. You can read more about it [here](cluster.md).
72+
6973
### Command line options
7074
The main EliasDB executable has two main tools:
7175
```
@@ -212,12 +216,15 @@ docker build --tag krotik/eliasdb .
212216

213217
Example Applications
214218
--------------------
215-
[Chat](https://devt.de/krotik/eliasdb/src/master/examples/chat/doc/chat.md) - A simple chat application showing user management and subscriptions.
219+
- [Chat](examples/chat/doc/chat.md) - A simple chat application showing user /management and subscriptions.
220+
- [Data-mining](examples/data-mining/doc/data-mining.md) - A more complex application which uses the cluster feature of EliasDB and GraphQL for data queries.
221+
216222

217223
Further Reading
218224
---------------
219225
- A design document which describes the different components of the graph database. [Link](https://devt.de/krotik/eliasdb/src/master/eliasdb_design.md)
220226
- A reference for the EliasDB query language EQL. [Link](https://devt.de/krotik/eliasdb/src/master/eql.md)
227+
- A reference for the EliasDB's support for GraphQL. [Link](https://devt.de/krotik/eliasdb/src/master/graphql.md)
221228
- A quick overview of what you can do when you embed EliasDB in your own Go project. [Link](https://devt.de/krotik/eliasdb/src/master/embedding.md)
222229

223230
License

0 commit comments

Comments
 (0)