FreeStation: a little sneak peek

16 04 2012

Several months have passed since I wrote about Freestation. I would like show some advances and write about my dissertation project that I hope to finish for the 2th June as last day for deadline on this course.

An introduction reminder

FreeStation is a program built for help to distribute easy and reliable software and information on point of interest (POI).

Basically, a POI is huge device that you can find on universities, libraries, hospitals, police stations, train stations, etc.

For example, this are a couple of images of POIs:

DNI POI on police station

DNI POI on police station

This is POI on a police station for perform changes with a DNI (National Idenfication Document on Spain). It shows a keyboard, trackball and DNI card reader for easy operations with credential authentication using DNI.

It has normal power connection but it also has internet connection for load data. On the following image:

Front detail of DNI POI on a police station

Front detail of DNI POI on a police station

As you can apreciate, it shows with more details a screen showing input boxes for the user and a simple interface with buttons. The height POI is adjusted to people in wheelchairs (a laudable feature for accessibility).

Another example of POI:

Adif POI on a train station

Adif POI on a train station

This image corresponds to another POI on a Adif’s train station. It has a different design, totally vertical with a big screen rotated. Unfortunaly when I take the photo it was turned off, but I think that it is a tactil screen model with internet connection too.

It incorporates a audio system maybe useful for blind people and as possible confirmation for using audio notification. Sadly, it is enough high for wheelchairs people, so maybe the only functions could be a information panel with low interaction. I can’t ensure this, because I never can see running this POI when I travel.

Finally another radical example of POI (three different examples should be enough for ilustrate my point):

SESCAM POI on a hospital

SESCAM POI on a hospital

This is another interesting POI that has a intercommunication phone for direct assistance, keyboard, tracball mouse and sanitary card reader. It also has a tray as printer for deliver useful data to the user. Sadly, when I take the photo the POI also is turned off.

So, this is only a reduced set of examples of a huge variety of POIs. Usually you can find the same model for each same hospital, train station, police station, university, etc. Each model runs practically the same model of software and hardware features. But, when the time past, it is highly probably that some POIs have breakdows, energy loss, software bugs, unconsistence of versions, etc.

So, FreeStation try to repair and unify this problems for offer a kindly solution, because it is important deploy same versions between POIs, recieve notifications when a POI it is offline for a breakdown, auto-restart the POI if some hard bug happens, etc.

Architecture

The Freestation architecture is mainly based on client-server model. Each component is easy to tweak or customize and it doesn’t require technical knowledge for diary use.

Architecture - Server and clients infrastructure

Architecture - Server and clients infrastructure

Let me introduce you the architecture with real screenshots of the application and some diagrams.

Server architecture

FreeStation server runs over a software stack consisting of several technologies and components. It handles all the communication with every client.

It has a friendly webserver GUI panel administration based on PHP + Javascript.

FreeStation Server Webserver GUI

FreeStation Server Webserver GUI

As you can see, you can start/stop/restart the server, see real status and different useful output logs for analyce and diagnose whatever event.

It allows easily make the common tasks for deploy and configure a high amount of clients with POIs.

Under the webserver GUI, it runs a daemon process as backend based on python. Each action and task is handled internally and dispatched on fast way.

The backend can make asynchronous communication with clients. For that the backend uses ICE (Internet Comunication Engine of ZeroIce).

This allows a reliable and robust way to transfer huge information datasets between a big amount of clients and the server.

For example, you also can see a list of current clients handled by the server with stats:

FreeStation Server GUI - List of clients

FreeStation Server GUI - List of clients

The list shows each client hostname, IP address, last connection, requests, status and some actions for each client. You can add/remove/edit clients and all the data associated with a clients would be updated.

Client architecture

A client run only on a POI and periodically poll to the server for updates or information. Clients need a specification for deploy widgets and the data associated for each widget.

A widget on Freestation terminology is a abstract element that performs a atomic operation and provides communication for the data handled inside the widget.

For complex operations a widget could associate with more widgets for perform a sofisticated task or simply commnicate data with other widgets. The widgets only run on clients, but all them are configured only from a server.

This describe a orchestra model where the server acts like a manager and clients with widgets acts like a choir.

That means that a client only can communicate with the server and it is not allowed the communication between clients. But this can be easily a SPOF (Single Point Of Failure) for server. So, it is planned on a future allow several masters servers as failover and syncronize and replicate data between masters.

In other hand, an a server, you have a list of widgets available to configure on a client.

FreeStation Server GUI - List of total widgets

