## 4 Results
### Edge Node and Cloud System Modules  
In general, the modules are implemented with Javascript paired with a NOSQL database and serviced by an AWS scalable EC2 cloud. In order to achieve the specified scalability, modularity and expandability requirements, the prototype implementation [43] of the API and the Backend was built based on an adaptation of the M.E.A.N. (MongoDB, Express, Angular, Node) stack. MongoDB is a NoSQL database that allows flexible data modelling and intuitive control over the structure and the location of the data, while ensuring fast performance and seamless data migration. Express is a minimal and flexible Node.js web application framework that provides robust and well-maintained middleware and HTTP utility methods. Node.js is an asynchronous event-driven JavaScript runtime, that is designed to build scalable network applications. Node uses a deadlock free, streaming and low latency-oriented framework/design, which is ideal for the current implementation requirements of the proposed architecture. Angular.js is a JavaScript frontend framework, that is the state of the art in modern web-based applications. For the prototype version, the boilerplate for Angular is preserved, while the Jade templating engine which works in conjunction with Angular is implemented in order to further boost the scalability, expandability and modularity of the system. The project is hosted as a cloud service by Amazon Web Services (AWS). The prototyped API uses an Elastic Computer Cloud, a web service that provides secure, resizable computing capacity paired with a cloud-based MongoDB server, that handles the connectivity and the Data Streaming with the Edge-Service. Figure 18 presents all the aforementioned technologies and the way they are orchestrated. * **Edge Module:** The edge Module provides, through an HTTP connection paired with an extra security key, the ability of the system to accept and update the sensor pool. The edge interface also maintains, when needed, a Mongoose powered connection to the system's Local Database with a unique and secure Open Authentication (Oauth) key pair combination that is kept internally and is defined during the system initialization. When a new sensor data log is introduced to the system, after it passes a sanitisation phase, it is imported through a _POST_ request into the Database. It is then able to be served by the Backend interface to the user through the normal procedure. Every sensor that belongs to a field, is paired with that field using a corresponding unique field id and each field is showcased through the Google Maps API in the map on the front-end main view. Figure 19 showcases the Admin/User Authentication Layer, which through passport and PUG front end template engine ensures that the user and admin level actions are distinguished both visually and internally. * **IOTA Full Node Interface:** The IOTA Full Node interface interacts with the IOTA network, through the IOTA DevNet servers that act as IOTA Full-Nodes (FN). When an order is placed by a customer through the Front-End interface, a unique order ID is created and an Oauth confirmation code is served to the user. The user can then place their payment in the corresponding address that is provided, with the confirmation code on the message of the transaction. Additionally, a pending order entry is created via a _post request_ in the database and is showcased to the user. When an order is placed, the IOTA Full Node Interface module that checks for new transactions handles the inbound transaction and cross-checks the Oauth verification key. If the keys match, \begin{table}
\begin{tabular}{c} \hline
**Sensor and Scope** \\ \hline Humidity,Temperature, Pressure and Ambient H, T, P \\ Rain Amount and Rain \\ Leaf Wetness and Leaf \\ Soil Moisture and Soil \\ Wind Speed, Direction and Wind \\ Solar Radiation and Pyranometer \\ \hline \end{tabular}
\end{table} 
Table 1: The aggregated data by the IoT Node. the pending order is accepted and the corresponding data are handed to the user via My Data view on the front end.