<commit_before>Smart Data Platform (SDP)
==============

Server reference implementation
--------------
The reference solution uses a server environment that allow to emulate some of the interfaces that the SDP will provide. In particular, the components that must be installed on the server allow you to emulate the functions of acquisition and MQTT stream to the browser via WebSockets.

Installation
-----------

 *  Installation of the Broker MQTT
The broker MQTT chosen for the realization of the reference solution is mosquitto. The software can be installed via the package management system of Ubuntu.
```
sudo apt-get install mosquitto mosquitto-clients
```

 *  Installation of the server Websocket
The implementation WebSocket choice for the reference solution is based on Node.JS and Socket.IO. 
Node.JS must be installed by downloading and compiling from source.

 Prerequisites for Node.js:

```
GCC 4.2 or newer
Python 2.6 or 2.7
GNU Make 3.81 or newer
libexecinfo (FreeBSD and OpenBSD only)
```

 Installation of Node.js:
```
tar xzf node-<version>.tar.gz
cd node-<version>
./configure
make
make install
```

 After installing Node.JS, you must install the necessary add-on modules that are used for the operation of the reference solution. They can be installed using the package management tool that is installed as part of Node.JS: npm. The first of these components is Socket.IO which is the module that provides an implementation of Node.JS websocket. For simplicity, we install all modules globally so that they are accessible to any Linux user (option "-g").
```
sudo npm install –g socket.io
sudo npm install –g mqtt
sudo npm install –g forever
```
 Node.JS is necessary to indicate the location to which you installed the add-on modules that are managed by the tool "npm". For simplicity you can use the file provided in the archive that accompanies this document.
``` 
cp node.sh /etc/profile.d/
```

 *  Installation of the web page
The final part is to insert the page html demo and the necessary dependencies JavaScript within a web server. For example, if you installed Apache from the official repositories of Ubuntu, just copy the necessary files into a folder under "/var/www".<commit_msg>Modify file README.md for webapplication<commit_after>Smart Data Platform (SDP)
==============

Server reference implementation
--------------
The reference solution uses a server environment that allow to emulate some of the interfaces that the SDP will provide. In particular, the components that must be installed on the server allow you to emulate the functions of acquisition and MQTT stream to the browser via WebSockets.

Installation
-----------

 *  Installation of the Broker MQTT
 
 The broker MQTT chosen for the realization of the reference solution is mosquitto. The software can be installed via the package management system of Ubuntu.
```
sudo apt-get install mosquitto mosquitto-clients
```

 *  Installation of the server Websocket
 
 The implementation WebSocket choice for the reference solution is based on Node.JS and Socket.IO. 
Node.JS must be installed by downloading and compiling from source.

 Prerequisites for Node.js:

```
GCC 4.2 or newer
Python 2.6 or 2.7
GNU Make 3.81 or newer
libexecinfo (FreeBSD and OpenBSD only)
```

 Installation of Node.js:
```
tar xzf node-<version>.tar.gz
cd node-<version>
./configure
make
make install
```

 After installing Node.JS, you must install the necessary add-on modules that are used for the operation of the reference solution. They can be installed using the package management tool that is installed as part of Node.JS: npm. The first of these components is Socket.IO which is the module that provides an implementation of Node.JS websocket. For simplicity, we install all modules globally so that they are accessible to any Linux user (option "-g").
```
sudo npm install –g socket.io
sudo npm install –g mqtt
sudo npm install –g forever
```
 Node.JS is necessary to indicate the location to which you installed the add-on modules that are managed by the tool "npm". For simplicity you can use the file provided in the archive that accompanies this document.
``` 
cp node.sh /etc/profile.d/
```

 *  Installation of the web page
 
 The final part is to insert the page html demo and the necessary dependencies JavaScript within a web server. For example, if you installed Apache from the official repositories of Ubuntu, just copy the necessary files into a folder under "/var/www".
{'fraction_non_alphanumeric': 0.06674107142857143, 'fraction_numerical': 0.0040178571428571425, 'mean_word_length': 4.0862656072644725, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3943688', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1073, 'n_words': 653}