Web Based Me-Centric Resource Management ...

4 downloads 55 Views 479KB Size Report
This paper presents a design and implementation of a web-based ... Using web, resources are identified by URI and can be ... D. Seo, S.C. Ahn, and H. Ko.
Web Based Me-Centric Resource Management System for Pervasive Environment Daeil Seo1, Sang Chul Ahn1, and Heedong Ko1,2 1

Department of HCI and Robotics, University of Science and Technology Daejeon, South Korea 2 Imaging Media Research Center, Korea Institute of Science and Technology Seoul, South Korea {xdesktop,prime,ko}@imrc.kist.re.kr

Abstract. This paper presents a design and implementation of a web-based scalable me-centric resource management platform to support pervasive applications. The proposed system, LinkMe, builds me-centric overlay network, a private network of resources, for managing devices located in the user’s situated environment, as permitted resources. A resource may be atomic or a set of fine-grained resources. By this resource hierarchy, pervasive applications can choose a variety of resources combinations based tasks situated in the physical environment. Using web, resources are identified by URI and can be manipulated using HTTP verbs. Pervasive application can access resources using a set of RESTful APIs. To reduce technical barrier, developers can choose proper resources using URI and build a pervasive application easily based on web technologies such as HTML5, CSS and JavaScript. Keywords: Me-centric, Resource management system, Pervasive, Resource decomposition, Web technology, URI, HTML5, CSS, JavaScript.

1

Introduction

Recently, embedded devices are in wide spread use in our environment and most people use a smartphone with sensors, and other wearable smart devices. These devices can collect information about our situated environment to help pervasive systems for understanding user context more efficiently. A device has a lot of features and can perform a variety of roles depending on situation. However, these smart devices can provide their own predefined services but they are hard to interoperate among themselves and even harder to compose their functionalities. If a pervasive system provides a simple way to access features in the device and to compose them from various devices, we can use available resources in situated environment more efficiently. For example, we bind volume buttons of the smartphone to control a HVAC system for increasing and decreasing temperature in the accustomed way. For this reason, we need a more sophisticated resource management system and their interaction model. N. Streitz and C. Stephanidis (Eds.): DAPI/HCII 2013, LNCS 8028, pp. 154–162, 2013. © Springer-Verlag Berlin Heidelberg 2013

Web Based Me-Centric Resource Management System

155

Another problem is that typical pervasive systems do not scale well for different situation because these systems provide many different communication approach including RMI, CORBA, and SOA, making pervasive applications difficult and time consuming for developers to implement. The Web is raising alternative methodology. R. Fielding [1] proposed REST architectural style, developed as an abstract model of the Web. The Web provides uniform interface and loosely coupled architecture, we can benefit scalable and load balancing, and searching. Web of Things [2] proposed REST based approach for integrating real-world devices to the Web. Using the Web, developers make a pervasive application likes a web application and even a web page. We developed the LinkMe as web based me-centric resources management system. By linking between resources and me, LinkMe provides me-centric overlay network, a private network of resources that the user can access. Also, the system supports granularity for fine-grained resource addressability. The user can decompose a resource or combine any physical and virtual resources to declare a new virtual resource. The declaration of the new virtual resource is described by HTML or JSON. A resource is identified by URI and addressed by URL. LinkMe follows REST architecture that provides an interface for accessing many resources of the device in a uniform way. The proposed system adopts a resources-oriented architecture and supports a set of RESTful APIs. Developers also write pervasive applications as web applications using familiar languages such as HTML5, CSS and JavaScript. The rest of this paper is structured as follows. Next, we present related work in Section 2. In Section 3, we introduce system design and the next section we shows our prototype implementation. Finally, we conclude with a summary and outlook on future work in Section 5.

2

Related Work

This section gives an overview of related projects and technologies. The HP Cooltown [3] project aimed to provide an infrastructure for nomadic computing and focused on extending web technology. In this project, devices, people, and things have a web-presence identified by a URI. Gaia [4] is aiming for providing user-centric, resource-aware, multi-device, context-sensitive mobile services in active spaces. The Context File System in Gaia project builds a virtual directory structure based on context predicates and manages storages infrastructure’s view. Service oriented architectures (SOA) [5] can be used as base in order to realize suitable frameworks to develop pervasive applications. Web of Things [2] integrates real-world devices to the Web and applies REST principles to embedded devices. Previous pervasive system considers only the environment around user except user already owned and permitted resources. Also, these systems except Web of Things used CORBA [4] or SOAP for management and communication. There are many web-based approach for accessing devices. They define a set of APIs using JavaScript and write application using HTML5, JavaScript, and CSS.

