Showing posts with label HLD. Show all posts
Showing posts with label HLD. Show all posts

Tuesday, July 1, 2014

HLD

A more detailed HLD of the architecture:



The engine (wnw_engine.py) is written in Python, but the bridge library to connect to the sketch ad been re-written. This process is the only one able to communicate with the ATmega32U4 processor that means it's teh only process that will interact with the sensors and output using the dedicated mailbox technology. Assuming that, I write the bridge library (wnw_bridge.py)  in order to open a socket to connect to the mailbox and maintain it open untill the process is killed instead of opening and closing a socket every time you want to read or write a value into the mailbox.
The database access is centralized into a specific library (wnw_database.py) in order to make easy any database changes we will do in the future (including the database itself).
The web interface must be mantained easy and quik so I choose jQuery Mobile and PHP to interact with the DB that is now the only point of contact between out system and the outside world.

Thursday, June 19, 2014

HLD changes

Here a High Level Design of the SW, more detailed than the last one:


Wednesday, June 18, 2014

HLD of the used technologies

What follow is just a very high level design of the technologies we are going to use on Arduino's side:


In a nutshell, I'm going to use the 32U4 to access our hardware (sensors, RTC and relays) providing a set of simple read and write API to a Python script running on the AR9331 processor. It stores/retrieves info in/from a MySQL (or sqlite) database. A web server is responsible to communicate with the client and provide/change info stored into the DB via PhP scripts.

This way:
  1. the sketch will be very simple and 'light' and we shouldn't have any problem in uploading it into the small space provided by Yun;
  2. all the logic to manage the sensors and actuators will be implemented with python scripts;
  3. we will use the flexibility of a DB to store configurations, logs, sensors/actuators status and any other info we'd like to share with the rest fo the world;
  4. a light web server will make easier the design and development (and test) of the interface we will provide to the final user.
Also there is another important reason why I'm choosing a web server based on PHP/MySQL technology: it's a common technology used by a lot of platform providing web hosting for free. When (in the future) I will create a website to manage my Arduino, I will just need to move my PHP scripts and MySQL structures/data to the new host. Maybe it will not be so easy, but I assume I can reuse 90% of the code.