Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/undin/distributed-computation
https://github.com/undin/distributed-computation
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/undin/distributed-computation
- Owner: Undin
- Created: 2017-08-13T15:58:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-13T16:11:41.000Z (over 7 years ago)
- Last Synced: 2024-10-31T15:26:27.298Z (3 months ago)
- Language: Java
- Size: 59.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Build
Run `./gradlew build`. It requires local rabbitmq to pass tests successfully.
## Run
Application supports two different modes: __server__ and __worker__.
Modes are implemented with Spring profiles with corresponding names: `server` and `worker`.
Profiles can be set through `--spring.profiles.active` command line argument or property in configuration file.
Application __can be__ launched in server and worker modes at same time.
### Server
Run `java -jar build/libs/solanteq-test.jar --data=path-to-datafile --f1=path-to-f1-script.groovy --f2=path-to-f2-script.groovy`
to start application.### Worker
Run `java -jar build/libs/solanteq-test.jar` to start new worker instance.## Configuration
```yaml
rabbitmq:
task-queue: # Name of task queue. Default value is 'tasks'
result-queue: # Name of result queue. Default value is 'results'
concurrency: # Number of consumers for message queue events. Default value is 1server:
task-size: # Maximum number of lines of data file one task contains. Default value is 1000
```## Groovy scripts
Each groovy script represents binary integer function with integer return value
where x is the first argument and y is the second one. For example:
```groovy
x + y
```
or
```groovy
fib(x) - fib(y)def fib(int x) {
if (0 == x || 1 == x) x else fib(x - 1) + fib(x - 2)
}```
It assumes that `f2` script is associative function.