156

D. Seo, S.C. Ahn, and H. Ko

Webinos [6] is a cross-device distributed middleware for web applications and widgets. It provides APIs for accessing device features and communication with others. Webinos is based the concept of personal zones, the set of all their devices. LG Open webOS [7] is web-centric platforms and applications can be written using either the Mojo or Enyo framework. PhoneGap [8] is platform-independent framework with a runtime providing standard APIs. The W3C Device APIs Working Group [9] is currently developing client-side device APIs. These approaches allow non-expert users to create or modify a web application using device feature easily. However, they concern only local resource. To manage all the resources that are available to the user, the proposed system builds me-centric resource overlay for user's point of view and manages web-enabled resources using HTTP method and URI. This system treats a resource as an atomic resource or as a set of the atomic resources and provides declaration methodology for giving resource granularity using web technologies.

3

System Design

In this section, we introduce our system design and a prototype implementation. 3.1

Architecture and Concept

In this section, we introduce our system design and a prototype implementation. We developed the LinkMe as a me-centric resources management system for pervasive environment based on web technologies. The proposed system builds me-centric overlay network and offers the Single Sign-On (SSO) service for communication among resources. LinkMe Server is a primary component and is responsible for managing resources that the user has an authority to access them even if they are connected different networks. It manages user information that contains a profile and accounts of services. Also, it considers social relations of the user and devices that are owned and shared to the user depending on user context. The proposed system deals with resources such as user information, social relations and devices; however, in this paper, we focus on management of device resources. Fig.1 depicts an example of pervasive environment around the user and resource trees of LinkMe. The resource tree shows available resources and their hierarchal relations. Fig.1 (b) shows resources in the office. All the resources in the office are registered on the LinkMe and the system is in charged of managing resources in the place and permission that who has an authority to access a resource. In Fig.1 (c) depicts resources on user’s perspective. The LinkMe of the user performs role management of owned and shared resources. A user’s smartphone connected telephone network and a printer are shared devices for family members. A computer is located near the user in pervasive environment and connected to a local network. Resources are shown in resource tree because the user can access them.

Web Based Me-Centric Resource Management System

157

Fig. 1. Overview of LinkMe

For interacting with the resources, we first find resources and register them to the system. Discovery is a prrocedure for retrieving information of resources. Loocal discovery technologies such h as UPnP, Multicast DNS are good solution because a lot of devices already implem ment these protocols and provides interaction method for services; however, interoperation among protocols is a big problem. We only use these protocols for discoveery, and hide communication between LinkMe Server and resources. The user only uses http protocol to request and response a message frrom resources. LinkMe Server acts like traditional web server and addressed by U URI. URIs are identifiers of all th he resources in LinkMe. When a web browser visits a U URI of a resource, LinkMe resp ponses status information of the resource using web paage. For this interaction, we ch hoose REST architecture, resource-oriented architectuure, because HTTP protocol co orrectly used following the principles. REST supports the set of operations for the web b services using HTTP methods. It is important to colleect and understand user and environment context frrom resource status. To receive event notification and feed from resources, we choose ttwo kinds of method such as Server-Sent Events (SSE) [10] and Atom [11]. SSE is an A API for opening an HTTP connection for receiving push notifications from a server in the form of DOM events, and is useful for sending message updates or continuous ddata streams to a browser. Thee role of SSE on LinkMe is processing events occurrred frequently, for example, bu utton press events. Atom Syndication Format is an XM ML language used for web feed ds. Atom feeds can be based on simple GET operations and

158

D. Seo, S.C. Ahn, and H. Ko

contains summaries of events from a resource. Using these web technologies, pervasive application developers also write pervasive applications like as web applications using familiar language such as HTML5, CSS and JavaScript. Pervasive applications are able to use all the resources on the web following communication methodology of traditional a web server and client. 3.2

Redesign Resource

