Institute of Parallel and Distributed Systems Universität Stuttgart Universitätsstraße 38 D–70569 Stuttgart
Diplomarbeit Nr. 2579
Location-based Mashups for Nokia Internet Tablets
Andreas Brodt
Course of Study: Software Engineering
Examiner: Prof. Dr.-Ing. habil. Bernhard Mitschang Supervisor: Dr. rer. nat. Daniela Nicklas
Commenced: February 5, 2007 Completed: August 7, 2007
CR-Classification: H.2.5, H.5.1, H.5.4
Abstract
Location-based services have gained large impact in the last years. Also, meanwhile small and powerful end-user devices are present and available. At the same time, so-called mashup pages are spreading on the web. Mashups integrate content from existing sources into a new presentation. With the appearance of web-based map APIs, such as Google Maps, it has become easy to create mapping mashups, which present geographically annotated data on a map. Giving such a mapping mashup the possibility to utilize the user’s position would make the mashup location-aware and provide additional user value. This thesis explores how the user’s position can be integrated into a mashup. Different approaches to achieve this are examined. An architecture for a system enabling location-based mashups is developed. The architecture integrates the user’s position into mashups by extending the web browser. The Delivery Context Interfaces (DCI) are used as standardized interface for providing mashups with the user’s position. Mashups are created on the user’s device by a JavaScript client. Adaptation to the various data formats of the data sources is done by wrappers on the server side which convert the data into a uniform format. The architecture is implemented on a Nokia N800 Internet Tablet. An external Bluetooth GPS device is used for locating the user. Finally, an approach to integrate privacy aspects to the platform is presented.
3 4 Zusammenfassung
Ortsbezogene Dienste haben in den letzten Jahren stark an Bedeutung gewonnen. Außerdem sind kleine und leistungsfähige Endgeräte verfügbar geworden. Gleichzeitig verbeiten sich sogenannte Mashups im Web. Mashups kombinieren Inhalte verschiedener Quellen zu einer neuen Darstellung. Mit der Verfügbarkeit webbasierter Kartensysteme wie Google Maps ist es mit geringem Aufwand möglich, Kartenmashups zu bauen, die Daten, die mit geographischen Informationen versehen sind, auf einer Karte anzeigen. Würde man es solchen Kartenmashups ermöglichen, auf die Position des Benutzers zuzugreifen, würden die Mashups ortsbasiert, was den Nutzen der Mashups deutlich steigern würde. Die vorliegende Diplomarbeit untersucht, wie die Position des Benutzers in Mashups integriert werden kann. Hierzu werden verschiedene Ansätze untersucht. Es wird eine Architektur für ein System entwickelt, das ortsbasierte Mashups ermöglicht. Die Architektur integriert die Position des Bentzers in Mashups mit Hilfe einer Browsererweiterung. Die Delivery Context Interfaces (DCI) werden als standardisierte Schnittstelle benutzt, um die Position für Mashups verfügbar zu machen. Mashups werden auf dem Gerät des Benutzers in JavaScript erzeugt. Die unterschiedlichen Datenformate der Datenanbieder werden aber serverseitig von sog. Wrappern in ein einheitliches Format konvertiert. Die Architektur wird auf einem Nokia N800 Internet Tablet umgesetzt, dabei wird ein externes Bluetooth- GPS-Gerät benutzt, um den Benutzer zu lokalisieren. Schließlich wird ein Ansatz vorgestellt, wie die Privatsphäre des Benutzers geschützt werden kann.
5 6 CONTENTS
1 Introduction 9 1.1 Background ...... 9 1.2 Structure of this document ...... 11 1.3 Acknowledgements ...... 11
2 Related Work 13 2.1 Location-based mobile applications ...... 13 2.2 Mashups ...... 21 2.3 Generic mashup platforms ...... 25
3 Transferring the Position 31 3.1 Requirements ...... 31 3.2 Position data provider ...... 32 3.3 Local mashup ...... 34 3.4 Web browser extension ...... 34 3.5 Comparison ...... 38
4 Delivery Context Interfaces (DCI) 41 4.1 Introduction ...... 41 4.2 Description ...... 41 4.3 Evaluation ...... 42 4.4 An architecture using DCI ...... 43 4.5 Delivery Context Client Interfaces (DCCI) ...... 44
5 A System for location-based mashups 45 5.1 Requirements ...... 45 5.2 Architecture ...... 46 5.3 Data format ...... 51
6 Implementation 57 6.1 Technologies ...... 57 6.2 Implementing the TELAR mashup platform ...... 62 6.3 Performance ...... 66 6.4 Implementation results ...... 69
7 Privacy 71 7.1 Geopriv privacy model ...... 71 7.2 Applying the Geopriv privacy model ...... 72
8 Conclusion 75
A Sample HTML Pages 77 A.1 An HTML page using the DCI API ...... 77 A.2 An HTML page using the TELAR Mashup Platform ...... 79
7 CONTENTS
8 CHAPTER 1
INTRODUCTION
The most exciting phrase to hear in science, the one that heralds new discoveries, is not ‘Eureka!’ (I found it!) but ‘That’s funny...’ Isaac Asimov (1920 - 1992)
Location-based services have gained large impact in the last years. Also, meanwhile small and powerful end-user devices are present and available. At the same time, so-called mashup pages are spreading on the web. Mashups integrate content from existing sources into a new presentation. With the appearance of web-based map APIs, such as Google Maps, it has become easy to create mapping mashups, which present geographically annotated data on a map. Giving such a mapping mashup the possibility to utilize the user’s position would make the mashup location-aware and provide additional user value. This thesis explores how the user’s position can be facilitated for use in mashups. In addition, a system is developed, which enables location-based mashups on a Nokia Internet Tablet. As web-browsers use sandbox- techniques to achieve a strict separation between local data and server-based data, possible ways of integrating the current position (being totally local data) into server-based data are examined and evaluated. An architecture is developed which integrates data from various data providers into a mapping mashup and obtains the user’s position from a GPS device. The architecture is implemented on a Nokia N800 Internet Tablet using an external Bluetooth GPS device. This work is carried out in cooperation with Nokia Multimedia, Oulu, Finland.
1.1 Background
1.1.1 Mashups Mashups (also referred to as Web application hybrid) are one of many recent trends in Web technology being fuzzily summarized under the term “Web 2.0”. A mashup is a website or application that combines content from more than one source into an integrated experience [Wik05]. Most notably, a mashup web site draws upon content and functionality retrieved from data sources that lie outside of its organizational boundaries [Mer06]. What makes mashups particularly interesting is their ability to combine existing sources of information to new services which have the potential to be richer and more useful than the sum of their parts. The reason for the increasing number of mashups on the WWW is the fact that it has become easy to obtain raw content data from the web. Many websites have exposed some of their raw content data through an API making it considerably easier to extract and re-use the information compared to parsing the HTML-encoded presentation of the website. Moreover, it is not necessary to provide any own data at all. With a small amount of server-sided scripting, e. g., in a language like PHP, and/or some JavaScript code, a number of data sources can be “mashed” together providing a potentially powerful new service. A big push to the mashup trend was given by Google’s introduction of its Google Maps API, soon followed by similar products from Microsoft, Yahoo and AOL. These free map services make it possible to create and annotate a map with arbitrary items, as long as these items have some kind of location information. An often cited example of these mapping mashups, as categorized in [Mer06], is Chicago Crime, shown in figure 1.1.1. Chicago Crime shows crime reports from the Chicago Police Department on a Google Map, making it to some extent possible to estimate, how safe a certain area of Chicago is. Thus, new value is created by combining two existing services, neither of which were designed to provide.
9 CHAPTER 1. INTRODUCTION
Figure 1.1: Crime reports shown on a Google Map by www.chicagocrime.org (screenshot)
1.1.2 The Nokia Internet Tablet family
Heading for a new generation of computers following an “always on” and “always online” philosophy, Nokia has created its Internet Tablet family. The Nokia 770 and its successor, the Nokia N800 (see figure 1.2), are handheld devices small enough to be taken along all day. However, they offer a relatively big screen and a desktop class web browser, which makes it possible to use the Internet wherever there is a WLAN or a cellular network1. With the user constantly connected as part of a “mobile Internet experience” (as Nokia calls it), people will be able to use the web in new ways. As the user does not necessarily stay in a fixed position and definitely does not always access the Internet from the same position it is particularly interesting to integrate the current position into Internet services.
Figure 1.2: The Nokia N800 Internet Tablet (Source: Nokia)
1Connecting via cellular networks requires a mobile phone, which is accessed via Bluetooth.
10 1.2. STRUCTURE OF THIS DOCUMENT
1.2 Structure of this document
This document is structured as follows: Chapter two gives an overview of related work. A number of Location-based mobile applications is introduced and mashups are discussed in detail. Chapter three examines how the user’s position can be integrated into a mashup using various approaches. It is concluded that the Delivery Context Interfaces (DCI) serve the purposes of this thesis best, so that DCI is discussed in more detail in chapter four. Chapter five presents a system architecture of a platform enabling location-based mashups. Details about the implementation of the platform carried out in this thesis are provided in chapter six. Chapter seven discusses privacy aspects of the implemented system and chapter eight concludes the thesis.
1.3 Acknowledgements
I would like to thank the following persons (in alphabetical order). Without their help this thesis would not have been possible.
• my mother Renate Brodt for proof-reading • Harri Kiviahde for supervising and supporting my work • Prof. Dr. Mitschang for finding the topic interesting and accepting the thesis • Dr. Daniela Nicklas for encouraging me to do this thesis, getting the whole project started and supervising and supporting my work • Olli Pettay and Oleg Romashin for being very supportive Mozilla gurus • Josh Soref for being a very supportive Mozilla guru and for proof-reading • Sailesh Sathish for cooperating with the DCI implementation • Jari Tenhunen for supporting my work and uttering brilliant ideas • Päivi Tikkala for establishing the contact to Nokia Multimedia • Esko Törmäkangas for the interesting topic and for making this whole thesis possible in the first place
11 CHAPTER 1. INTRODUCTION
12 CHAPTER 2
RELATED WORK
This thesis is related to two separate topics; location-based mobile services and applications on the one hand and web-applications and mashups on the other hand. Thus, this chapter deals with both topics; first looking at location-based mobile applications and then discussing the mashup topic, which was introduced in section 1.1.1, in more detail.
2.1 Location-based mobile applications
Integrating context awareness in mobile systems is an integral part of ubiquitous and pervasive computing. This has been subject to intensive research since the early 1990s. The context is much more than location, but its other elements are still difficult to identify or measure [Kaa03]. Many systems aiming at location-based services have been built in research environments. However, only now location-based systems start to emerge on the mainstream consumer market. This section introduces some existing location-based applications both from the research world and the consumer world. Table 2.1 summarizes the main features of the different approaches.
2.1.1 Active Badge location system
One of the first location-based applications was the Active Badge Location System [WHFG92] developed by Olivetti Research between 1989 and 1992. The system makes it possible to locate people in a building, who carry an “Active Badge” (see figure 2.1). The initial application of the system was built to enable a telephone receptionist to relay incoming calls to the phone closest to the receiver’s current position. The Active Badges send a unique ID via an infra-red signal every 15 seconds. The signals are picked up by a network of sensors installed in the building and collected by a central server. At first, the only communication with the carrier of a badge was an alarm mechanism to notify a person. Later it was considered to integrate more context information, so that people could state to not want to be interrupted, e. g., being in a meeting.
Figure 2.1: Active Badges of different device generations [ATT02]
13 CHAPTER 2. RELATED WORK
Applications using the Active Badge system connect to the central server and process the location data of the employees. These applications are not mobile nor do the badge carriers use them. The main benefit of the system is delivered, e. g., to the telephone receptionists, while the employees benefit by not missing incoming calls, being bothered more often on the other hand.
2.1.2 PARCTAB The ParcTab system is an approach for a general purpose mobile computing system developed at Xerox PARC in 1993 [SAG+93]. The ParcTab system is based on small PDA-like devices, the so-called ParcTabs, which are equipped with a touch-sensitive display and three buttons (see figure 2.2). The ParcTabs communicate with a central server via a cell-based infra-red network deployed throughout the building. The cell to which a user is currently connected allows the system to determine, in which room the user is currently staying. Thus, the infra-red network is used for positioning as well. Facing the very limited computing power of the ParcTabs, all user interaction is transmitted to the server, which handles the entire computing. The server can access files from the company network. The ParcTab system can thus be considered to have a three tier architecture consisting of the ParcTabs, the ParcTab server and the file servers of the company.
Figure 2.2: Xerox ParcTab computer [par]
There are a number of applications for the ParcTabs, making the ParcTabs usable as office assistants. Some of the applications are location-based. For instance, the user’s position in the building can be shown on a floor-plan, information about the current room can be obtained (e. g., for use in a library), nearby resources such as printers can be located and virtual notes can be left for other users to be shown to them when they enter a certain room.
2.1.3 Cyberguide Cyberguide is a mobile context-aware tour guide that provides information to a tourist based on knowledge of position and orientation (see figure 2.3). It was developed at the Georgia Institute of Technology in 1996 [LKAA96] and focuses on creating a family of mobile context-aware systems rather than a single application. There was an indoor version and an outdoor version of the Cyberguide system. In order to achieve the flexibility needed to build a family of systems, Cyberguide features a modular architecture, which consists of the following parts:
Information module. The information module encapsulates and stores information about certain points of interest (POIs), thus containing the knowledge of the tour guide. The data is kept locally, in one early version it was even hard-coded in the module’s implementation. It was considered for future work to make the information editable in order to achieve personalized data.
Position module. Like PARCTAB and Active Badge, Cyberguide uses infra-red positioning for the indoor version. However, the Cyberguide system clearly separates the position module from the communication module, unlike PARCTAB and Active Badge, which use the infra-red network for both communication and positioning
14 2.1. LOCATION-BASED MOBILE APPLICATIONS
Figure 2.3: The map view and the information view of the indoor Cyberguide system [LKAA96]
in a closely coupled way. This separation made it possible to switch to GPS positioning for the later outdoor version very easily.
Mapping module. The mapping module retrieves data from the position module and the information module and draws the user’s position and points of interest within sight on a map. The map data is stored locally on the device.
Communication module. Connectivity is provided through a wired Internet AppleTalk connection, which is only used for user feedback sheets. In [LKAA96] reading e-mail and fetching HTML pages are reported to be possible, but the lack of an appropriate wireless communication medium at the time is clearly stated, especially for providing the mapping and information modules with remote data.
2.1.4 GUIDE GUIDE is a tour guide system for visitors of Lancaster City, UK, developed at Lancaster University and installed in 1999 [DCMF99, CDM+00]. The project relies on a WaveLAN high-bandwidth wireless infrastructure to download information to the GUIDE end-systems, thus no data is stored locally. The cell information of the network is also used for positioning, i. e., there is no separation between positioning and communication as in Cyberguide. The Fujitsu TeamPad 7600 portable PC is used as terminal and a Java-based HTML browser as client. An example screenshot of GUIDE is shown in figure 2.4. As all information is retrieved over the network, the information can be dynamic. For example, Lancaster Castle is available for visitors only when the court located in the castle is not in session, which can change on an hourly basis. GUIDE also offers the possibility to create a user-tailored tour through the town, taking into account opening times of attractions, distances between attractions and the user’s personal interests. Throughout the tour, GUIDE is able to modify the tour dynamically, e. g., if the user stays longer at a certain attraction or if opening times change.
2.1.5 REAL REAL is a pedestrian navigation system designed at the University of Saarbrücken in 2000 [BKW02]. In contrast to the systems introduced above, REAL adapts to the user’s context not only based on the user’s location but also on the user’s speed, on the quality of the location information and the properties of the user’s mobile device (screen size, etc.). Taking into account that, e. g., a business man needs to get to the train station as fast as possible, whereas a tourist likes to see the most beautiful route, REAL attempts to generate a route which best fits the user’s needs. Moreover, a running person is unlikely to desire detailed information about the surroundings, while a person walking slowly might be interested. Thus, REAL displays environmental information depending on the user’s speed. More or less of the surrounding landmarks are shown, depending on how exact REAL believes to know about its position. E. g., if REAL is not confident to know about the user’s orientation, the walls of the corridor are displayed, so that the user can find his/her way, whereas otherwise only an arrow pointing to the right direction will suffice.
15 CHAPTER 2. RELATED WORK
Figure 2.4: Screenshot of GUIDE [GUI]
Figure 2.5: The outdoor version of the REAL system [BKW02]
16 2.1. LOCATION-BASED MOBILE APPLICATIONS
Another key feature of REAL is that it does not rely on one single positioning system but utilizes a number of sensors, which integrate smoothly (see figure 2.5). Outdoors, a GPS receiver is used, while indoor navigation is done with infra-red beacons. REAL stores no data locally on the device but retrieves all its information from a central server via WaveLAN or infra-red broadcasts (non-mobile clients such as smartboards connect via LAN). In the case of infra-red, the communication is unidirectional with the server not knowing the user’s position. Thus, data about all locations is broadcasted on all infra-red senders constantly.
2.1.6 Nexus The Nexus system [NGS+01] aims at providing a general framework for mobile and location-based computing and is developed at Universität Stuttgart since 1999. Rather than creating a specific location-based system having its own isolated data holding, as done by the systems mentioned above, Nexus focuses on integrating single systems into one open platform. This way, different systems can share their data and even communicate with each other. Thus, Nexus can be seen as a middleware connecting providers and consumers of spatial information. The vision of the Nexus project is an open infrastructure similar to the WWW, where everybody can publish spatial information and offer spatial services to the public. Nexus organqizes the data using an extendable data model, the Augmented World Model, which consists of a large class hierarchy. The architecture of the Nexus platform is shown in figure 2.6.
Application 1 Application 2 ... Application l Application layer
Area Service Nexus Node 1 ... Nexus Node m Federation layer Register
Context Context Context ... Context Service layer Server 1 Server 2 Server 3 Server n
Figure 2.6: The architecture of the Nexus platform (based on [NGS+01])
The Nexus platform integrates different data providers, so-called context servers, into the federation. A context server registers at the area service register supplying the area the server covers. In order to access the data of the context servers, a location-based application only queries the federation. The federation then decides, which context servers need to be queried in order to get the best possible result. The federation subsequently queries the context servers and combines the query results to a single set of data. Duplicates are removed and it is attempted to complete missing information. Finally, the set of combined data is returned to the application. In addition to real-world spatial data, Nexus also provides virtual data following the concept of an augmented world. So-called virtual information towers bind virtual information objects (e. g., web pages) to locations of the real world. For instance, the menu of a restaurant could be placed at a virtual information tower near the restaurant and people walking along could access it.
2.1.7 Nokia Mobile Search Nokia Mobile Search is a unified search application for mobile phones introduced in 2005. Mobile Search is able to search local data, including e-mails, text messages and calendar entries, as well as information from the Internet. For Internet-based data, Mobile Search integrates data from third party services. The data providers depend on the user’s country and language. In contrast to the Nexus platform, which integrates all data sources before transmitting a query result to the user, Mobile Search does the integration of the different data providers on the user’s device. Using the “local search” feature, the user can find and directly contact local services like restaurants and shops, as shown in figure 2.7.
17 CHAPTER 2. RELATED WORK
Figure 2.7: Nokia Mobile Search looking for “Pizza” in London
Apart from being able to select the data providers for the current country automatically (“media roaming”), Mobile Search is not location-based in its present state. As seen in figure 2.7, Mobile Search requires the user to enter the search location manually. However, as phones are increasingly appearing to be equipped with a GPS device, like the Nokia N95 introduced in 2007, it is only a matter of time that Mobile Search will use the GPS.
2.1.8 Maemo Mapper Maemo Mapper is a relatively simple application for browsing maps of the earth and runs on the Nokia Internet Tablets. In contrast to the systems introduced above, Maemo Mapper does not have a scientific background but was started as an open source project in 2005. The type of application is not new either, however Maemo Mapper is one of the most popular applications for the Nokia Internet Tablets and enjoys a large user base.
Figure 2.8: The Maemo Mapper application showing a satellite-based map
Maemo Mapper does not provide any map data by itself, but it supports downloading maps from different map providers on the Internet, including Google Maps. Maps of a certain area can be downloaded manually by supplying the respective coordinates and the desired zoom level. This is useful if the user intends to take the device along without continuous Internet access. However, maps can also be downloaded automatically on demand as the user browses a certain area. This causes a very fluent and interactive user experience, as it seems like the whole map data
18 2.1. LOCATION-BASED MOBILE APPLICATIONS was stored locally. A screenshot of Maemo Mapper displaying a map from Microsoft Virtual Earth is shown in figure 2.8. While one can use Maemo Mapper to browse maps, the feature that makes it location-based is its ability to connect to a Bluetooth GPS device. This way, the current position can be marked in the map and the map can be navigated to the current position. It is possible to record tracks while moving and store them to a file. As tracks have a timestamp associated with every waypoint, the user’s movement history can be documented this way. Moreover, routes can be imported from GPX files and to a certain extent used as driving directions for navigation purposes. However, neither textual nor spoken driving directions are supported. As an additional feature Maemo Mapper supports points of interest (POIs). The POIs are stored locally and there is currently no possibility to download or share the POIs. So effectively the user has to create the database containing POIs himself and enter the points manually.
2.1.9 Navicore In cooperation with Nokia, Navicore Ltd. developed a commercial navigation software for the Nokia Internet Tablets in 2006. It can be purchased as a bundle including a Nokia LD-3W Bluetooth GPS module, a memory card to store map data, a car power charger and a car holder for the Internet Tablet. Although it is claimed that Navicore could be used, e. g., on a bike as well, the intention is to turn the Internet Tablet into a feature-complete car navigation device.
Figure 2.9: The Navicore application running on a Nokia N800 (screenshot)
As displayed in figure 2.9, Navicore usually operates in full-screen mode and does not look any different from other car navigation systems. Also the features provided by Navicore are roughly the same as specialized car navigation systems typically provide these days: Navicore gives both clear visual and spoken driving directions, in order not to draw off the driver’s attention. It is possible to store favourite places and addresses, so that they do not need to be entered repeatedly. A large database of POIs, like petrol stations, local attractions, etc., is included and current traffic information can be retrieved via the Internet. The map data is stored locally on the Internet Tablet’s removable memory card, thus in contrast to Maemo Mapper (in auto-download mode) no constant Internet access is required. The POIs are stored locally as well, a large data set is included in Navicore. It is not possible to define own POIs on the Internet Tablet, however a tool is available for editing the POI database on a desktop computer.
2.1.10 Helsinki public transport The public transport carrier in the city of Helsinki, HKL, established broadband connectivity to some of its vehicles as a test operation in 2007 [Leh07]. In order to provide WLAN Internet access for passengers, 26 buses and trams were equipped with a Flash-OFDM uplink and a WLAN access point. Moreover, each vehicle also bears a GPS receiver and transmits the current position to a central server. On top of this communication platform, which the
19 CHAPTER 2. RELATED WORK passengers can use for other purposes as well, an information system was built, which is capable of showing the next stops and available bus and tram connections at these stops, including the waiting time (see figure 2.10). The system is put into practice as a web application, which the users access with their private devices.
Figure 2.10: Public transport passenger information system [Leh07]
In addition to that, “Ajoneuvot kartalla”, a mapping mashup, was created combining a map from Google Maps with the position data of the vehicles. The Ajoneuvot kartalla retrieves the positions from the central server once per second using asynchronous HTTP requests, and updates the map accordingly. This way, one can actually see the vehicles moving in real-time on the web page, which is especially impressive when the map is set to display satellite images as shown in figure 2.1.10.
Figure 2.11: “HKL Ajoneuvot kartalla” showing busses and trams in real-time on a Google Map
Albeit in test operation, Ajoneuvot kartalla is publicly available on the Internet1. However naturally, it is more useful when accessed while on the go, as it graphically shows where the user is travelling as well as where connecting vehicles are. Also walking to a bus stop a user can find out, whether the bus is late or whether it might be a good idea to run. In a sense, Ajoneuvot kartalla is the perfect application for devices like the Nokia Internet Tablets. The mashup web page is too big for a mobile phone’s screen and it is not very practical to walk with an open laptop, either. But with a connected device somewhere between phone and laptop a great user benefit is created.
1http://research.wspgroup.fi/hklajoneuvot (accessed March 2007)
20 2.2. MASHUPS
2.1.11 Conclusion The popularity of applications like Maemo Mapper and car navigation systems like Navicore proves, that there is a wide interest in location-based mobile applications also outside the scientific world and that non-research systems are slowly appearing on the scene. Looking at the systems introduced in the sections above and summarized in table 2.1, some requirements for location-based mobile applications can be observed: Remote data. There is a clear advantage to keep the data remote. Cyberguide uses local data due to the lack of sufficient mobile connectivity at the time it was built. [LKAA96] however states that this is not the way it should be done. The GUIDE system is able to provide dynamic data and keep the information up to date, because all information is provided remotely. Data integration and sharing. [LKAA96] also mentions that much of the data provided by the Cyberguide system was to be found on the WWW as well. So the system could have benefited from integrating the WWW. Moreover, the fact that most of the systems introduced above use a central server is merely because the systems are limited to a certain area, such as a university campus in REAL. As stated in [HKL+99], a production system needs to be scalable for a huge number of users and information. Also the large amount of information required to make a location-based mobile application useful will have to be provided by several parties. A system like the Nexus platform or Mobile Search will have to integrate the data. Several ways of positioning. As long as there is no unified way of positioning, a location-based mobile system will have to make use of several positioning systems and smoothly integrate them in order to work always. With the exceptions of REAL, which does exactly do this, and GUIDE, which does not locate the user very accurately, all other systems introduced here work only either indoors or outdoors. This aspect is not considered throughout this thesis, which will use GPS for positioning, although it would be theoretically possible to locate a Nokia Internet Tablet, e. g., based on the current WLAN access point as well. It is however the author’s own experience that the user value is clearly reduced when the GPS receiver has to be placed near a window or will not work indoors at all.
System Task Positioning Data Notable Active Badge telephone relay IR (remote) locating people PARCTAB office assistant IR remote general purpose Cyberguide visitor guide IR or GPS local modular architecture GUIDE tourist guide cell-based remote dynamic data REAL pedestrian navigation IR and GPS remote wide use of context Nexus platform generic remote data integration Mobile Search general search GSM network remote and local data providers Maemo Mapper map browsing GPS or none remote and local Internet Tablet Navicore (car) navigation GPS local Internet Tablet HKL Ajoneuvot public transport information GPS remote mashup
Table 2.1: Summary of the location-based applications introduced above
2.2 Mashups
As introduced in section 1.1.1, mashups are a hallmark of second generation of Web applications informally known as Web 2.0 [Mer06]. This section first introduces the term Web 2.0. Then, it is explained how mashups are built and an overview is given of the technologies used for building mashups.
2.2.1 Web 2.0 The term “Web 2.0”, introduced by Tim O’Reilly in [O’R05], is arguable for a number of reasons and has been discussed intensively. Failing to give an airtight definition of the term, Tim O’Reilly merely refers to recent trends in the WWW and provides examples such as wikis, blogging, syndication and pages like Wikipedia2 and Flickr3.
2http://www.wikipedia.org (accessed July 23, 2007) 3http://www.flickr.com (accessed July 23, 2007)
21 CHAPTER 2. RELATED WORK
Attempting to extract the quintessence from the hyped buzzword “Web 2.0” [Tre06] identifies those recent trends to be interactivity, social networking, tagging and “some aspects of Web services”. These are discussed in more detail in the following sections.
Interactivity By the term “interactivity” [Tre06] means what Tim O’Reilly calls “Rich User Experiences”. Both mainly refer to AJAX, which stands for “Asynchronous JavaScript and XML” (see section 2.2.3). Being another hype by itself, AJAX allows web pages to “feel” much more like a desktop application than a static HTML page does. The most famous example these days is Google Maps4. Very much like in Google Earth, a desktop application for browsing maps and satellite pictures of the earth, the user can interact with the Google Maps application, by zooming and dragging around the map to show a certain position. This is a significant improvement in usability compared to static map pages which use hyperlinks to navigate through the map requiring a page reload for each user interaction. Using AJAX, Google Maps is able to load additional data in the background without having to rebuild the entire page.
Social networking Social networking means constructing a graph of people being related by friendship, family, business, common interest and the like. Using a service such as Friendster5, LinkedIn6, facebook7 or the German Studiverzeichnis8 it is not only possible to keep track of former schoolmates. But for example when looking for a job at a certain company, social networking might enable to find a friend who has a friend whose wife works for that company. Not at all being a technology, Tim O’Reilly hardly mentions social networking. However, social networking is a type of application that essentially depends on its users. This matches well what Tim O’Reilly calls “Users Add Value” in his list of Web 2.0 design patterns, although he rather refers to wikis and blogs.
Tagging Tagging is a very simple technique to categorize arbitrary items. Users associate keywords, tags, which are in fact nothing but bare text strings, with those items to create lists of related items. Examples include the photo publishing website Flickr, where users can tag their own and other people’s images, and the bookmarking service del.icio.us9, where users keep and tag URLs. The categories supported by most blog software and wikis can also be considered tagging. By tagging all kinds of items on the Internet, the users create searchable databases which can be used for information retrieval. By associating metadata to objects, tagging is an extremely lightweight effort to achieve what the Semantic Web is heading for (see section 2.2.3). The sheer simplicity of the tags introduces a number of serious flaws like ambiguity of tags and even problems with case sensitivity. Tags are personal and with the absence of ontologies and even standards of any kind, tagging does not provide any possibility for machine reasoning or consistent indexing. But with semantic web technologies like ontologies, RDF and OWL being far beyond the horizon of the average user, tagging is a concept simple enough to be understood and actually used.
Some aspects of web services Nowadays, there’s a lot of talk about Web 2.0, web mashups, AJAX, etc., which in my mind are all facets of the same phenomenon: that information and presentation are being separated in ways that allow for novel forms of reuse. [Kuw05]
What [Kuw05] describes is essentially what web services are about. Quoting Tim O’Reilly’s list of Web 2.0 design patterns, Web 2.0 applications are built of a network of cooperating data services. Therefore, a Web 2.0 application should offer web services interfaces and content syndication, and re-use the data services of others. This describes the trend of many websites providing open APIs for the public to use (often within certain licence constraints).
4http://maps.google.com (accessed July 23, 2007) 5http://www.friendster.com (accessed July 23, 2007) 6http://www.linkedin.com (accessed July 23, 2007) 7http://www.facebook.com (accessed July 23, 2007) 8http://www.studivz.net (accessed July 23, 2007) 9http://del.icio.us (accessed July 23, 2007)
22 2.2. MASHUPS
To some extent, an AJAX program can be considered a client of web services, because it uses the web to fetch additional XML data. This also and especially applies to mashups, even to those mashups which do not use AJAX but server-sided scripting.
Criticism What is most criticised about the term “Web 2.0” is that it lacks a definition. Indeed so many contrary descriptions of “Web 2.0” exist, that it is even claimed it was nothing but a marketing buzzword without any meaning. Moreover, the name indicates a concrete product with a version number, as if Web 2.0 was a replacement of “Web 1.0”. As the “old” WWW has obviously not been replaced, the question could be, whether there are at least any significant technical innovations. However, this is not the case, as most aspects of Web 2.0 are older than the term. The ideas of AJAX and related technologies exist since 1998, when Microsoft equipped Internet Explorer 4.0 with the “remote scripting component”. Social Networking has been possible to some extent before, for instance with instant message services like ICQ. Besides, the basic idea of the WWW was collaboration when it was created in 1989. Web Services and open APIs are much older, too. Amazon.com, for instance, opened its API to the public in 2002. So it is obvious that Web 2.0 does not come up with new technology but utilizes the “Web 1.0”. What might be new is that these technologies are used more widely and more consequently than before. [Gra05] expresses this by stating that Web 2.0 means “using the web the way it’s meant to be used”.
2.2.2 General mashup architecture The general architecture of a mashup comprises three logically and physically disjoint components, as illustrated in figure 2.12.
Data Provider
HTTP
Web Browser HTTP Mashup Site HTTP Data Provider
HTTP
HTTP Data Provider
Figure 2.12: General architecture of a mashup
The data is accessed from third party data providers, which expose their data through web-protocols such as REST, Web Services (SOAP) and RSS/Atom (all described below) and might not even know about the mashup. In case a data provider does not expose any data in such an easily machine-readable way, it is possible, though cumbersome, to parse the data provider’s HTML pages and extract the desired information from there. This technique is called screen scraping. The mashup is created on the mashup site. This is where the mashup is hosted and the mashup logic resides. However, it is not necessarily where the mashup logic is executed. Mashups can be built like conventional web applications using server-sided dynamic content generation technologies such as Java servlets, CGI, PHP, ASP, etc. In this case the mashup site assembles the different data sources into one integrated web page and serves it to the client’s web browser. Another way of creating a mashup is to combine the data only in the client’s browser. This is indicated by the dashed line in figure 2.12. In that case the mashup site serves a web page containing JavaScript code to the client. The JavaScript program is executed by the browser and fetches and integrates the data from the data providers. For fetching the data, usually the XMLHttpRequest JavaScript object is used (see section 2.2.3), which may only connect to the same server from which the web page was downloaded. Thus, either the data providers need to be on the same host as the mashup site, which in a way compromises the mashup architecture, or advanced hacks, such as hidden
23 CHAPTER 2. RELATED WORK
In case of a mapping mashup, as introduced in section 1.1.1, one of the data providers is a map service like Google Maps. These map services are usually used in the JavaScript way, i. e., the mashup site includes JavaScript code from the server of the map service into the HTML code of the mashup.
2.2.3 Technological building blocks AJAX AJAX, which is short for “Asynchronous JavaScript and XML”, means using JavaScript, XML, the document object model API of the web browser, HTML and CSS together in order to load and present content asynchronously on an HTML page. Thus AJAX is not a technology by itself, but a pattern of using several technologies together. The goal is to create a smooth and cohesive user experience. This is achieved by loading the HTML page once and further exchanging only small amounts of data between the server and the user’s web browser—rather than reloading the whole HTML page over and over on every user interaction. Whereas user interaction in a conventional web application is handled with HTML links and forms, causing a page reload, an AJAX-based web application calls JavaScript code on user interaction. If additional data is required for fulfilling the user’s needs, the data is fetched from the web server using the XMLHttpRequest JavaScript object, which loads the data in the background asynchronously. The data is often encoded in an XML-based format, but other formats like JSON are equally possible. On completion of the data transfer, the JavaScript code modifies the document of the browser using the document model API (DOM). An often-cited example for a web page which benefits from AJAX is Google Maps, as explained in section 2.2.1. Loading required map images in the background gives Google Maps a huge gain in usability. Another nice example is the HKL Ajoneuvot mashup introduced in section 2.1.10. In addition to using Google Maps, the mashup fetches the positions of busses and trams once per second from the central server using the XMLHttpRequest object and updates the positions of the vehicles on the map accordingly. With the HTML page refreshing itself periodically, a similar effect would have been possible without AJAX too, but considering the reload times of all images (despite caching) the user experience would not be nearly as smooth as the AJAX implementation.
SOAP and REST Both SOAP and REST are platform neutral mechanisms for communicating with remote services [Mer06]. As part of the service-oriented architecture (SOA) paradigm, clients can use SOAP and REST to interact with remote services. They do not need to know any details about the underlying platform, because interaction with a service is solely based on messages. Many data providers offer an API based on SOAP or REST, in order to make the data easily accessible.
SOAP is a fundamental technology of the Web Services paradigm. SOAP messages are serialized into XML documents in order make them platform independent. SOAP APIs for Web Services are described by WSDL documents, which define interaction with the service, i. e., what operations the service offers, the accepted message format and how to address the service. Typically, SOAP messages are transported via HTTP.
REST stands for “Representational State Transfer” [Fie00] and is a much simpler approach for communicating with remote services. In REST-based services, every data object is identified by a URI. The data objects are retrieved, updated, created and deleted using the HTTP request methods GET, POST, PUT and DELETE, respectively. As an example, a REST-based photo management site could expose a (possibly XML-encoded) list of a user’s photos via the URI http://www.photosite.com/user123/photos/ and a single image could be accessible via http://www.photosite.com/user123/photos/photo123. Sending the HTTP request DELETE /user123/photos/photo123 to the webserver at www.photosite.com would consequently delete the picture. However in practice, many APIs claiming to be “RESTful” include a method name in the URIs rather than fully using HTTP request methods. The API offered by the bookmarks sharing site del.icio.us, for instance, lets an appropriately authenticated user delete a bookmark by sending an HTTP GET request containing the URI of the bookmark as a parameter: https://api.del.icio.us/v1/posts/delete?uri=
RSS and Atom RSS and Atom are both XML-based web feed formats to publish frequently updated digital content (RSS is actually a family of such formats as several incompatible versions exist). A data provider can publish a web feed for its data.
24 2.3. GENERIC MASHUP PLATFORMS
Then a client can then check the web feed for new data regularly and react to it, without having to check the actual data for changes over and over. Web feeds are widely used by news services and blogs but have also been adopted for changelogs of CVS commits and even radio programs. For mashups aggregating such data (especially news and blogs) web feeds are very useful, as they provide a machine-readable representation of the data, augmented with metadata such as the publication date.
Screen scraping Screen scraping is the process to parse and analyse content automatically that was originally written for human consumption in order to obtain data structures that can be used and manipulated programmatically. Screen scraping is used by some mashups in order to obtain data from a data provider which does not offer the data in any other way. Screen scraping is not very robust; as soon as the data provider changes the design, i. e., the presentation of the data, the screen scraping code is unlikely to remain functional. Besides, it is cumbersome and expensive to implement, as the data provider’s website needs to be reverse engineered and a specific parser needs to be written for every website. But in some cases screen scraping is the only way to obtain data as it can be applied to every (HTML-based) website.
RDF The inelegant aspects of screen scraping are directly traceable to the fact that content created for human consumption is not suitable for machine consumption. The Semantic Web [BLHL01], which envisions the existing WWW being augmented with machine-readable metadata, has come up with a family of specifications collectively known as the Resource Description Framework (RDF). With RDF, relationships between data objects can be described in subject-predicate-object triples (“subject s has relationship r with object o”). Combining a data model with a graph of such relationships, ontologies can be created, which are hierarchical structure of knowledge that can be searched and formally reasoned about. Whereas currently the Semantic Web is not widely present in the WWW, RDF data has been adopted by a number of domains including social networking and syndication. Earlier versions of RSS (described above) were based on RDF.
2.3 Generic mashup platforms
2.3.1 Yahoo! Pipes Yahoo! Pipes10 is a web application for building mashups that aggregate Web feeds and other services. Heavily using AJAX, Yahoo! Pipes offers a rich user interface, with which a mashup can be created extremely easily using drag and drop. A pipe is a series of components which are connected in a pipe-and-filter way, similar to a Unix pipe. The data model of Yahoo! Pipes is based on RSS items. RSS items are fetched by one or more source components and processed by other components of the pipe until they reach the “pipe output” component. Having created a pipe, the user stores it on Yahoo!’s server, exposing the pipe to the public. Running the pipe lists all resulting RSS items on a web page and the output of the pipe is also accessible in various machine readable formats like RSS and JSON. A pipe is entirely executed on the server, i. e., despite the extreme use of AJAX while creating a pipe, running a pipe is done in the way of a traditional web application. Figure 2.13 shows a simple Yahoo! pipe which fetches the RSS feed from the German news service www. tagesschau.de using a “fetch” source component. A user input field asks the user for the number of news items to show and a “truncate” component restricts the RSS items accordingly. Afterwards a “babelfish” component translates the German news items into English using AltaVista’s Babelfish translation service11. The output of the babelfish component reaches the “pipe output” component and is presented as the result of the pipe. In its current state Yahoo! Pipes is not suitable for creating arbitrary mashups as it is restricted to RSS feed items, which the pipe components modify and augment. For example it would not be possible to build a mashup like Chicago Crime (see section 1.1.1) as the Chicago Police Department does not offer an RSS feed containing the crime reports. In addition to that, the output of Yahoo! Pipes is also an RSS feed, i. e., functionality like putting the crime reports on a map must me implemented in yet another hard-coded mashup, which utilizes the pipe as a content provider.
10http://pipes.yahoo.com (accessed July 23, 2007) 11http://babelfish.altavista.com/ (accessed July 23, 2007)
25 CHAPTER 2. RELATED WORK
Figure 2.13: Structure and result of a Yahoo! pipe translating German news to English (screenshots)
2.3.2 Piggy Bank Piggy Bank [HMK05] is an extension to the Firefox web browser that extracts information from existing web pages and stores it in RDF format. Piggy Bank was developed at the Massachusetts Institute of Technology in 2005 and is freely available. The motivation behind Piggy Bank is to promote Semantic Web technologies (namely RDF) by integrating a user-friendly Semantic Web tool into an existing and widely used web browser. With very few mouse clicks Piggy Bank lets the user extract RDF data from web pages, save the data locally and upload it to a so-called semantic bank in order to share it with others. Piggy Bank uses a local web server offering a web application which lets the user work with the RDF data stored locally. As the data is separated from its representation, a unified view of the data is possible, regardless of its origin. The data can be categorized using tags, the data can be searched and sorted by different criteria (see figure 2.14) and viewed in different ways. If the data contains location information, the data can be displayed on a Google map, if temporal information is found, it can be shown on a time line. If a web page links to RDF data, that data is simply retrieved. Otherwise, Piggy Bank uses screen scraping in order to extract information from a web page. Screen scrapers for different web pages can be written and installed into Piggy Bank. As Piggy Bank operates as a browser extension, the screen scrapers can access the document object model (DOM) tree of the web browser. By examining the DOM tree rather than parsing the code of the web page, screen scraping also works for web pages which make heavy use of JavaScript. Besides, screen scrapers are more robust to design changes of the web page this way. Although Piggy Bank is called a “mashup platform” on its website, the intension behind Piggy Bank is similar but not exactly the same as the one behind mashups. A mashup integrates many sources of data into one new presentation for the user, whereas Piggy Bank integrates many sources of data into one database. Based on this database, the user himself can create new presentations. However, the presentation features offered by Piggy Bank are currently not very elaborate.
2.3.3 Mash-o-Matic Mash-o-Matic [MMD06] is a tool to create mapping mashups from all kinds of source documents in formats including HTML, Microsoft Word and PDF. It was developed at Portland State University in 2006. Mash-o-Matic uses a concept called superimposed information in order to superimpose metadata on unstructured source documents, thus creating a structured database. This structured database is queried in order to generate an output document understood by Mash-o-Matic. Processing the output document Mash-o-Matic automatically creates a mashup displaying a number of markers on a map and a caption. Figure 2.15 shows a mashup of Portland State University campus created by Mash-o-Matic. The structured database is made up by a number of items, which can be recursively structured into groups. An item can be connected to a mark, which is a reference to a fragment in a source document. The mark abstraction is defined and implemented in the Superimposed Pluggable Architecture for Contexts and Excepts (SPARCE)
26 2.3. GENERIC MASHUP PLATFORMS
Figure 2.14: Piggy Bank browsing and searching the saved RDF data [HMK05]
Figure 2.15: A mashup of Portland State University campus created by Mash-o-Matic [Por06]
27 CHAPTER 2. RELATED WORK
[MMDB04], a middleware for managing superimposed information. One way to create such marks, i. e., to import source data, is to select a fragment of a source document with the mouse. Technically this is done using plugins to the applications handling the source documents, such as Microsoft Internet Explorer, Microsoft Word, and Adobe Acrobat. However, marks can be created programmatically as well by using the SPARCE API. This way, screen
scrapers can be written to create marks or data might even be imported from the API of a data provider.
h
M
asp
u