Paper Title (use style: paper title) FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 29, N o 3, September 2016, pp. 367 - 381 DOI: 10.2298/FUEE1603367J FROM INTELLIGENT WEB OF THINGS TO SOCIAL WEB OF THINGS Nafaâ Jabeur 1 , Hedi Haddad 2 1 Dept. of Computer Science, German University of Technology in Oman, Oman 2 Dept. of Computer Science, Dhofar University, Oman Abstract. Numerous challenges, including limited resources, random mobility, and lack of standardized communication protocols, are currently preventing a myriad of heterogeneous devices to interact and provide Web services within the context of the Web of Things (WoT). We argue in this paper that these devices should be augmented with artificial intelligence techniques for an enhanced management of their resources and an easier construction of Web applications integrating Real World Things (RWT). To this end, we present a new classification of the WoT challenges and highlight the opportunities of embedding smartness into RWT. We also present our vision of Intelligent WoT by proposing a multiagent system-based architecture for intelligent Web service composition. In addition, we discuss the shift of the WoT toward a Social WoT (SWoT) and debate our ideas within two important scenarios, namely the Intelligent VANET-WoT and smart logistics. Key words: Internet of Things, Web of Things, Multiagent Systems, Web service composition, Social Web of Things, Smart Logistics 1. INTRODUCTION Continuous technological advances are bringing communication and computing technologies from large to small and tiny scales. For instance, new range of small devices, including Wireless Sensor Networks (WSNs), are capable of acquiring and reporting data about a variety of spatial objects and events of interest, anytime and everywhere [2]. These devices are since there profiting from incessant progress in the fields of networking capabilities, mobile and pervasive computing, and miniaturization. They are not anymore being considered as simple data collecting devices. Their capabilities are, indeed, being augmented with processing and intelligent mechanisms to assess on their own their current Received August 30, 2015; received in revised form November 15, 2015 Corresponding author: Nafaâ Jabeur Dept. of Computer Science, German University of Technology in Oman - GUtech, P.O. Box 1816, PC 130, Muscat, Oman (e-mail: nafaa.jabeur@gutech.edu.om) *An earlier version of this paper was presented at the International Conference on Recent Advances in Computer Systems RACS-2015, Hail University, Saudi Arabia, 2015 [1]. 368 N. JABEUR, H. HADDAD situations and make the right decision at the right time. A new era bridging cyber and physical worlds have then emerged with the vision to insert smartness everywhere. This era is particularly marked with the recent emergent fields of Cyber Physical Systems [3] and Internet of Things. The Internet of Things (IoT) could be defined as a global networking infrastructure that uses data capturing devises and communication resources to link virtual and physical objects [4]. It can, therefore, be perceived as an amalgamation of a variety of sensing, communication, and networking devices and systems in order to connect people and things with common interests. In this configuration, anybody can efficiently access the information of any object and any service, at any time and any place, regardless the heterogeneity of communication protocols and devices [5]. The Web of Things (WoT) is a subset of the IoT where web standards are used to seamlessly integrate and connect physical objects and information resources [6]. The emerging development of WoT is expected to offer solutions in a wide variety of domains, including transportation management, energy monitoring, logistics and supply chain management, military and rescue scenarios, and healthcare applications. This is expected to be facilitated thanks to the increasing abundance of smart devices with web-enabled capabilities. The WoT vision particularly aims to use web protocols and technologies to allow an easy building of web applications exploiting Real World Things (RWT). However, due to the heterogeneity of their hardware/software specifications and capabilities, the non- homogeneity of their data representations and quality as well as their commonly non- deterministic mobility, RWT are facing serious problems to interoperate. These problems are more and more challenging because of the absence of widely accepted standards. With the continuous expansion of cyber and physical words toward each other as well as toward a social world, additional challenges concerning trust, privacy, and security are raising up. As it can be seen clearly, the challenges of the WoT concern several levels and issues. We believe that autonomy, flexibility, and intelligence must be integrated to any approach addressing these challenges, and we argue that techniques from the artificial intelligence field would allow the creation of efficient candidate solutions. In this perspective, few approaches have been proposed [7][8]. However, the integration of intelligence into RWT has not been clearly investigated. Furthermore, a major success factor for the WoT is driven by the prevalence of web expertise. The Internet networking infrastructure and the existing standards for data storage, visualization, and sharing are, indeed, pillars of the WoT vision. Nevertheless, these standards and techniques must be extended, revised, and/or revolutionized in order to meet the operational requirements of the RWT and allow them to integrate the Web and mutually exchange web services. These services should be easy to publish, discover, compose, and execute. The traditional web service paradigm should then be enriched by promoting the web from both cyber and physical worlds [6]. Because of their hardware and software limitations, it would be beneficial to the RWT to collaboratively provide services going beyond their individual capabilities. We then argue that these RWT should organize themselves into clusters where Web-enabled devices could act as proxies allowing other RWT to connect to the Internet and share their services. As the issues of service composition and clustering within the context of WoT were not specifically investigated, we propose in this paper to address them as well as other challenges of the WoT using a multiagent-based approach. In the reminder of this paper, Section 2 highlights existing works that have addressed the issue of web service provision From Intelligent WoT to Social WoT 369 in the WoT. Section 3 presents our categorization of the WoT challenges. Section 4 addresses the issue of intelligent WoT where the need for intelligent techniques are emphasized and explained. Section 5 brings hints about socializing the WoT. Section 6 focuses on the application of our ideas to two important scenarios, namely Web of Vehicular Ad-Hoc Network and freight transportation. 2. RELATED WORK The main challenge of the IoT and therefore the WoT is to allow a myriad number of RWT to interoperate and mutually “understand” each other. To facilitate this interoperability, several techniques, including Universal Plug and Play (UPnP), DLNA, SLP, and Zeroconf have been proposed [9]. Each of these techniques has individually been successful in enabling devices to communicate with each other [7]. However, in addition to being not strictly standardized, some of them are inappropriate to resource-constrained devices due to their heavy protocols. Thanks to the increasing integration of web-enabled capabilities, large number of RWT are currently benefiting from the existent networking infrastructure of the Internet. The WoT is then providing these RWT with the service and application layer to interoperate over HTTP [10]. Other networking infrastructures like Wi-Fi and Ethernet permit new opportunities to build additional applications and services [7]. Furthermore, with the falling size of embedded systems and their growing hardware and software capabilities, it has become possible to integrate lightweight Web servers into many appliances [11]. Consequently, the academia and the business sector are giving increasing attention to using the Web as a platform for the creation of new applications that integrate RWT [10][12]. This trend has resulted in the increasing use of Web services for the interoperability of RWT, particularly because of their proprietary and heterogeneous technologies [7]. The possible integration of heterogeneous RWT into the Web leads to a more advanced perspective, where these things are abstracted into reusable web services, and not only viewed as simple web pages [6]. For instance, SOAP-based Web Services (WS-*) and RESTful APIs allow RWT to offer their functionalities. RESTful Web services are based on Representational State Transfer (REST) [13] which is lightweight, simple, loosely coupled, flexible as well as easy to integrate into the Web using the HTTP application protocol [7]. Although REST-based services are being incorporated into many WoT applications, particularly where Quality of Service (QoS) levels are firmly applied (e.g., stock market and banking), a more tightly coupled service paradigm like WS-* would be more ideal [14]. Recent developments are successfully allowing to embed tiny web servers into RWT (e.g., [15][16]), especially since these servers do not need to handle large number of concurrent connections and requests. However, a lot of research and development efforts remain necessary in order to properly manage the increasing volume of demands from these servers while efficiently using the limited resources of the corresponding RWT. In the current literature, the WoT did not attract enough research and development attention, worth of its value. We believe that this is due to its numerous challenges as well as the lack of maturity of related processing and communication capabilities of RWT. We also believe that artificial intelligence techniques, which have proven their extraordinary performance in dealing with problems of highly dynamic, uncertain, and heterogeneous environments, could bring solutions to the problems of WoT. Some works have integrated such techniques within the context of IoT (e.g., [17][18][19]). However, to the best of our 370 N. JABEUR, H. HADDAD knowledge this was not the case for the WoT. An interesting study was proposed by Zhong et al. [8] where the authors have suggested a holistic intelligence methodology called Wisdom WoT (W2T) for realizing "the harmonious symbiosis of humans, computers, and things in the hyper world" [8]. The methodology principally aims to implement a closed cycle that starts from things to data, information, knowledge, wisdom, services, humans, and then back to things. This macro-level cycle is not embedded on the RWT which are mostly being considered as data collectors with networking facilities to connect to server providers. 3. CHALLENGES OF THE WEB OF THINGS Basically, building the WoT concerns ways to design and implement scalable and industry-ready IoT solutions on the Web. As a subset of the IoT, the WoT shares many characteristics with Wireless Sensor Networks (WSNs), Machine-to-Machine (M2M), and ubiquitous computing technologies. Furthermore, the WoT integrates information and physical objects, necessitating new means to model and reason about a range of context types [20]. From a design perspective and compared to the traditional client-server architecture, the WoT has a flat architecture that includes two main challenges: a) integrating the RWT into the web; and b) making the RWT provide web services capable of mutually interoperate and fuse into complex services [6]. From a general perspective, we classify the challenges of WoT into five main categories: Data Preprocessing and Storage, Data Analytics, Service Management, Networking and Communication, and Security, Privacy, and Trust (Figure 1). Data Preprocessing and Storage. The spatially distributed RWT are generally moving in the space while collecting data, anytime, anywhere and for a variety of purposes. To this end, they are usually facing problems to make the appropriate use of their data. In this regard, the RWT have to identify which data is important to collect for the current situation and according to which sampling frequency. The data collected should then be filtered and evaluated according to its semantics, the current context as well as current and expected requirements. Once data is cleaned and filtered, it should be stored according to appropriate representations, granularities, and quality. The abovementioned process could be performed with a convenient form of the commonly used Extract Transform, Load (ETL) process which is capable of merging data from different sources and creating specialized datasets for a variety of purposes. Data analytics. Once data have been transformed and fed into local embedded databases, some analytics can start. To this end, some lightweight algorithms could be applied in order to perform a variety of operations, including data mining, semantics extraction, and data correlation identification. These algorithms may derive from genetic algorithms, support vector machines, decision trees, neural networks, and/or cluster analysis. They will be basically applied to small, focused data owned by each RWT. Because of their limited storage and processing capabilities, some data analytics processing would go beyond the individual capabilities of RWTs. To this end, a trusted, federating entity would be necessary to carry out the necessary processing within appropriate timeframes. This entity could be a RWT endowed with extended capabilities or a remote server to which the participating RWTs are registered. This entity has to collect data from individual RWTs and aggregate them according to From Intelligent WoT to Social WoT 371 specific structures and requirements. Because of the increasing number of sensing devices capable of acquiring huge amounts of data, anywhere, anytime, the resulting aggregated data is tending to be huge. Advanced data analytics algorithms could then be thoroughly performed, leading to the potential discovery of new relevant data correlations as well as hidden communication, behavioural, mobility, and processing patterns. Furthermore, in addition to increasing the context-awareness while processing data, the trusted RWT executing data analytics could infer actionable information through business intelligence mechanisms. These information could particularly allow the concerned RWT to make more informed actions. Challenges of Web of Things Data Peprocessing Service Management Networking and Communication Security, Trust, Privacy Data Representation Data Availability Data Storage Data Granularity Data Quality Context Service Publishing Service Discovery Service Sharing Searching Engine Service Composition Protocols Mobility of things Client/Server Architecture Standards Context Service Mobility Context Protocols Evaluation mechanisms Mobility Context Data AnalyticsData mining Dependability Statistics Searching Engine Context-awareness Business intelligence Event tracking Fig. 1 A proposed classification of the WoT challenges Service Management. The RWT can be directly integrated to the Web (in the case they have IP addresses or they are IP-enabled when connected to the Internet) and be, consequently, able to understand each other through standardized web languages. They can also be integrated indirectly to the Web (e.g., sensor nodes in a WSN) for cost, energy and security considerations [6]. This is achieved through IP-enabled RWT proxies. In both cases, the RWT should allow other devices to interoperate with them and mutually benefit from their services, which requires the abstraction of the RWT into reusable web services [7]. One or both of the W3C web service paradigms (REST-compliant Web services) and arbitrary Web services can be adopted. The RWT services should be generated on-the-fly or at least within appropriate timeframes [7]. Although some technologies (e.g., FlyPort: www.openpicus.com) and research initiatives (e.g., [15]) have successfully embedded tiny web servers on mobile http://www.openpicus.com/ 372 N. JABEUR, H. HADDAD devices, additional research and development efforts are still needed, particularly because of the physical constraints of RTW. Furthermore, the services of RWT should be published in appropriate locations with convenient mechanisms for their discovery. In this regard, existing searching engines and algorithms must be re-examined in order to allow an efficient and effective discovery of RWT services. Because of the limited capabilities of RWT, service composition could be a challenging solution where a group of RWT collaboratively create complex services from their individual elementary services. Furthermore, although the mobility of RWT offers new opportunities for service composition, it also brings new challenges, basically because it does not guarantee a durable availability of service providers. Furthermore, increasing capabilities of smart things to connect to the Web is enabling additional flexibility and customization possibilities for end-users. Following the tendency of Web 2.0 participatory services, especially Web Mashups, users are currently capable of creating new applications where RWT (e.g., home appliances) are mixed with virtual services on the Web [21]. This type of applications is often referred to as physical Mashup [22]. A Web Mashup is a special application that integrates several Web resources in order to generate a new service or application. This integration is mainly performed in an opportunistic manner for the sake of end-user’s personal use and generally for non-critical applications [23]. In addition to serving short-term needs, Mashups are usually created ad-hoc with well-known, lightweight Web technologies (e.g., HTML, JavaScript). An example of Mashup could be an application that displays on Google Maps the location of all the pictures posted to Flickr [21]. Within the context of WoT, RWT could be used by Mashups in order to create new Web services. To this end, these RWT must be easy to locate through the Web. In addition, they must maintain the availability of their contributions in the new services. Networking and Communication. During the last decades, several technologies and standards have been proposed for smart things' communication. The sporadic mobility of RWT makes communication difficult, especially in the context of indoor applications. With the huge variety of types and manufacturers of RWT, interoperability is an upward concern. For instance, the RWT should be able to understand each other by using well- defined communication protocols. Since existing protocols, including UPnP and JXTA, have not been neither standardized nor widely accepted for embedded devices in industry, embedded tiny web servers could be an option [6]. The unpredictable mobility of RWT intensifies the problems of their communication and urges the need for new lightweight protocols, where the identities, capabilities, and requirements of things are supported. Trust, Privacy, and Security. The issues of security, privacy, and trust are always fuelling intensive research works, especially within the context of large scale, open configurations in which specialized and non-specialized parties can participate anytime, anywhere. This is also the case for WoT where RWT can exchange and share data/services without having a firm awareness about their mutual intensions and actions. The option of embedding tiny web servers on RWT adds up additional security challenges. The use of REST-based interfaces makes it possible to have secure interactions using HTTPS [24]. However, the erratic configuration of the WoT and the lack of standards require new and revolutionary security mechanisms. The use of the social Web as a platform to ensure the trust and privacy of things has been advocated [25] to control Web-enabled things among trusted members on social Web sites [7]. However, additional research and development works are still needed toward a successful, widespread use of the WoT. From Intelligent WoT to Social WoT 373 4. INTELLIGENT WEB OF THINGS In this section, we propose a multiagent-based architecture in order to deal with the challenges of the WoT. This architecture is expected to be embedded on RWT. We particularly focus on the issue of service composition. 4.1. Need for intelligence Because of their limited capabilities, non-standardized communication protocols, unplanned mobility, and potentially their heterogeneous data formats, accuracy, and granularity, the spatially distributed RWT definitively need suitable mechanisms to make convenient actions at the right time, depending on their current capabilities and context. In this paper, we argue that the multiagent system paradigm (MAS) could be appropriate for the WoT, thanks to its proven flexibility, autonomy, and intelligence to solve complex problems within highly dynamic, constrained, and uncertain environments [26]. We believe that several, well-established agent-based techniques could perfectly bring solutions to the deficiency and challenges of RWT highlighted in Section III. 4.2. Multiagent-based architecture We propose, in this paper, to embed a MAS into RWT in order to handle the WoT challenges at different levels. Data Filtering Agent Content Generation Agent Networking and Communication Agent Raw Data Service Repository Protocols and communica- tion links S e c u ri ty , P ri v a c y , T ru s t A g e n t A p p li c a ti o n Service Composition Agent System Fig. 2 An embedded multiagent architecture for RWT Our architecture (Figure 2) contains four main modules: Data Filtering Agent (DFA), Content Generation Agent (CGA), Networking and Communication Agent (NCA), and Security, Trust, and Privacy Agent (STPA). The DFA processes and analyzes the data collected by local sensing devices as well as data received from neighbouring devices. Agent- based techniques for data filtering (e.g., [27]) and data mining (e.g., [28]) can be used. The CGA will then be able to create elementary services which will be published later. If a given service is requested by a tier, the RWT should use appropriate communication protocols (e.g., 6LowPAN, Zigbee, WiFi) as well as appropriate communication pathways to respond and convey the requested service. This task is achieved by the agent NCA. The operation of the RWT is carried out according to specific security, trust, and privacy rules handled by the 374 N. JABEUR, H. HADDAD STPA. These rules will be updated and improved based on the accumulated experience and the envisioned WoT application. Our architecture also includes a dedicated agent-based system which will be used for service composition on-demand (requested by peers) or when the RWT is willing to create a new Mashup, integrating local, neighbouring, and remote services from trusted peers. 4.3. Service composition When some required services cannot be provided individually, RWT should have the option to collaboratively generate new contents beyond their individual capabilities. This collaboration is particularly needed for energy and safety reasons as well as shortage of resources due to RWT mobility. In order to enable RWT collaboration, we propose to allow them creating clusters of things that we call Circles of Friends (CoF). Each CoF will be composed of a group of RWT that will select each other based on their own preferences. Although the creation of CoFs is beyond the scope of this paper, we give a brief overview of how they are formed. Initially, while publishing its services, any RWT also publishes its wish to belong to a CoF with specific social and/or professional aims. Interested RWT could then contact each other to make a new CoF. One of the RWT is appointed as a Head of the CoF (HCoF). The HCoF is responsible of selecting the appropriate RWT to provide the currently requested services and make the necessary plans to generate complex services from elementary ones. In order to motivate RWT to join CoF so that complex services could be created more easily, smart things will be rewarded whenever they are participating and providing services within these circles. This will consequently affect their reputation in the WoT. A reward, and therefore a reputation, is also assigned to each CoF in order to motivate RWT to be active and maintain their CoFs. Translator Agent Service Generator Agent Evaluator Agent Executor Agent Request Service Repository specifications service CoF members Revision function Beliefs Option generation function Desires Intentions Action generation function Plan generation Inputs (new communication) Fig. 3 (left) Embedded multiagent system architecture for service composition, (right) Belief-Desire-Intension Architecture of RWT In order to carry out the tasks of a HCoF, any given RWT with appropriate physical resources will include a service composition agent system (see Figure 3) with the following From Intelligent WoT to Social WoT 375 agents: Translator Agent (TA), Service Generator Agent (SGA), Evaluator Agent (EA), and Executor Agent (XA) (Figure 3, left). The TA will receive the requests for services from its corresponding CoF and make the necessary translations between the external languages and communication formats and the internal ones to the HCoF. If the request cannot be understood then the HCoF can request the help of a member of the circle to make the necessary translations. Once the request is translated, specifications are sent to the SGA which will consult the repository of the services currently provided by the CoF as well as the currently active RWT and their rewards, trust, and security levels. Elementary services will be assigned to individual RWT. However, for complex services, the SGA plans and generates options to the EA which will make the necessary assessments and select an appropriate service composition plan with one backup plan. The selected plan will then be executed by the concerned RWT and monitored by the agent XA. 4.4. Mobile agents A mobile agent is a software component capable of transporting itself from one location to another while performing delegated tasks. It is capable of interacting autonomously with foreign hosts while gathering information on behalf of its owner and delivering information and service based on its context-awareness knowledge [19]. Because of the limited capabilities of RWT and the restrictions to access the Web, mobile agents could play crucial roles in enabling the WoT. For instance, any RWT can create a mobile agent, instruct it with specific tasks, and send it to neighboring or far RWT. The main goals of such agent include reporting events, negotiating deals as well as delivering, promoting, or attracting services to cut operating costs and discovering new partners or proxies. As the RWT contributing to the WoT have heterogeneous capabilities, mobile agents should be lightweight to ensure an easy migration from one RWT to another. Mobile agents should also abide by the requirements of hosts in terms of security (to avoid attacks), communication protocols, local resources use, and any local operating regulations. To this end, we need an efficient architecture for such agent. This architecture is explained in what follows. 4.5. Belief Desire Intension (BDI) architecture In order to allow the RWT to reason adequately about occurring events and the dynamic surrounding environment affecting their Web access, we propose a Belief-Desire-Intension (BDI) architecture [13] for every agent embedded to a RWT (Figure 3, left). In this architecture, beliefs represent the local information that the agent has about itself and its RWT (e.g., its current operations, services, processing capabilities, battery lifetime when applicable, communication protocols, etc.) and the environment (neighbouring trusted and untrusted peers as well as their communication protocols and the services they are providing). Beliefs could be true or false and are subject to change. The desires reflect the objectives or the situations that the agent would like to accomplish, while the intentions refer to the actions that the agent has chosen to do. The agent will be always listening to communications from neighbouring and remote peers with whom it has connections (e.g., belonging to the same CoF). For any new communication received, a revision function is executed in order to update the current beliefs. Based on these beliefs, an option generation function updates the desires of the agent. An action generation function is then applied to 376 N. JABEUR, H. HADDAD deliberate the new intensions. A plan generation function is finally executed to schedule the actions of the agent and update the beliefs, desires, and intentions accordingly. 5. SOCIALIZING THE WEB OF THINGS Several researches have applied the idea of social networking to the IoT arguing that if the IoT can be made to imitate the social behaviour of the humans then those smart objects will be able to provide a better service than locally connected objects [29]. This results in a new idea called Social Internet of Things (SIoT) [30]. SIoT applications can be a valuable resource in several areas, including domestics, business, automation and industrial manufacturing, logistics, and intelligent transportation of people and goods [31]. By analogy, we adopt in this paper the notion of Social Web of Things (SWoT) where RWT use the social Web as a platform to guarantee network navigability (effectively performing the discovery of objects and services), guarantee scalability as in human social networks, and establish appropriate levels of trustworthiness to improve the degree of interaction among things that are friends. The SWoT is also an open structure where RWT can seek for help to find trusted peers for their Web connection, particularly if they are not Web-enabled. They can also find peers with similar objectives with which they can seek advices about the reputation and trustworthiness of other RWT, share operating costs, jointly create services beyond their individual capabilities, mutually delegate tasks, etc. We therefore believe that it is important to adapt existing social theories to the WoT context and prepare an impending shift to an environment where social relations will exist between everything. This shift will also bring the SWoT to the Social Web of Everything (SWoE). In order to enable the SWoT, it is important to possess efficient tools that facilitate a seamless connection and cooperation among devices and users. To this end, it is important to leverage modern paradigms like social networks and crowd-based applications, create a platform allowing the development of SWoT while enabling its relevant business-wise ecosystem, and create data analysis and recommendation techniques that fit the above paradigms and enable useful application creation. Re-examining the concept of Mashups and adapting them to the context of WoT would be an asset. 6. APPLICATIONS 6.1. Intelligent Web of Vehicles Advances on sensing and communication facilities are impelling the evolution of the conventional Vehicular Ad-Hoc Networking (VANET) activities to the cloud, creating thereby the emergent notion of Internet of Vehicles (IoV) [32]. In the IoV paradigm, each vehicle is potentially involved with heterogeneous devices, communication and networking technologies, service kinds, data formats/contents, accuracy/efficiency requirements, etc. In order to smoothly integrate and connect the RWT and information resources of the IoV along with a seamless integration with the social context, we coin the term Web of Vehicles (WoV) that particularly aims to leverage web protocols and technologies for VANET related devices/objects, while facilitating rapid service generation and sharing. Some of the devices on vehicles could be Web-enabled and could therefore be endowed with embedded tiny Web servers. These devices could play the role of proxies for other devices which cannot connect to the Internet. To this end, they may provide them with RESTful APIs for a direct Web-based access. From Intelligent WoT to Social WoT 377 Within the context of WoV, let us suppose that a commuter wants to reduce his travel time between two given locations. In order to avoid unexpected traffic jams and reduce stoppage time at road intersections, a speed sensor on the commuter vehicle continuously reports information to an onboard decision unit (similar decision units could be embedded to any of the RWT in the WoV scenario). This unit also receives data from distance and environmental sensors as well as information/services from the road infrastructure, vehicles, humans, and sensors in the vicinity. In addition to measuring the distance between the current vehicle and neighbouring objects (vehicles, road infrastructures, etc.), a distance sensor on the commuter’s vehicle could receive measurements from similar sensors on vehicles in the vicinity. These measurements should be cleaned and filtered by the distance sensor in order to assess the position of the vehicle with respect to its neighbouring objects from the side where the sensor is deployed. The sensor should also timely share useful information with other appropriate RWT on the road. For a better assessment of the situation, all distance sensors on the commuter’s vehicle will collect similar data and submit reports to the decision unit onboard. Agent-based techniques (e.g., [28][27]) could then be used for data filtering and mining purposes on any of the sensors/RWT. As road safety is a shared matter, on-road vehicles have to accommodate each other and mutually exchange contextual information and services on-time. Examples of services may include vehicle driving conditions (speeding, planned driving directions, alerts on vehicle about critical situations, etc.), on-road events (traffic jams, accidents, etc.), and professional services (healthcare if the driver is doctor/nurse, plumber, etc.). The vehicles of the WoV will create CoFs. A CoF does not necessary consist of geographically collocated vehicles. For instance, some vehicles may share the same destination or the same social interests and therefore would like to maintain their CoF, although they may be very far from each other because of traffic conditions. For each CoF, one vehicle will be elected as HCoF using an appropriate clustering technique [33]. This vehicle will maintain the list of services provided by each of the vehicles in the circle. It can also request services on their behalf and enable them to socially connect with similar vehicles from other circles. The HCoF should always stay tuned to the needs of the members of the circle, update their rewards, plan the composition of complex services, etc. To this end, all requests received by the HCoF will be translated, when needed, into the internal language and formats by an onboard intelligent agent. Service composition will be planned by a special agent based on the current offering, trust, and capabilities of the vehicles in the CoF. Since some vehicles would be competing to offer their services and increase their rewards, an agent evaluator will fairly and carefully check service composition plans before handing over the approved plan to an executor agent to monitor the required actions. Rewards and trust levels will then be updated accordingly once this plan is achieved. 6.2. Smart logistics Roughly, logistics is a part of the supply chain process where the forward and reverse flow and storage of good, services, and related information are effectively and efficiently planned, implemented, and controlled between the point of origin and the point of consumption with the aim to meet customers’ requirements [34]. The logistics industry is being considered a key player currently benefiting from the revolution of IoT [35]. For instance, large numbers of a variety of machines, vehicles and people are daily packing, moving, and tracking millions of freights around the world within complex ecosystems known for their large operational scales and unpredictable spatio-temporal events. Integrating a wide range of heterogeneous assets 378 N. JABEUR, H. HADDAD and allowing them to interoperate in timely fashion is being helped with IoT capabilities while creating customized, dynamic, and automated services for their customers. In order to make increasing benefits within this context of falling prices of device components, devices should be allowed to smoothly connect to the Web. The WoT is an ideal platform that would allow devices to cooperate in a context of smart logistics scenarios. Amid the existing applications of logistics, we will focus in what follows in the scenario of fright transportation. Although it is already possible today to track and monitor a container in a freighter in the middle of the Pacific and shipments in a cargo plane mid- flight, it is expected from the IoT and the WoT to provide the next generation of track and trace by allowing them to be faster, more accurate, more predictive, and more secure [35]. The spatially distributed sensing devices can be endowed with Web-enabled capabilities to consult nearby and remote devices and request specific services of current interest. Imagine that a given damaged container had been moved by some trucks before and another truck is going to move it this time. This latter truck may connect to the WoT and request some details and recommendation about the best way to transport this container while avoiding problems because of the already existing damages. Since the different tracks could be located in far regions, efficient communications mechanisms are needed. To meet the above goals, clear and standardized approaches are needed to allow a seamless interoperability for exchanging sensor information in heterogeneous environments. Sensors should be able to establish trust relations with a circle of friends in order to overcome some privacy issues in the WoT-powered supply chain. In order to clarify these ideas, let us suppose the scenario of Figure 4 where RWT are embedded or deployed on several facilities, TCoF CoCoF SCoF CCoF Legend: CoCoF (Container Circle of Friends), TCoF (Truck CoF), (SCoF (Ship CoF), CCoF (Crane CoF) RWT_Truck RWT_Container RWT_Ship RWT_Crane Fig. 4 Freight transport scenario From Intelligent WoT to Social WoT 379 including ships, planes, containers, cranes, etc. These RWT may have different processing, storage, and communication capabilities. Because of the highly dynamic environment (e.g., facility movements) and sporadic spatio-temporal events (e.g., accident on the container yard, heavy rain, etc.), RWT have interest to coordinate their effort and particularly take benefit from previous experiences of peers while currently performing similar tasks. To this end, RWT on trucks could create a Truck Circle of Friends (TCoF) and RWT on cranes could form a Crane CoF (CCoT). Similarly, we can talk about Container CoF (CoCoF), Ship COF (SCoF), and Plane CoF (PCoF). Let us imagine that a container is being transported by a truck for shipment. An onboard master RWT (let’s call it MCo_RWT: Master Container RWT) is assigned to the control of this container. The MCo_RWT could request to join the TCoF as service consumer since its container is being transported by a truck. The RWT has also to communicate with any RWT onboard of its container. Relevant information could be conveyed timely within the TCoF as for example when goods inside the container have underwent some damage and more careful transportation services should be observed. Once the container is deposited on the shipment area, the MCo_RWT has to confirm to the master RWT assigned to the crane (MC_RWT) its position as well as its local conditions and parameters. The MCo_RWT will then unsubscribe from the TCoF and subscribe to the CCoF. Although only one crane is generally responsible of shipping the container, other cranes could give recommendations based on the current conditions of the container as well as the ongoing environmental conditions. Once on the ship, the MCo_RWT may connect with other RWT during the marine transport (Figure 5). Our scenario could also be extended to the phase when the container is on road. Besides, as some goods in the container could travel by air then the same scenario could be extended to air transportation. MCo_RWT Container_1 MCo_RWT Container_nMCo_RWT Container_2 CoCoF MT_RWT Truck_1 MT_RWT Truck_mMT_RWT Truck_2 TCoF [during transport] MC_RWT Crane_1 MC_RWT Crane_kMC_RWT Crane_2 CCoF [during shipment] MS_RWT Ship_s MS_RWT Ship_1 MS_RWT Ship_3 SCoF [on ship] Fig. 5 A multiagent system architecture for freight transport scenario 380 N. JABEUR, H. HADDAD 7. CONCLUSION Real World Things (RWT) are currently capable of establishing connections to the Web, either directly via IP-enabled capabilities or via proxies. However, because of their spatial distribution, heterogeneity, limited resources, and sporadic mobility, maintaining efficient, secure, and durable connections is not straightforward. We therefore presented in this paper some conceptual steps towards enabling the vision of Intelligent WoT (IWoT) and Social WoT through the use of MAS techniques. In order to show the potential of our ideas, we discussed two important application scenarios, namely the intelligent Web of Vehicles and smart logistics. Several issues still need to be addressed in the future to fully implement our vision. In this regard, the MAS-based architecture proposed for service composition needs to be refined, implemented and experimented. Then it needs to be extended to address the other challenges presented in the paper, including Data Processing and Storage, Networking and Communication, and Trust, Privacy, and Security. We also believe that considerable research and development works are needed towards socializing the WoT. REFERENCES [1] N. Jabeur, H. Haddad. “Towards an Intelligent Web of Things”, In Proceedings of the International Conference on Recent Advances in Computer Systems RACS-2015, Hail University, Saudi Arabia, November 2015. [2] N. Jabeur, N. Sahli, S. Zeadally, “ABAMA: An Agent-Based Architecture for Mapping Natural Ecosystems onto Wireless Sensor Networks”, Invited Paper, In Proceedings of 9th International Conference on Future Networks and Communications (FNC-2014), Elsevier Procedia Computer Science, Volume 34, Canada, August 2014. [3] R. Rajkumar, I. Lee, L. Sha, J. Stankovic, “Cyber-physical systems: the next computing revolution”, In Proceedings of the 47th Design Automation Conference. ACM, New York, USA, 2010, pp. 731-736. [4] CASAGRAS. CASAGRAS Final Report: RFID and the Inclusive Model for the Internet of Things, 2009, pp. 10-12. [5] Z. Pang , “Technologies and Architectures of the Internet-of-Things (IoT) for Health and Well- being”, KTH Royal Institute of Technology, 2013. [6] D. Zeng, S. Guo, Z. Cheng, “The Web of Things: A Survey (Invited Paper)”, J. Communications, Vol. 6, No. 6, pp. 424-438, 2011. [7] S.S. Mathew, Y. Atif, Q.Z. Sheng, Z. Maamar. Internet of Things and Inter-cooperative Computational Technologies for Collective Intelligence, Bessis, N., Xhafa, F., Varvarigou, D., Hill, R., Li, M. (ed./s), 2013, pp.1-23 [8] N. Zhong, J. Ma, R. Huang, J. Liu, Y. Yao, Y. Zhang, J. Chen. Research Challenges and Perspectives on Wisdom Web of Things, Journal of Supercomputing, Springer, 2010. [9] S. Cheshire, D.H. Steinberg, Zero Configuration Networking, the Definitive Guide, O’Reilly, 2005. [10] D. Raggett . The Web of Things: Extending the Web into the Real World, SOFSEM 2010: Theory and Practice of Computer Science, Jan 2010. [11] B. Ostermaier, M. Kovatsch, and S. Santini, “Connecting Things to the Web using Program-mable Low- power WiFi Modules”, In Proceedings of 2nd International Workshop on the Web of Things, 2011. [12] D. Guinard and V. Trifa, “Towards the Web of Things: Web Mashups for Embedded Devices”, In Proceedings of the Workshop Mashups, Enterprise Mashups and Lightweight Composi-tion on the Web (MEM’09), 2009. [13] R. T. Fielding, Architectural styles and the design of network-based software architectures, Ph.D. dissertation, 2000. [14] C. Pautasso, O. Zimmermann, and F. Leymann, “Restful web services vs. 'big' web services: making the right architectural decision”, In Proceedings of the 17th International Conference on World Wide Web, ser. WWW ’08. New York, NY, USA: ACM, pp. 805–814, 2008. [15] S. Duquennoy, G. Grimaud, and J.J. Vandewalle, “The Web of Things: Interconnecting Devices with High Usability and Performance”, In Proceedings of the International Conference on Embedded Software and Systems (ICESS’09), 2009. From Intelligent WoT to Social WoT 381 [16] Z. Shelby, “Embedded web services”, IEEE Wireless Communication Magazine, vol. 17, No. 6, pp. 52–57, 2010. [17] G. Kortuem, F. Kawsar, V. Sundramoorthy, D. Fitton, “Smart Objects as Building Blocks for the Internet of Things”, In Proceedings of the IEEE Internet Computing, Vol. 14, No. 1, pp. 44-51, 2010. [18] A. M. Mzahm, M. S. Ahmad, Y. Alicia and C. Tang, “Agents of Things (AoT): An Intelligent Operational Concept of the Internet of Things (IoT)”, In Proceedings of the 13th International Conference on Intelligent Systems Design and Applications (ISDA 2013), pp. 159-164, 2013. [19] A. M. Mzahm, M. S. Ahmad, A. Y. C. Tang, “Enhancing the Internet of Things (IoT) via the Concept of Agent of Things (AoT)”, Journal of Network and Innovative Computing, Vol. 2, pp. 101-110, 2014. [20] P. Sawyer, A. Pathak, N. Bencomo, V. Issarny, “How the Web of Things Challenges Requirements Engineering”, In Proceedings of the 3rd Workshop on The Web and Requirements Engineering at 12th International Conference on Web Engineering ICWE 2012, Berlin Germany, July 2012. [21] D. Guinard, V. Trifa, F. Mattern, E. Wilde, “From the Internet of Things to the Web of Things: Resource- oriented Architecture and Best Practices” D. Uckelmann, M. Harrison and F. Michahelles, editors, Architecting the Internet of Things, pp. 97-129. Springer Berlin Heidelberg, Berlin, Heidelberg, 2011 [22] D. Guinard, V. Trifa, E. Wilde, “A Resource Oriented Architecture for the Web of Things”, In Proceedings of IEEE International Conference on the Internet of Things (IoT) 2010. Tokyo, Japan. [23] J. Yu, B. Benatallah, F. Casati, F. Daniel, “Understanding Mashup Development”, IEEE Inter-net Comput, Vol. 12, pp.44-52, 2008. [24] E. Wilde, Putting Things to REST, UCB iSchool Report 2007-015, School of Information, UC Berkeley, 2007. [25] D. Guinard, M. Fischer, and V. Trifa, “Sharing Using Social Networks in a Composable Web of Things”, In Proceedings of the 1st IEEE International Workshop on the Web of Things (WoT), 2010, Germany, 2010. [26] S. Bandyopadhyay and E.J. Coyle An energy efficient hierarchical clustering algorithm for wireless sensor networks”, Proc. of INFOCOM 20013, IEEE Societies, 2013, vol. 3, pp. 1713-1723 [27] P. Skocir, H. Maracic, M. Kusek, G. Jezic, “Data Filtering in Context-Aware Multi-Agent System for Machine-to-Machine Communication”, G. Jezic et al. (ed.), Agent and Multi-Agent Systems: Technologies and Applications, Smart Innovation, Systems and Technologies 38, 2015. [28] K. A. Albashiri, “An investigation into the issues of Multi-Agent Data Mining”, Ph.D. dissertation, The University of Liverpool, Liverpool L69 3BX, 2010, United Kingdom. [29] X. Hannan, N. Sidhu, B. Christianson, "Guarantor and reputation based trust model for Social Internet of Things," In Proceedings of the International Wireless Communications and Mobile Computing Conference (IWCMC), 2015, pp. 600-605. [30] L. Atzori, A. Iera, G. Morabito and M. Nitti, “The social Internet of Things (SIoT) - when social networks meet the Internet of Things: concepts, architecture and network characterization,” Computer Network, Vol. 56, No. 16, pp. 3594-3608, 2012. [31] L. Atzori, A. Iera and G. Morabito, “The Internet of Things: a survey,” Computer Networks, Vol. 54, No. 15, pp. 2787-2805, 2010. [32] M. Gerla, E-K. Lee, G. Pau, U. Lee, “Internet of vehicles: From intelligent grid to autonomous cars and vehicular clouds”, In IEEE World Forum on Internet of Things (WF-IoT), 2014, pp.241-246. [33] S. Vodopivec, J. Bester, A. Kos, "A survey on clustering algorithms for vehicular ad-hoc networks", In Proceedings of the 35th International Conference on Telecommunications and Signal Processing (TSP), 2012, pp. 52-56. [34] B. Tilanus, Information Systems in Logistics and Transportation. Elsevier Science Ltd., UK, 1997 [35] DHL and CISCO (2015) Internet of Things in Logistics - A collaborative report by DHL and Cisco on implications and use cases for the logistics industry, available at: http://www.dpdhl.com/content/dam/dpdhl/ presse/pdf/2015/DHLTrendReport_Internet_of_things.pdf. http://www.dpdhl.com/content/dam/dpdhl/presse/pdf/2015/DHLTrendReport_Internet_of_things.pdf http://www.dpdhl.com/content/dam/dpdhl/presse/pdf/2015/DHLTrendReport_Internet_of_things.pdf