A Graphical Editor for RESTful Sensor Web networks modeling

5 downloads 130 Views 2MB Size Report
May 17, 2014 - Editor for RESTful Sensor Web Network in order to equip designers, with no expert knowledge in specific solution- domain, with a tool that ...
9th IEEE International Symposium on Applied Computational Intelligence and Informatics • May 15-17, 2014 • Timişoara, Romania

A Graphical Editor for RESTful Sensor Web Networks Modeling Vladimir Vujović*, Mirjana Maksimović*, Branko Perišić**, Vladimir Milošević** *

Faculty of Electrical Engineering, University of East Sarajevo, East Sarajevo, Bosnia and Herzegovina ** Faculty of Technical Sciences, University of Novi Sad, Novi Sad, Serbia [email protected], [email protected], [email protected], [email protected]

Abstract— Effectiveness of communication is measured by speed, ease, and accuracy in which the information can be understood. From the cognitive aspect graphical presentations are usually more effective than textual ones, especially when communication between end-users and/or domain practitioners is concerned. Model-Driven Engineering (MDE) graphical tools have become extremely popular concerning the development of applications for a large number of domains. In this paper the emphasis is put on the design and implementation of Graphical Editor for RESTful Sensor Web Network in order to equip designers, with no expert knowledge in specific solutiondomain, with a tool that would enable them to easily define tasks, specify network architecture and implement RESTful services. Based on the pilot sensor network design model, the verification, validation and proper functionality of proposed Graphical Editor are performed. I.

INTRODUCTION

Recent development in Wireless Sensor Network (WSN) technology and the use of Internet Protocol (IP) in resource constrained devices has radically changed the Internet landscape creating a new concept called Internet of Things (IoT). The IoT can be defined as a worldwide network of interconnected smart devices/objects enabled to interact and communicate among themselves and with environment by exchanging data and information “sensed” from the environment. Based on collected data smart devices react autonomously to the “real/physical world” events and influence it by running processes that trigger actions and create services with or without direct human intervention [1]. One of the most important building element of IoT is a sensor node, precisely, a Sensor Web which is traditionally defined as a Web of interconnected heterogeneous sensors that are interoperable, intelligent, dynamic, scalable and flexible. Sensor Web can often be seen as a group of interoperable web services compliant with a specific set of behaviors and sensor interfaces specifications [2]. There are two main ways to connect sensor nodes to the Internet. One way is to employ gateways, which work as converters between protocols of the Internet and custom protocols used in the WSN. The other way is an end-to-end communication using IP enabled “things” [3]. Huge amount of WSN data is produced on a daily basis, making the visualization and animation a suitable way to comprehend such an amount of data. A project-specific graphical user interface is needed to provide a complete overview of the entire system whenever required. The visualization should allow

978-1-4799-4694-5/14/$31.00 ©2014 IEEE

24 hours system monitoring and operation targeting users without sophisticated computer skills [4]. One way to simplify the programming and software development for WSN is to use specially developed dedicated WSNs programming languages. DomainSpecific Languages (DSL) helps to ease the programming by abstracting low-level details and enabling domainexperts to describe the behavior of a WSN [5]. Thus, the goal is to integrate domain experts into the WSN software development process by providing them with DSLs they may easily understand and apply. Therefore, the DSLs' concepts and concrete syntax must match the domain experts' cognitive space and intuition. Also, the domain experts should be able to test the programs they have written in the DSLs by directly executing them [6]. High-level abstraction models, based on Domain Specific Modeling – DSM, enable developers to build WSN applications using logical and physical abstraction models, task allocation as well as automation via code generation. In such way, productivity in development time can be significantly increased in comparison to manual approach, while the communication costs are usually significantly reduced [7]. The usage of metaprogramming in combination with meta-modeling technologies show that models in stream-oriented DSL, created for the simulation, can be executed on the target platform without modifications and that redundancy in the description of a DSL's operational semantics for simulation and for the target platform can be avoided [6]. The usage of DSL in designing sensor networks is not a new topic. Depending on the problem domain and the type of sensor networks, DSL can be used to design and simulate the topology [8] or for the purposes of sensing units programming [5-7]. In this paper a general objective of DSM (DomainSpecific Model) solutions and model for rapid prototyping of RESTful Sensor Web networks are presented. Using proposed DSM and graphical frameworks like Eclipse Modeling Framework (EMF) [9], Graphical Modeling Framework (GMF) [10, 11], Graphiti [12] or Sirius [13], a fully operative tool can be created. In our case, a Sirius framework is a primary choice (choosing on complexity and production time [13]). Creating a tool for graphical modeling of RESTful Sensor Web networks, a quick and easy approach for development of environmental sensing application has been achieved. Actors, who have a little or no experience in WSN programming, can easily define tasks and specify

