# Resources

Welcome to Virtual planet!

Our Data collection, Database Server, API Servers and front end servers are situated in IBM Bluemix Cloud and those are handled by our dev-ops team Nayan Mevada, Sohil Patel & Mrugesh Modi.

These are current required virtual servers for oizom system :

| System For       | Specifications                                                              | Instances | Info                                                                                                  |
| ---------------- | --------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------- |
| DB Server        | [IBM DashDb Warehouse](https://www.ibm.com/us-en/marketplace/db2-warehouse) | 1         | Cloud-based Db2 hosting                                                                               |
| IoT Server       | [IBM Watson IoT](https://www.ibm.com/internet-of-things) Service            | 1         | Device Connection and Management                                                                      |
| Data Collection  | 512 MB RAM, Bluemix Cloud Foundry Service                                   | 1         | Data Collection from IBM Bluemix IoT Service build using [Node-RED](https://nodered.org)              |
| Scheduler        | 512 MB RAM, Bluemix Cloud Foundry Service                                   | 1         | Data processing and Analytics scheduler build using [Node-RED](https://nodered.org)                   |
| Web-Socket       | 256 MB RAM, Bluemix Cloud Foundry Service                                   | 1         | [ExpressJs](https://expressjs.com/) server & [Socket.io](http://socket.io) based web socket interface |
| API Server       | 512 MB RAM, Bluemix Cloud Foundry Service                                   | 1         | REST APIs built on ExpressJS([LoopBack](https://loopback.io))                                         |
| API Gateway      | [IBM API Connect](https://www.ibm.com/in-en/marketplace/api-management)     | 1         | API Managment server                                                                                  |
| Front End Server | 2GB RAM, 8GB Storage                                                        | 1         | AngularJS Applications do require 2GB RAM to build certain packages.                                  |

## DB Server

For Data to get stored in [DashDb](https://www.ibm.com/us-en/marketplace/db2-warehouse) database, DB server is required.

* This will handle all database connections from API server and WebSocket server clients.
* Snapshot backups implemented for this database backup/restore mechanism
* DB is secured with maximum security.
* Enough dataspace is needed as each devices are sending data every 2 to 10 minutes interval.
* For I/O to maintain, high-speed SSD is also a necessary for this.

## API Server & Node-Red

As per REST APIs are mentioned in given wiki document, every web and mobile devices will be hitting API requests to API servers only which do have latest stable API code deployed and running on their machines.

* API do have stable and non-interrupted secure DB connection.
* APIs are secured via  [OAuth 2.0](https://oauth.net/2), so security constraint is also defined in code.
* As devices are sending data via MQTT protocol to IoT subscribes, [Node-RED](https://nodered.org) can work as Data Collectors and will be hosted on same servers
* Schedulers will be running every hour/day/week/month for collecting, Data processing, and Analytics according to data.

## Front End Server

This Server will be required to run [AngularJS 2](https://angular.io/) application and build the same application, that's why 2GB Ram. Along with this, There's WebSocket running on this server to handle all the socket requests.

Here's more graphical information about Oizom Software Resources :

![Oizom Software Resources](https://972691714-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8WaZc51rJUe9PEU-7%2F-Ld8f-WsWSN4M-tjs7H7%2F-Ld8f03pAXRISaP1Piwk%2FOizom-Terminal.png?generation=1556014178608362\&alt=media)
