Monday, June 23, 2014

The midterm...

Finally the midterm evaluation week!
Let's take a brief summary of what happened, during the past week some fixes were done to the developed code.
The IntelliHome::RPC::Service::Base module was added to the RPC branch introducing inheritance of a base module for the RPC services.
This gives us the possibility to forget the {'with_mojo_tx'} = 1 declaration in every module.
The other thing that's could be considered as done is the porting of the Parser with the SQLite backend.
First test results are good and the software seems to work fine but more intensive test must be done ASAP.
And now let's talk about the midterm evaluation of this week...
This is the first evaluation period that gives us feedback about our work as students or mentors.
But during this period work must proceed so I'm still working on the test suite and developing modules in any case.
Hope everything will be fine and good work to everybody! 

Tuesday, June 17, 2014

The SQLite week....

Hello folks this was a fruitful week; here comes some updates!
During the past week I worked on the SQLite DB interface for vocal parser.
This work was scheduled for a previous week but it was delayed by studying the best approach to the deployer and because I started the RPC daemon before the scheduling purpose.
But now we got the deployer script for DB to make some test and results are... Errors! :D
I created the deployer using DBIx::Class::DeploymentHandler that will also handle schema upgrades as well as they will be written reflecting the changes to the SQLite database.
After the fist run the script gaves me many errors about the DBIx schema class implementation and that took a while to fix as well as possible.
Meanwhile my work on the SQLite parser interface proceeded and now I think we got a functional implementation for this module. The last thing to do is ensuring the backwards compatibility with the old plugins structure.
During this week I planned to make fully functional this module and making tests and unit tests, fixing bugs eventually.
Also on the RPC feature branch I'm going to introduce a base class for services introducing the inheritance and make life easier for whom will write some new modules.
For now... That's all folks! Good work to everybody!

Monday, June 9, 2014

Working on RPC and DB.

OK it's Monday and a new week is starting... What's the state of play?
My past week job was split in two branch that are going on simultaneously:
  1. Writing the parser interface for the DB;
  2. Enhancing the system RPC functionalities;
Looking at the first branch I created the interface for the new DB with some convenience functions like the existing Mongo interface but still the code need some little fix.
This is caused by the significant difference of the two DB approach and from the introduction of the new Entity in the relational schema.
Another noteworthy problem is the automatic deploy of the DB.
If we suppose to have a SQLite DB rather than a MySQL standard daemon running on our system, the DBIx::Class manual suggest us to create a .sql file that contain all the tables structure.
But this method force us to update two file if we make some update to the schema so, with help of my mentors, we found some DBIx deployer that could create the DB just reading the developed schema.
This is an excellent news but we need to test if this solution works for our purposes and even with SQLite DB, but that's a simple check to do ASAP.
The second part of job was focused on enhancement of RPC daemon functionalities creating a new module.
The parsing module add the parse method to the RPC daemon that is a kernel feature for this software.
This module is important even because contains the structure of future modules that will enrich the capabilities of G@H, and this bring us forward even on the roadmap.
For this week we need to improve more the RPC functions and even complete the Parser DB porting to make possible the switch between backends.
Now It's time to get back to work! Stay tuned! 

Tuesday, June 3, 2014

Week two, Jobs Fast forward...

Ok we are in the third week of GSoC 2014.
During the past week the focus of the work was on the relational DB.
The schema was quite revisited because my first draft didn't include some important attributes like drivers that was introduced in this week.
The driver gives us information of how the GPIO must be used to have a state switch or to retrieve information from input GPIO.
The user entity is no longer connected to the room, because if we have a relation between user and GPIO we obtain a more deep granularity for the access permissions.
The plugin entity, which was designed to collect some information about the plugins, will be replaced from some MOP function to achieve more flexibility and speed.
Now the focus of our work in this week is on creating an interface for the parser to the new database.
This is a very important part because we need to switch from a DB to another ensuring backwards compatibility with the old modules.
Another job done in the past week was the developing of the basis of the module for the RPC server.
I know that it was scheduled only for the 4th week but googling on mojolicious I found on metacpan two useful modules that export this functionality very well.
Mojolicious::Plugin::JsonRpcDispatcher and MojoX::JSON::RPC makes very simple to create a RPC JSON server so I decided to use those to complete this task.
Now we have a RPC server that automatically create hooks for the existing modules.
That's all guys it's time to get back to work! Cheers!