Controlling and Monitoring Specific Hardware Resources

Within an agile approach, a RIA application for controlling and monitoring specific hardware will be proposed. It is always a challenge to choose the suitable technologies and IT frameworks to transform the PIM model into the PSM model of the future RIA and after that to implement the prototype. The main technological aspects are presented; the approach makes direct referees to the developed tiers of the RIA prototype.


Introduction
Rich Internet Applications (RIAs) is an umbrella term for various applications that are combining "the media-rich power of the traditional desktop with the deployment and content-rich nature of web applications" [1].According to Gartner, RIA frameworks can be divided in JavaScript/AJAX-based frameworks and plugin-based frameworks.The first ones are browser-based and more lightweight, the second ones are more heavyweight with a bigger download footprint (Valdez, 2009;Busch & Koch, 2009).Plugin-based frameworks like Adobe Flex, JavaFX and Microsoft Silverlight, offer extended support for media, are highly interactive, cross-platform, cross-device, cross-browser and desktop-like with offline and out-off-browser support [8].A typical RIA application has a multi-tier architecture, based on data integration layer, business logic & services layer and presentation layer.Taking into consideration the new client-side capacities, the new presentation features, and the different communication flows between the client and the server, the following four phases in designing RIA applications are necessary:  data model design,  business logic & services design,  presentation design, and  communication design [12].Communication is a cross-cutting concern related to data synchronization, business logic & services distribution and presentation.The communication must provide the binding between the presentation and the underlying data/business logic & services layers using synchronous/ asynchronous methods.Best practices in RIA development enrich the general design considerations with specific design issues depending on the requirements and the technologies used for implementation.With respect to the general architecture of a RIA application (Figure 1), a prototype for controlling and monitoring specific hardware resources was developed.The demarche was developed within an Adobe Flex framework, a just-in-time deployment model being employed.

Agile Approach for Developing the RIA Prototype
Based on the author's results obtained in the agile development of portals [10], [11], the demarche was applied for developing the proposed RIA application.The main functionalities of the RIA application for controlling and monitoring specific hardware resources are described by the use cases diagram (Figure 2).The agile development framework proposed in [10], [11]    Both PIM and PSM models were described with the help of the UML language, al kind of specific diagrams being developed.The advantage of using UML modeling language is obvious [6], [7], and in RIA development   3.The access mechanism used to access the data layer from the above layers is DAO (Data Access Object).The DAO pattern is a widely accepted mechanism to abstract away the details of persistence in an application, including in the proposed RIA prototype.The idea is that instead of having the business layer and/or service layer communicate directly with the database (Figure 3), file system, or whatever persistence mechanism the application uses, the business layer speaks to a DAO layer instead (Figure 4).

Java. Multithreaded Programming and the Servlet Technology
Java is pure OOP language and provides integrated support for multithreaded programming [2], [5].Java supports cross-platform code through the use of Java bytecode, that can be interpreted on any platform by JVM.Implementing the business & services model of the RIA prototype involves creating classes (Figure 5), creating objects from those classes, and developing executable program(s) for the considered functionalities that use those objects [9].Monitoring the specific hardware resources, meaning reading temperature, voltage, video sensors values, inputs and outputs has been implemented by using multithreaded programming.A multi-threaded program contains two or more parts that can run concurrently and each part can handle different task at the same time making optimal use of the available resources especially when your computer has multiple CPUs.Below

Adobe Flex Framework
Interactivity, responsiveness and richness are three general characteristics of RIAs.Adobe Flex provides development tools, user interface and connectivity components that simplify the development of RIA applications (Figure 6).Common used for implementing the presentation layer, the flex framework manages a good communication with the underlying layers of business logic & services [4].Fig. 6.Adobe Flex framework [15] Flex can dynamically change views and send and retrieve data asynchronously to the server in the background, updating but never leaving the single application interface (similar to the functionality provided by the XMLHttpRequest API with JavaScript).The Flex framework has three remote procedure call APIs that communicate with the server over HTTP: HTTPService, WebService, and RemoteObject.Best practices in building Flex and Java client-server applications make substantial referees to Blade DS or LiveCycle Data Services (Figure 7).The second main functionality, changing the sensors' configuration and properties, allows to adapt these devices in order to optimize the controlling process (Figure 10).When necessary, it is possible to change the outputs values (Figure 11).
Managing user accounts, the fourth mentioned functionality is viable for the application administrator, that is responsible for creating accounts and controlling the user access to the system.DOI: 10.12948/issn14531305/20.4.2016.02Practically, the final version of the RIA prototype is obtained by an iterative process which regards the adjustment of the PSM, its implementation and the testing of the prototype solutions for verifying the imposed requirements.
The validation of the prototype leads to the application installation and its transfer to the users [11].The implementation demarche is based on the following technologies: SQlite and DAO, Java multithreaded programming and the servlet technology, Apache Tomcat and Adobe Flex framework.In paragraph 3, the main technological aspects are presented; the approach makes direct referees to the developed tiers.Finally, some controlling and monitoring screens have been exemplified.

1 DOI: 10 .
12948/issn14531305/20.4.2016.02regarding the IT infrastructure, which must sustain the unitary, integrating vision of the PIM model; the building of the PSM model will take into account the future implementation solution of the RIA, by relating the model to certain developing technologies and frameworks;  I.T.I (Implementing -Testing-Installation) phase has the goal to implement the RIA prototype according to the PSM model, followed by the testing of the prototype; often, as a result of testing its functionality, the prototype invalidation leads to the revision of the PSM model and aims at correcting some aspects related to technologies and implementing frameworks.With respect to the RIA general architecture, the PIM and further the corresponding PSM models have been elaborated: model for data layer; model for business & services layer; model for presentation layer; model for communication schema; model for security schema; model for general management and maintenance of the RIA application.

Fig. 1 .
Fig.1.RIA general architecture[14] approaches consolidates the agile development desiderata.Functionalities like  reading temperature, voltage, video sensors values, inputs and outputs,  changing the sensors' configuration and properties,  changing the current outputs values, and  managing user accounts (Figure 2) are sustained both by PIM and further by PSM models with concrete implementations within the multi -tier architecture of the RIA.It is always a challenge to choose the suitable technologies and IT frameworks to transform the PIM model into the PSM model of the DOI: 10.12948/issn14531305/20.4.2016.02future RIA and after that to implement the prototype.For implementation of the RIA prototype the following technologies and frameworks have been used: Java, Adobe Flex, Adobe BlazeDS, Apache Tomcat, Servlet technology and SQLite.

Fig. 10 .Fig. 11 .
Fig. 10.Modification of the temperature sensor's characteristics is the code for monitoring temperature, by reading the sensor values (Code sequence 2).

Some User Views for Controlling and Monitoring Specific Hardware Resources
One of the main functionalities of the proposed RIA prototype is reading the temperature, voltage, video sensors values, inputs and outputs.It is an ongoing process, the values being stored into the database and concomitant displayed in different screens (Figure8, 9).