<commit_before>[![Build Status](https://travis-ci.org/cparram/ap-networking-proxy-cache.svg?branch=staging)](https://travis-ci.org/cparram/ap-networking-proxy-cache)

# ap-networking-proxy-cache
Proxy cache implementation

## Usage
### Build
* `$ ./gradlew buildClientJar`: Creates a jar for client source set
* `$ ./gradlew buildNodeJar`: Creates a jar for node source set
* `$ ./gradlew buildMasterJar`: Creates a jar for master source set

### Daemons
**You must create your own config.sh file**

* `./proxy-node.sh [start|stop|restart]`
* `./proxy-master.sh [start|stop|restart]`

### Run Client
* `java -jar build/libs/proxy-cache-client-<version>.jar [command [file]] [options]`<commit_msg>Update readme according with new changes<commit_after>[![Build Status](https://travis-ci.org/cparram/ap-networking-proxy-cache.svg?branch=staging)](https://travis-ci.org/cparram/ap-networking-proxy-cache)

# ap-networking-proxy-cache
Projecto with Academic Purpose about Proxy cache implementation.

## Usage
### Build
* `$ ./gradlew buildClientJar`: Creates a jar for client source set
* `$ ./gradlew buildNodeJar`: Creates a jar for node source set

### Daemons
**You must create your own topology.properties file**

* `./proxy-node.sh [start|stop|restart] [port] [path]`

### Run Client
* `java -jar build/libs/proxy-cache-client-<version>.jar [command [file]] [options]`

### Assumptions
* The port used to listen nodes will be the master consultations 8181 which can not be used for other purposes
* Is used configuration files used in each node to store the file list (if it is a proxy) and store ips of synchronized proxies (if master). These files are small

### Vagrant
For testing purposes vagrant file is created for creating virtual machines:

#### Steps:
* `$ bundle install`
* `$ bundle exec librarian-chef install`
* `$ vagrant up --provision`: this could take a long time
* `$ vagrant ssh master`: to enter a master machine
* `$ vagrant ssh node1`: to enter a node machine
{'fraction_non_alphanumeric': 0.13306451612903225, 'fraction_numerical': 0.0025201612903225806, 'mean_word_length': 4.753623188405797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2783211', 'n_tokens_mistral': 637, 'n_tokens_neox': 606, 'n_words': 205}