<commit_before># Dynamo

## Contributors

1. <NAME>
2. <NAME>
3. <NAME>
4. <NAME>

## Usage

### Prerequisites

To run this application, you need to have basic docker tooling installed:
* [docker](https://docs.docker.com/engine/installation/)
* [docker-compose](https://docs.docker.com/compose/install/)
* [docker-machine](https://docs.docker.com/machine/install-machine/)
* [weave](https://github.com/weaveworks/weave#installation)

### Build & run

Download the repository and create docker machines:

```bash
git clone https://github.com/jurajmatus/dps-dynamo.git
cd dps-dynamo
```

Deploying Master
```bash
docker-machine create -d virtualbox master
eval $(docker-machine env master)
weave launch
eval "$(weave env)"
docker-compose -f master.yml up

# ...after work is done

docker-compose -f master.yml rm --all
weave stop
weave reset
eval "$(weave env --restore)"
```

Deploying Slave
```bash
docker-machine create -d virtualbox slave
eval $(docker-machine env slave)
weave launch $(docker-machine ip master)
eval "$(weave env)"
docker-compose -f slave.yml scale key-value-store=2

# ...after work is done

docker-compose -f slave.yml scale key-value-store=0
weave stop
weave reset
eval "$(weave env --restore)"
```

### API

Firstly you need to know an address of application's end-point. All addresses listed will be relative to this:
```bash
docker-machine ip master
```

#### Get

URL: /storage/{key}?minNumReads={minNumReads}
<commit_msg>README clarification<commit_after># Dynamo

## Contributors

1. <NAME>
2. <NAME>
3. <NAME>
4. <NAME>ál

## Usage

### Prerequisites

To run this application, you need to have basic docker tooling installed:
* [docker](https://docs.docker.com/engine/installation/)
* [docker-compose](https://docs.docker.com/compose/install/)
* [docker-machine](https://docs.docker.com/machine/install-machine/)
* [weave](https://github.com/weaveworks/weave#installation)

### Build & run

Download the repository and create docker machines:

```bash
git clone https://github.com/jurajmatus/dps-dynamo.git
cd dps-dynamo
```

Deploying Master
```bash
docker-machine create -d virtualbox master
eval $(docker-machine env master)
weave launch
eval "$(weave env)"
docker-compose -f master.yml up
```

Cleaning Master
```bash
# In other shell than it was deployed in
docker-compose -f master.yml rm --all
weave stop
weave reset
eval "$(weave env --restore)"
```

Deploying Slave
```bash
docker-machine create -d virtualbox slave
eval $(docker-machine env slave)
weave launch $(docker-machine ip master)
eval "$(weave env)"
docker-compose -f slave.yml scale key-value-store=2
```

Cleaning Slave
```bash
docker-compose -f slave.yml scale key-value-store=0
weave stop
weave reset
eval "$(weave env --restore)"
```

### API

Firstly you need to know an address of application's end-point. All addresses listed will be relative to this:
```bash
docker-machine ip master
```

#### Get

URL: /storage/{key}?minNumReads={minNumReads}

{'fraction_non_alphanumeric': 0.14121232644768034, 'fraction_numerical': 0.004063664070436844, 'mean_word_length': 4.542213883677299, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3536825', 'n_tokens_mistral': 1050, 'n_tokens_neox': 952, 'n_words': 307}