– 61 –

V. Vujović et al. • A Graphical Editor for RESTful Sensor Web Networks Modeling

network architecture of RESTful Sensor Web networks applications. The rest of this paper is structured as follows. Section II states advantages of RESTful approach for embedding Internet in WSN and discusses concept of RESTful Sensor Web networks modeling. In section III a proposed meta-model for RESTful Sensor Web networks, as a base for creating a graphical editor, is described. The specification of the proposed framework for creating a graphical editor and example of its usage is given in Section IV. Section V concludes the paper and states the roadmap for evaluation and other issues of future work. II.

CONCEPT OF RESTFUL SENSOR WEB NETWORKS

Sensor Web Enablement concept assumes that all sensors are: connected to the Web, reporting their positions, possessing registered meta-data and allow remote read or control. Hence, the stated objectives are to: • make all kinds of sensors: discoverable, accessible and controllable via the www, • create the framework for a www-based sensor web and • introduce the foundation for “plug-and-play” webbased sensor networks. Thus, the capacity to discover and integrate observations (measurements) from any sensor according to end user needs, independent of its origin, is the main objective of the Sensor Web Enablement. As Sensor Web can be represented as a set of web services it is necessary to find appropriate methods for its implementation. Choosing service interaction style is a major architectural decision for designers and developers, because of its influences to the underlying Web service solutions implementation constraints. Although SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) are both contemporary implementation practice for Web services building, they differ in the manner they process data. REST is a design principle for Web-based applications that closely adheres to client-server architecture and advocates using bare minimum HTTP methods. It is an architectural model for building the distributed applications based on three distinct concepts: representation, state, and transfer. When compared to SOAP, REST has the following advantages: it doesn’t require expensive tools for interaction with the Web service, it is easier to learn, uses shorter message formats, doesn’t require extensive processing and is closer to other Web technologies concerning design philosophy. RESTful Web services are good option for making sensors a part of Web, because of its lighter nature that is an extra advantage for resources constrained environments. Thus, REST, pointing to low complexity and easy integration with the Web, is a good candidate to embed Internet in WSN [14-16]. Considering advantages of REST it is possible to state that, by taking RESTful services as “the backbone” of the system and relying on sensor network elements as resources, it is possible to design the information system that would meet the majority of WSN system demands.

