<commit_before>Cyberinfrastructure for Intelligent Water Supply (ciws) is an end to end system for residential water consumption data collection, processing and analysis. It primarily has three components, namely ciws-node (data collection), ciws-server (back-end) and ciws-client (website/ mobile app).

# ciws-server
The back-end server, web service and analysis code reside in this repository. <br />
A high level system architecture diagram is as follows: 
![alt tag](https://github.com/UCHIC/ciws-server/blob/master/figs/CIWS_server_fig.png)

## Design decisions
The back-end service will be Python based. We decided to go with a microframework instead of macro, full stack frameworks like Django, because of its simplicity and ease to add/ switch components. We chose Bottle over Flask due to its single file approach and zero dependencies. If things get messy as we move forward, we will switch to favourable frameworks. HTTP requests method will be used as the data exchange mechanism. Long term, it will ideally be through web sockets which would mandate use of frameworks like Tornado or Twisted for asynchronous methods. <br />
We chose MongoDB, a popular NoSQL option over SQL because of its flexibility and scalability. 

## Development
Test changes on a local machine (localhost).

## Deployment
Pull this repository code to your server and change serverconfig.json details.

## Contribution
Fork and branch gitflow.
<commit_msg>bit on restful api<commit_after>Cyberinfrastructure for Intelligent Water Supply (ciws) is an end to end system for residential water consumption data collection, processing and analysis. It primarily has three components, namely ciws-node (data collection), ciws-server (back-end) and ciws-client (website/ mobile app).

# ciws-server
The back-end server, web service and analysis code reside in this repository. <br />
A high level system architecture diagram is as follows: 
![alt tag](https://github.com/UCHIC/ciws-server/blob/master/figs/CIWS_server_fig.png)

## Design decisions
The back-end service will be Python based. We decided to go with a microframework instead of macro, full stack frameworks like Django, because of its simplicity and ease to add/ switch components. We chose Bottle over Flask due to its single file approach and zero dependencies. If things get messy as we move forward, we will switch to favourable frameworks. HTTP requests method will be used as the data exchange mechanism. Long term, it will ideally be through web sockets which would mandate use of frameworks like Tornado or Twisted for asynchronous methods. <br />
We chose MongoDB, a popular NoSQL option over SQL because of its flexibility and scalability. <br />
Back-end information will be exposed using a simple RESTful API though Bottle.

## Development
Test changes on a local machine (localhost).

## Deployment
Pull this repository code to your server and change serverconfig.json details.

## Contribution
Fork and branch gitflow.

{'fraction_non_alphanumeric': 0.0540994623655914, 'fraction_numerical': 0.0, 'mean_word_length': 4.76937984496124, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 2, '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': '3447669', 'n_tokens_mistral': 745, 'n_tokens_neox': 703, 'n_words': 412}