For taking many advantages, we apply web technologies on implementing the proposed system. The main advantage of web architecture is that there is now a de facto universal identification scheme for accessing networked resources. Because all resources are identified and addressed by URIs, assigning URI is important for managing resources. URI Template [12] provides a mechanism for assigning similar resources URIs and its variable parts can be easily identified and described. The notation of LinkMe URI is given in Table 1. LinkMe URI consists of three parts. The first part is an identifier of LinkMe Server and next part is entity identifier defined by URI Template and which notation rule is related on resource type. The user authority is decided depending user context. If the user owns a resource, access-type of resource is owned. When the resource is shared to the user, access-type is a place that resources are located in. Last is only an optional part represented resource granularity. The system supports decomposition of the device and the user can define a virtual resource in the device. The virtual resource is assigning the URI depending on hierarchal relations of the parent device. Table 1. LinkMe URI Notation Resource Me Device Person Group

URI Notation /me /devices/{access-type}/{resourcetype}/{resource-id} /people/person/{person-id} /people/groups/{groupid}/{person-id}

Example URI http://alice.linkedme.org/me http://alice.linkedme.org/devices/own /pc/uuid-1234 http://alice.linkedme.org/people/perso ns/bob http://alice.linkedme.org/people/grou ps/friends/bob

To declare granularity of a resource, we apply web technology. In the Web, browsers and servers do content negotiation, a mechanism to serve different representation of a resource at the same URI. HTML and JSON are typical representation of resources in the Web. HTML document is rendering resources on the web page and JSON is lightweight data-interchange format. We use HTML and JSON for declaring hierarchical relation on a device. Fig. 2 depicts an example that declares a television that is decomposed into four resources. HTML body is consists of three sections and the section is defined by HTML div tag and CSS class. The HTML document has a CSS link that is describing the presentation semantics for section. First is general information of a resource such as name, description. Next is resource granularity that the user declares a resource hierarchy and a new virtual

Web Based Me-Centric Resource Management System

159

resource. URI of new resources are assigning based on a physical resource. T The anchor tag defines a hyperlink, which is used to link from one page to another, and indicates the link’s destinattion. Rel attribute of anchor tag can specify the relationsship between the current documeent and the linked document. For resource composition, we use a rel attribute to point an origin URI of the resource. We can add a usage to the anchor tag for hierarchical relation using this notation. As a result, a resource haas a self-description through weeb page. HTTP method for interaction with the resourcce is followed. The resources on n the LinkMe are RESTful and can be manipulated ussing HTTP verbs such as OPTIION, PUT, GET, POST and DELETE. Fig. 2 (b) shoows JSON example that is an nother representation of the resource. Attributes of the resource are key-value notaation, and decomposed resources and available methods are list-value.

Fig. 2. Declaration of Hierarchical Relation

4

Prototype Impleementation

To demonstrate the feasib bility of our proposed system, we develop a pervassive application using the LinkM Me. We use JavaScript for a programming logic and builld a UI of application with HTM ML5 and CSS. First scenario is a tour application. a The user has a smartphone and takes a pictture with it; however, its storaage is limited and does not support sharing method. To overcome this problem, th he user uses social services that serve cloud storagges. Nevertheless, these servicees are also limited storage and need a payment. If the uuser has storage and it is linkeed to LinkMe, the smartphone is able to connect to the storage by LinkMe. The usser is able to full capacity of the storage and does not nneed any cost to use. The appliication assigns storage URI for storing a picture and the smartphone sends a picture to the URI using HTTP method. If the applicattion subscribes an event, LinkM Me acts like as proxy and relays an event to resource. Attom gives summaries of uploadiing photos to the storage from the smartphone.

160

D. Seo, S.C. Ahn, and H. Ko

Fig. 3. Overview of Prototype Application

Second scenario shows resource granularity. The application receives a key prress event from a variety of inp puts and sends the event to the connected outputs. All the appliances are permitted to o the user and LinkMe assigned URIs to resources. Now, the application can identify y resources by given URIs and interact among them ussing HTTP methods. The appliccation gets resource presence to request a given URI. T The user of the application selects a resource to affect a key press event from inputs. T The event is interpreted by the resource that receive the event. When the user pressedd an up button and a volume of television is a target, the volume is increased. If a targeet is luminance of a light, the lu uminance is increased. The affect of the event is dependding on the target resource. Thee application delivers the event from inputs to the tarrget resource. Fig. 3 depicts ov verview of application design. It is detailed descriptionn of communication between the LinkMe and resources. LinkMe Server receives a HT TTP request from the application n and sends a message, predefined by the resource suchh as UPnP, JSON-RPC, to the resource. The resource processes a request message and responses the result to Link kMe Server. LinkMe Server sends a HTTP response to the application. For pushing ev vent from resources to application such as key press event, we choose SSE that pushes events to the application. Other application is a virtual movie player that is an example of resouurce composition. In Fig.1, we already depict an example of pervasive environmentt. A screen, television and moniitor of a computer can display a movie. Speakers beside the screen, television, and speaakers of a computer are able to output sound of the movie. The user chooses an input source to play and watches it using the best resources tthat are allowed to the user. To o satisfy these requirements, we design a new resourcee, a movie player. This virtual resource r is configurable and is able to provide fine-graiined addressability. We choose a resource for display, sound player, and input source. T The movie player has candidatee set of available resources and the application choosees a resource among a set of reesources depending on user and environment context. T The user is able to choose an in nput sources such as a file in the storage of a computerr or the television. If the user is alone in the place, the application chooses the screeen, speaker, and projector becaause there are the best playing the movie. When the uuser uses a computer and otherr persons exist in the same place, the application seleects