Sensor networks can rarely be seen as homogeneous independent entities. They are usually part of complex environments and software systems designed for monitoring and data processing. Concerning Sensor Web elements the environment is the whole Internet. The problem with sensor networks design is how to quickly and efficiently produce a complete information system that is able to: monitor, send and process data from a sensor network. A significant factor behind the difficulty of developing complex software is the wide conceptual gap between the problem and the implementation domains of discourse. This gap can be reduced using Model-Driven Engineering (MDE) [17]. The key fact for MDE software development is that system is a model consistent with its meta-model [18, 19]. That model is the link between the problem domain and solution domain, and meta-model represents an abstract model of the system that describes the most common definition of the model. MDE approach relies on modeling languages which are usually divided into two large groups: - Domain-Specific Languages (DSLs) – Languages usually designed with a specific purpose. By using DSL language, the problem domain is considerably simplified and consequently its solution too. They are usually developed for problems which need to be described in a specific domain. - General-Purpose Modeling Languages (GPLs) – The languages, usually with the extensible syntax, that are designed for a wide range of domains and modeling purposes. Unlike DSL, Domain-Specific Modeling (DSM) use models to describe the individual components of the domain system. Models are often based on a graphical representation and supported by graphical design tools. DSM tool enables user to create domain models, and usually, based on created models, generate a certain part of code. The key benefits of Model-driven approaches are: increased developer productivity, decreased cost (in time and money) of software construction, improved software reusability and the higher level of software maintainability [18]. Using models and tools for sensor networks design, whether they consist graphical representations, textual specifications, or both, makes the design process much easier, while the emphasis shifts to the design of networks themselves. III.

A DSM OF RESTFUL SENSOR WEB NETWORK

In the previous section a concept and meaningful of RESTful Sensor Web networks is described. In order to develop a DSM enabling RESTful Sensor Web network design, it is necessary to closely relate two areas, a RESTful modeling (because all resource must be available and managed over the Internet) and WSN network modeling (because a building element is a sensor element). The infrastructure diagram is presented in Fig. 1. There are three basic parts of the proposed RESTful Sensor Web infrastructure:

– 62 –

9th IEEE International Symposium on Applied Computational Intelligence and Informatics • May 15-17, 2014 • Timişoara, Romania

Figure 1. RESTful Sensor Web Infrastructure Diagram

- The client side (clients that access to RESTful Sensor Web network), - The RESTful services (implementation of the RESTful services), - The Sensor Web nodes (Sensor Web nodes accessed by referencing a single IP address). A system’s structural meta-model, presented in Fig. 2, is created using EMF Ecore [20] based on the problem domain described in Fig. 1. Meta-model, presented in Fig. 2, relies on Jersey JAX-RS framework [21] and is used for creation of RESTful service in Java. It is important to note that presented meta-model of system is a prototype without certain elements (like the database on the server side). Using a Jersey JAX-RS concepts, the model has built in a required enumeration and data types,

which support a creating a RESTful services. The rest of meta-model gives a structure, which produce a base element for creating a RESTful services, except GatewayNode, SensorNode and Sensor object, which are used for creating a WSN networks. Service, like a root object, represents a logical meaning of RESTful Sensor Web, and has awareness of all building elements, in this case: a RESTful ServiceClass, a GatewayNode and SensorNode. In order to apply the proposed meta-model, a Graphical Editor, as a stand-alone application, or a part of Eclipse IDE, has to be created. The basic characteristics of Graphical Editor for a RESTful Sensor Web network are presented in following section.

Figure 2. Ecore meta-model of RESTful SensorWeb Service

– 63 –

V. Vujović et al. • A Graphical Editor for RESTful Sensor Web Networks Modeling

IV.

A GRAPHICAL EDITOR OF RESTFUL SENSOR WEB NETWORK

Graphical Model-Driven Engineering (MDE) tools have become extremely popular concerning the development of applications for a large number of domains from natural language processing to computer vision in bioinformatics. Using a graphical model, which is a popular and well-studied framework for compact representation of a joint probability distribution over a large number of interdependent variables [22], facilitates better understanding of a problem-domains. A wide range of frameworks supports development of MDE tools for Eclipse, and their usage depends on problem type. EMF provides an object graph for representing models, as well as capabilities for (de)serializing models in a number of formats, checking constraints, and generating various types of tree editors for use in Eclipse. The Graphical Editor Framework (GEF) and Draw2D provide the foundations for building graphical views for EMF and other models types [23]. The Graphical Modeling Framework (GMF), by encapsulating GEF and Draw2D, provides a tool for creating graphical editor with a high degree of flexibility. Creation of editor in GMF is often complex and highly depends on Java, XML and Eclipse plug-in knowledge. By using Graphiti framework, that hides GEF's complexities from the developer and bridges EMF and GEF to ease and speed up the development of graphical editors, it is possible to design homogeneous graphical editors that visualize an underlying Domain Model based on a tool-defined graphical notation [12]. Further on, using a Sirius framework which encapsulate a GMF, simplifies the product and reduces design time and rapidly increases the overall productivity [13] (Fig. 3). Provided with the right configuration file, called a Viewpoint Specification Model (VSM), which describes the structure, appearance and behavior, Sirius can represent any model compatible with EMF (a meta-model description of problem-domain).