FreeStation Server GUI - List of total widgets

For example, you can choose deploy and configure a USB Storage widget and a Mount Device widget on a client. That widgets could associate operations for list several files of books about medicine. When the user pick a set and choose save to a usb key, the Mount Device detect the usb key and usb storage widget write the data. The result it is a happy user that obtain the needed information quickly and without problems.

FreeStation Server - Associate widget to client

FreeStation Server - Associate widget to client

 

You can associate the needed widgets for a client and configure/edit each widget with custom params (for example, only allow 5 items for save on Mount Device):

FreeStation Server - Configure Widget for a client

FreeStation Server - Configure Widget for a client

Another example, you can choose a Video widget and display a video on POI for idle mode. When the user touch or interact with the POI, you can load a Browser Widget with a concrete webpage. Additionally as some institution you can choose a simple logo widget for display your institution logo on screen.

When a client is totally configured, then can be deployed on POI (normal desktop computer customized). A simple example of client screen deployed:

 

FreeStation Client - Welcome wigdets configured

FreeStation Client - Welcome wigdets configured

There are not limit defining or using new widgets. So in theory, the widget model scale for each custom need for a institution.

Free & easy to scale to your needs

With FreeStation some basic widgets are offered, but on the future, it could has repository widgets associated, widget patners and offer a rich market for developers that they are interested on develop custom widgets for companies, institutions, hospitals.

Soon, I plan to release the code as AGPLv3 on Github. Still I need polish some widgets, finish a real demo case for my dissertation and literally write a boring book with approximattelly 200 pages (currently, I have around 80 bad structure pages written).

So, the project is nearly to finish and with lucky I can finish before to 2th june deadline (and 15 th june official presentation) and finally has a big engineer diploma on my wall, yay!

Meanwhile, there are nearly two months of hard work, But shhh … I found a secret weapon ;)

 

Secret hard work weapon

Secret hard work weapon

 

 

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)


Extrayendo diagramas UML de código python con PyReverse

24 07 2011

En la mayoría de proyectos Python de gran desarrollo, se hace necesario documentar el desarrollo de una aplicación.

A menudo se utilizan los diagramas UML, para ilustrar diagramas de clases, paquetes, etc.

Pyreverse es una utilidad que analiza el código fuente Python y extrae diagramas de clases y dependencias con paquetes.

En los diagramas generados se muestran:

  • Atributos de clases y si es posible su tipo
  • Métodos de clases
  • Enlaces de herencia entre clases
  • Enlaces de asociación entre clases
  • Representación de excepciones e interfaces

Nota: Esta utilidad ha sido integrada desde 2008 con Pylint a partir de la versión 0.15.

Instalación en Ubuntu 11.04

Puesto que Pyreverse esta integrado en Pylint y este utiliza Graphviz para generar los diagramas nos basta con instalar los siguientes paquetes:

1
sudo apt-get install graphviz pylint

A modo de ejemplo, utilizare el código fuente de Tivion, para generar algunos diagramas UML.

Generaramos con pyreverse, un archivo classes_Tivion.png aplicándolo a la carpeta src de Tivion:

1
pyreverse -o png -p Tivion src/

-o : establece el formato de salida
-p nombre : produce los archivos de salida añadiendo el nombre establecido

Esto generará un diagrama como el siguiente (haz click para agrandar):

Python Classes Tivion

Pero el layout por defecto, es algo espartano y podemos mejorarlo con otras hojas de estilo XML que definamos. Para ello necesitamos cambiar el formato de salida a .dot, para posteriormente generar un archivo SVG.

Generar el .dot

1
pyreverse -o dot -p Tivion src/

Generar el SVG a partir del DOT

1
dot -Tsvg classes_Tivion.dot > classes_Tivion.svg

Aplicar el layout mejorado

Para ello he utilizado el xsl definido aquí:

1
xsltproc notugly.xsl classes_Tivion.svg > classes_Tivion-notugly.svg

Esto mejora un poco, pero habría que editar el .dot para cambiar los estilos de cada “record”. Como prueba, he editado un par de records, cambiándoles el fondo, pero sería necesario automatizarlo, o incluso mucho mejor si pyreverse admitiera un xsl y lo generara ya con otro layout mas moderno.

El resultado es el siguiente (haz click para agrandar):

Python Class Tivion pretty layout

Python Class Tivion pretty layout

Fuentes

Pyreverse : UML Diagrams for Python

Making Graphviz output pretty with xsl

Making Graphviz output pretty with xsl (updated)

