Monday, May 26, 2014

Week one, tasks done!

During the last week I have studied the code and create a ER model for structuring the database of the program.
Converting the existing database will be a quite easy task because in the code is planned  the possibility to simply switch type of database.
The ER model that i developed is in the image below:

I shared the model image even on Google drive (here) and maybe I will update this later if there is this need.
In this model I found some new entity that will be soon developed in the code.
The most important entity is Trigger that is the set of all words that the program will recognize when users uses some voice commands and there was introduced the support for locales.
This "table" must be super-optimized to reduce the latency and to improve the real time response of the system.
A separation between triggers and commands was made, there is the possibility to make different types of commands (not only gpio on and off) and in the GPIO there is the type attribute for defining if the GPIO is in,out,in/out for example or such a specific type.
The room entity was introduced to make more accurate infos about the node location and to plan a room based configuration for the setup phase of the system.
At last the possibility to make different remote commands layout per user (to control all house services) was introduced to allow some kind of customization of the UI layouts.
About this last thing, even if it is not possible in GSoC period, maybe will be a good idea to develop a configuration language for sharing across the UIs the custom remote command layouts.
This the model is the foundation of the work that will start this week, structuring the database and the test of this.
During this week I even planned the communication protocol between all UIs and RPC server that will use the following tuple:
"trigger,command,reference (id/keyword for the target device)"
But I will go deep when I will develop the RPC daemon.
Last but not least important I created some mockups for the WebUI interface but I have some paper draft so in my spare time I will copy those ideas on some kind of mockup online software.

So that is all, good work to everybody! 

Tuesday, May 20, 2014

First day...

Today is the first day of GSoC and I'm going to examine what are the tasks that I will complete for this week.
Since March 21 I'm studying the code and the structure of the project looking for the best approach for the DB. I think that a relational database is the best way to get high performance on an embedded device like RaspberryPI (maybe in future will be possible to buy a low cost board with more resources but now those are not so easy to found), because I think this is the lighter way to reach a good performance on this kind of hardware.
Moreover my mentor suggest me to look at CHI to introduce some kind of caching to improve even more the system's response time so I have to understand how CHI create and store caches.
For the next week I must have a ER structure to develop the DB structure as flexible as possible.

The second part of this contest (after the midterm evaluation period) will be focused on the WebUI.
So in this week I will study the best structure for the JSON RPC server and plugin loading and triggering.
Structuring a good RPC daemon create the condition to split up WebUI and service, allowing us to plan, in future version of the software, the possibility to create many kinds of UI (Mobile app, WebUI, PC fronted) without any changes to the core and that's good!
So I'm analyzing the Mojolicious plugin bootup method as the basis of the developing of this feature and I'm making a draft of the communication protocol that will be used by UIs.

As last task I'm going to make a brainstorming for the WebUI to put down some ideas. But this is a long task that could be very hard especially if the goal is a nice and useful interface (I hope to reach a good result).

Last news is that following the hint of my mentor I changed my timeline splitting the test suite developing period to meet the need of creating new tests only when I well defined my modules structure, mudler made me notice that developing a priori tests could make me some unnecessary troubles.

So good work to everyone and happy GSoC! 

Glory glory glory to the Hypnotoad!

Saturday, May 17, 2014

Well... The wellcome pack in da house

One of the most important experience in my life is about to start and I'm so excited!
Contribute to a FOSS project was in my TODO list since I was 14 and now GSoC and the Perl Foundation are offering me this opportunity to improve a project (that is really interesting) and my personal programming skills.
But with this post I want to show you the GSoC 2014 wellcome package:

Those maybe look like simple things but what they represent is really important.
And I want to thank you all for this and moreover for the future work experience! :D