Figure 3. Hierarchy of Graphical Model-Driven Engineering tools

The Sirius is lying on five main concepts stored under the VSM [24]: - viewpoint – a core element which is a logical set of representation specifications and representation extension specifications; - representation – is a group of graphical construction which represent domain data. It also describes the structure, appearance and behavior of

models. There are four representations (dialects) available: diagrams, tables, matrices and trees; - mapping – identifies a sub-set of the semantic model’s element that should appear in a representation and indicates how they should be represented. It strongly depends of dialect; - style – is used to configure the visual appearance of the elements; - tool – describe behaviors mapping. A VSM in Sirius is presented with *.odesign files, which contains all described elements. It is possible to define more than one VSM element, also as more than one viewpoint. Using different viewpoints, it is possible to see a model from several perspectives depending on user needs. In Fig. 4 a VSM *.odesign describing a proposed RESTful Sensor Web Network, are presented as opened in Viewpoint Specification Editor.

Figure 4. RESTful Sensor Web Network VSM opened in Viewpoint Specification Editor

The VSM components usually require “language description” to provide interpreted expressions that will, evaluate at runtime, express the domain and representations dependent behavior [24]. To define expressions, Sirius uses Acceleo [25] as recommended language. By using a Java class and Acceleo queries, defined in .mtl files, Sirius supports customization according to the particular user needs. Considering that Sirius encapsulates GMF, user can customize the program code on GMF level too. However, this is an advanced feature, because user must have a deep knowledge of GMF. A modeling workbench, created with Sirius, is composed of set of Eclipse editors (diagrams, tables and trees) that enable users to create, edit and visualize EMF models. In the rest of this paper, the usage of Graphical Editor, developed with Sirius framework, and the process of an example of RESTful Sensor Web network creation, are presented (See the Fig. 5). A graphical editor, developed by Sirius, contains editor (place where is presented a diagram), and several views (element which presents properties and tools of model).

– 64 –

9th IEEE International Symposium on Applied Computational Intelligence and Informatics • May 15-17, 2014 • Timişoara, Romania

Figure 5. A Graphical Editor for RESTful Sensor Web Network

In Fig. 5 a standard layout of editor is presented. A base editor view contains: • Model Explorer – presents all projects, packages, and model elements, • Outline – presents a thumbnail of editor with layout navigation, • Properties – field of model property. A dynamic table based view, which depends on meta-model properties, and editor or model explorer selected elements. An Editor is split in two sections: canvas – for presenting and editing diagram and tool palette – where are the tools for drawing and editing model. In proposed Graphical editor for RESTful Sensor Web networks, a tool palette is split in three sections, a Network tool, REST Services, and Parameters. In first version of editor, a connection is not included, and relations between objects are set automatically or depending on property view. According to the user needs, it is possible to use a standard EMF editor for diagram elements manipulation. The synchronization with Eclipse environment is provided by default. The RESTful Sensor Web networks editor, depending on meta-model, visualizes three elements: • node – object which doesn't have sub-objects, and only references or calls different objects (object like GatewayNode); • container – element which has a sub-objects. In meta-model there are two main objects which have sub-objects and act like container. That is a SensorNode object, made by one or more sensors, a ServiceClass, made by one or more Methods, etc.; • relation – element that visualizes a relation between two objects. A relation represents calls from method to gateway or sensor nodes, and