VN:F [1.9.17_1161]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)


Tivion ganador del mejor proyecto en el III Concurso Universitario de Software Libre de Castilla-La Mancha

30 04 2010

Winner cup Tivion

De nuevo buenas noticias para Tivion, tras anunciar el pasado miércoles que era finalista en el CUSL regional, la sorpresa ha sido máxima cuando he resultado ganador del mayor premio del concurso con el “Premio especial JCCM – CESLCAM – Mejor proyecto“, dotado con 1500 € en metálico.

Aparte del premio, la jornada fue muy enriquecedora ya que conocí en persona a los otros finalistas e intercambiamos muchas ideas y opiniones sobre software libre y sobre otros temas como es de suponer.

Hice nuevos amigos, conocí a mucha más gente y la asistencia de público me sorprendió bastante, ya que el aforo estaba a un 80 o 90%, que calculo que serían unas 150 personas, todas muy interesadas en los proyectos, charlas y talleres que se hicieron.

Esta es la foto de los ganadores que nos hicieron (soy el del centro, camiseta blanca con un logo negro):

CUSL regional foto de los ganadores

CUSL regional foto de los ganadores

El resto de ganadores para esta edición son:
- José María Ochotorena, Primer Premio al Proyecto más Innovador por su proyecto LUCKA.
- José Luis Segura, Primer Premio Mejor Utilidad por su proyecto ARGOS.
- Hugo Caballero, Javier Cózar y José Miguel Serrano, Segundo Premio a Mejor Utilidad por su proyecto TURMS.

Por otro lado, al resultar ganador, paso a ser finalista del CUSL a nivel nacional, en la que han participado más de 100 alumnos de 150 proyectos diferentes de todas las universidades de España y que se celebrará en la Escuela Superior de Ingeniería de la Universidad de Cádiz los días 13 y 14 de Mayo.

El resto de finalistas del IV Concurso Universitario de Software Libre a nivel nacional son:

  • Casual Services, de Daniel Martín Yerga de la Universidad de Oviedo [Blog][Código]
  • Cañafote: Redes de sensores basados en Arduino, de Álvaro Neira Ayuso de la Universidad de Sevilla [Blog][Código]
  • Curuxa, de Adrián Bulnes Parra de la Universidad de Oviedo [Blog][Código]
  • Kora, de Jose Alcalá Correa de la Universidad de Granada [Blog][Código]
  • TBO, de Daniel García Moreno de la Universidad Nacional de educación a distancia [Blog][Código]
  • Visuse, de José Luis López Pino de la Universidad de Granada [Blog][Código]
  • WikiUnix, de Noelia Sales Montes de la Universidad de Cádiz [Blog][Código]

Así mismo, se otorgarán las siguientes menciones especiales:

  • oFlute, de José Tomás Tocino García de la Universidad de Cádiz [Blog][Código]
  • Resistencia en Cádiz: 1812, de Pablo Recio Quijano de la Universidad de Cádiz [Blog][Código]
  • Tea: Tiny Environmental Analyzer, de Ricardo Cañuelo Navarro de la Universidad de Granada [Blog][Código]
  • Gexal, de Juan Santamaría Moreno y de Christian Blaya Benito del IES Villaverde de Madrid como proyecto destacado en la categoría Junior [Blog][Código]

Por último, os dejo unos vídeos de la exposición que hice y entrega de premios y las trasnsparencias y alguna documentación en pdf adicional que recopila información del proyecto (en los vídeos he cortado algún trozo donde se perdía tiempo al poner el vídeo y bajado el volumen de los aplausos).

Tivion – Exposicion CUSL CLM – Parte 1 (9 min 43 seg)

Imagen de previsualización de YouTube

Tivion – Exposicion CUSL CLM – Parte 2 (9 min 21 seg)

Imagen de previsualización de YouTube

Entrega de premios CUSL 2009-2010 Castilla – La Mancha (3 min 18 seg)

Imagen de previsualización de YouTube

Documentación

Ya os contaré que tal en Mayo, y ¡suerte al resto de finalistas!

¿Te gusta el software libre y realizas algún desarrollo en Castilla-La Mancha? Te animo a que te apuntes para el próximo año y me hagas competencia ;)

Más info en http://www.ceslcam.es/concurso/

Notas de Centro de Excelencia de Software Libre de Castilla-La Mancha en Facebook

Finalistas del IV Concurso Universitario de Software Libre

Escuela
Superior de Ingeniería de la Universidad de Cádiz
VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)