Web Based Me-Centric Resource Management System

161

proper resources as compo onent of the computer for playing movie not to distturb others. Fig.4 depicts compo onents of a virtual movie player and resource declaratiion. URIs also identifies a virtuaal resource and components of it. The resources in the nnew one have another URI becaause they are already registered and assigned URIs on the system. The application in nteracts to the virtual resource likes as physical resouurce using HTTP method. When n the application sends a request to the URI of componeents in the virtual resource, the system send a message to the origin URI and return the response to the application.

Fig. 4. 4 Virtual Resource Declaration Example

Using web architecture, the application uses unified interface. When resources are increased in the environm ment, we just add a declarative description of resourcces. Changing of environment does d not influence the application. By example, we claarify that our proposed system iss useful in pervasive environment, and provides scalabiility and simple interface for inteeracting resources.

5

Conclusion

In this paper, we proposed the LinkMe, web based me-centric resource managem ment system for pervasive enviro onment. We apply web technologies on implementing the proposed system because the t web is now a de facto universal identification scheeme

162

D. Seo, S.C. Ahn, and H. Ko

for accessing networked resources. URIs are identified and addressed web-enabled resources. Pervasive application developers write applications using familiar language such as HTML5, CSS and JavaScript. Also, the system provides a method for declaring granularity of a resource. The user is able to fine-grained control to the resources. We give example applications for testing feasibility of our system. We only focus on the device resources in the paper. As next step the system will consider social relation and social services that are tightly connected the user. We will be able to get more context and useful information from linked resources. Acknowledgments. This research is supported by Ministry of Culture, Sports and Tourism(MCST) and Korea Creative Content Agency(KOCCA) in the Culture Technology(CT) Research & Developement Program 2012.

References 1. Fielding, R., Taylor, R.: Principled Design of the Modern Web Architecture. ACM Trans. Internet Technology 2(2), 115–150 (2002) 2. Guinard, D., Trifa, V.: Towards the web of things: Web mashups for embedded devices. In: Workshop on Mashups, Enterprise Mashups and Lightweight Composition on the Web (MEM 2009), Proceedings of WWW (International World Wide Web Conferences), Madrid, Spain (2009) 3. Barton, J., Kindberg, T.: The challenges and opportunities of integrating the physical world and networked systems. HPL Technical Report 2001-18 (2001) 4. Roman, M., Hess, C., Cerqueira, R., Ranganathan, A., Campbell, R.H., Nahrstedt, K.: A middleware infrastructure for active spaces. IEEE Pervasive Computing 1(4), 74–83 (2002) 5. Tigli, J.Y., Lavirotte, S., Rey, G., Hourdin, V., Riveill, M.: Lightweight Service Oriented Architecture for Pervasive Computing. International Journal of Computer Science Issues (IJCSI) 4, 1–9 (2009) 6. Lyle, J., Faily, S., Fléchais, I., Paul, A., Göker, A., Myrhaug, H., Desruelle, H., Martin, A.: On the design and development of webinos: A distributed mobile application middleware. In: Göschka, K.M., Haridi, S. (eds.) DAIS 2012. LNCS, vol. 7272, pp. 140–147. Springer, Heidelberg (2012) 7. Open WebOS Project, http://www.openwebosproject.org 8. PhoneGap, http://www.phonegap.com 9. W3C Device APIs Working Group, http://www.w3.org/2009/dap 10. Server-Sent Events, http://dev.w3.org/html5/eventsource 11. RFC 5023 - The Atom Publishing Protocol, http://tools.ietf.org/html/rfc5023 12. RFC 6750 - URI Template, http://tools.ietf.org/html/rfc6570

Suggest Documents