includes gateway node and sub-networks or sensor nodes. A component layout and relation routing is done by default Sirius layout manager, and can be easily customized if needed. A user can manipulate with subelements via Popup Bars, associated with a corresponding tool that can be executed in context of selected element. This features, speed up the creation and design process, and produce a hierarchy of objects in a diagram, (SensorNode and ServiceClass object). Using layered diagram in a Gateway, Method and Variable stage, user can easily hide or show elements contained in diagrams. This feature is particularly useful in case of a high density diagrams. A Validation of model is possible by two built in model validation mechanisms. First relies on Sirius Validate diagram, using meta-model rules for validation of created model. The second one, visual mechanism, is based on diagram element style changing (If data is missing, elements change their foreground color, indicating that data is missing). V.

CONCLUSION

The usage of graphical editors in WSN design is not a new topic but the approaches to problem solving are highly depending on problem domain. The work presented in this paper confirms that certain number of steps must be performed in order to create a domain specific Graphical Editor. The main step is to build a domain specific model which describes a specific problem domain. Next step is to find appropriate graphical framework for building Graphical Editor based on domain specific model. In our case the primary choice is Sirius framework, which provides a software solution in architecture and design and it’s used as a base upon novel proposed Graphical Editor is built.

– 65 –

V. Vujović et al. • A Graphical Editor for RESTful Sensor Web Networks Modeling

The basic strengths of the Sirius platform are: • the foundation on an open and widely used industry standard - EMF; • adaptability to any EMF-compatible DSM; • a strong separation between semantic and representation models; • the support for different representations of domain models; • easy to use and rapid development; • The high level of extensibility. Fig. 4 and 5 show results of Graphical Editor development for particular application in domain of RESTful Sensor Web networks modeling. By using Graphical Editor it is possible to encapsulate implementation information and, at the same time, retain the ability to easily control the RESTful Sensor Web Network creation. The created Graphical Editor for RESTful Sensor Web Network enables designers, with no expert knowledge in specific problem-domain, to implement RESTful services easily. Based on a viewpoint approach, using the Sirius, it's possible to equip teams with a set of appropriate tools to deal with complex architectures on specific domains. Upgrading Graphical Editor with partially automated code generator a complete solution for creating and designing information systems that manage Sensor Web networks, based on RESTful services, may be obtained. Future work will be focused on the meta-model extension with Jersey 2.x specification, improvements of created Graphical Editor for a given meta-model and an automatic code generator for creating partial or full RESTful Sensor Web network.

[2]

[3] [4]

[5] [6]

[8]

[9]

[10]

[11]

[12]

[13]

[14] [15]

[16] [17] [18]

REFERENCES [1]

[7]

Internet of Things, "European Research Cluster on the Internet of Things", [Online]. Available: http://www.internet-of-things-research.eu/about_iot.htm L. Di, “Geospatial Sensor Web and Self-adaptive Earth Predictive Systems (SEPS),” Proceedings of the Earth Science Technology Office (ESTO)/Advanced Information System Technology (AIST) Sensor Web Principal Investigator (PI) Meeting, San Diego, USA 2007 D. Yazar, "RESTful Wireless Sensor Networks Domain", Master Thesis, Uppsala Universitet, 2009 V. Vujovic, I. Perisic, M. Maksimovic and I. Kekeljevic, “The role of visualization in Building Management Systems,” International Conference on Applied Internet and Information Technologies, pp. 102-107, Zrenjanin, Serbia, 2013 D. A. Sadilek, “Domain-Specific Languages for Wireless Sensor Networks,” Doctoral symposium of the Modellierung conference © Gesellschaft für Informatik, 2008 D. A. Sadilek, “Prototyping Domain-Specific Languages for Wireless Sensor Networks,” ATEM'07: 4th International Workshop on Software Language Engineering, 2007

[19] [20] [21] [22] [23]

[24] [25]

– 66 –

M. Fajar, K. Hisazumi, T. Nakanishi and A. Fukuda, “Applying Domain Specific Modelling for Enviromental Sensing Using Wireless Sensor Network,” Asian Journal of Information Technology 10(7): 296-305, 2011 T. Camilo, J. S. Silva, A. Rodrigues and F. Boavida, “GENSEN: A Topology Generator for Real Wireless Sensor Networks Deployment”, SEUS, Vol. 4761 of Lecture Notes in Computer Science, Springer, pp. 436-445, 2007 C. Seidl, "The Eclipse Modeling Framework (EMF) - A Practical Introduction and Technology Overview, Visual and Interactive Cyber-Physical Systems Control and Integration", Technische Universitat Dresden, 2013 M. Herrmannsdoerfer, D. Ratiu and G. Wachsmuth, “Language Evolution in Practice: The History of GMF”, SLE'09 Proceedings of the Second international conference on Software Language Engineering, pp.3-22, Springer-Verlag Berlin, Heidelberg ©2010 G. Taentzer, A. Crema, R. Schmutzler and C. Ermel, “Generating Domain-Specific Model Editors with Complex Editing Commands”, In: Schurr, A., Nagl, M., Zundorf, A. (eds.) AGTIVE 2007. LNCS, vol. 5088. Springer, Heidelberg, 2008 C. Brand, M. Gorning, T. Kaiser, J. Pasch and M. Wenz, “Graphiti - Development of High-Quality Graphical Model Editors,” Eclipse Magazine, [Online]. Available: http://www.eclipse.org/graphiti/documentation/files/EclipseMagaz ineGraphiti.pdf E. Juliot and J. Benois, “Viewpoints creation using Obeo Designer or how to build Eclipse DSM without being an expert developer?”, Obeo Designer Whitepaper, 2010, [Online]. Available: http://www.obeo.fr R. Raj, SOAP and REST, [Online]. Available: http://www.ics.uci.edu/~cs237/ A. Ludovici and A. Calveras, “Integration of Wireless Sensor Networks in IP-based networks trough Web Services”, Proceedings of 4th Symposium of Ubiquitous Computing and Ambient Intelligence, Valencia, Spain, 2010 M. Rouached, S. Baccar and M. Abid, “RESTful Sensor Web Enablement Services for Wireless Sensor Networks”, IEEE Eighth World Congress on Services, pp. 65-72, 2012 R. France and B. Rumpe, “Model-driven Development of Complex Software: A Research Roadmap”, Future of Software Engineering, pp. 37-54, 2007 S. W. Liddle, “Model-Driven Software Development”, June 2010. [Online]. Available: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.172.599 5&rep=rep1&type=pdf M. Brambilla, J. Cabot and M. Wimmer, Model-Driven Software Engineering in Practice, Morgan & Claypool publishers, 2012 F. Budinsky, D. Steinberg, E. Merks, R. Ellersick and T. J. Grose, Eclipse Modeling Framework: A Developer's Guide, Addison Wesley, 2003 Jersey JAX-RS framework, Available: https://jersey.java.net/ A. Deshpande, L. Getoor and P. Sen, Managing and Mining Uncertain Data: Chapter 1- Graphical models for uncertain data, Springer 2009 J. White, D. C. Schmidt, A. Nechypurenko and E. Wuchner, “Introduction to the Generic Eclipse Modeling System, Developing a Graphical Modeling Tool for Eclipse,” Eclipse Magazine, Vol. 6, Januar 2007 Sirius Documentation, [Online]. Available: http://www.eclipse.org/sirius/doc/ Acceleo, [Online]. Available: http://www.eclipse.org/acceleo/

Suggest Documents