You are on page 1of 5

Scaling the Wall: Experiences Adapting a Semantic Web Application to Utilize Social Networks on Mobile Devices

Evan W. Patton
Rensselaer Polytechnic Institute th 110 8 Street Troy, NY, USA, 12180 Telephone number, incl. country code

Deborah L. McGuinness
Rensselaer Polytechnic Institute th 110 8 Street Troy, NY, USA, 12180 Telephone number, incl. country code ABSTRACT
In this paper, we describe a mobile version of an existing wine recommendation system [7,9] powered by semantic technologies engineered to run on the Apple iPhone platform. As part of this conversion, interaction with social tools including Facebook and Twitter has been integrated to provide a rich user experience and to provide mechanisms for identifying recommendation candidates based on friend relationships. We also describe how the agent takes advantage of linked data to expand its knowledge base. Lastly, we discuss problems facing developers interested in constructing mobile equivalents to existing desktop semantic recommenders and how this could be expanded to other social collaborative problem spaces.
given our experiences.

The Wine Agent has existed as a semantic recommender system for almost two decades, with the original ontology appearing in CLASSIC [4] (after a translation from an earlier recommender done by the author in graduate school) and reused as an exemplar in [10]. It was then rewritten in the DARPA Agent Markup Language (DAML) for the original KSL Wine Agent [7], and finally in the Web Ontology Language (OWL), both as part of the OWL Reference [4] and the Tetherless World Wine Agent [9]. The KSL Wine Agent computed all entailments from the underlying knowledge base and provided listings of dishes under headings for users to choose from and provided a recommendation from a fixed set. The Tetherless World Wine Agent took a more open approach to managing recommendations by providing a wiki site where individuals could obtain accounts and add custom recommendations to the knowledge base that were later aggregated using Pellet [12], a reasoner for computing OWL-DL entailments, for displaying results to the user. The mobile version of the Wine Agent presented in this paper provides many different atomic components and allows users to construct classes of objects to be used as part of their recommendations, making it a much more flexible tool for users to use to generate content. The Mobile Wine Agent is a combination of many different technologies that have been rolled into a single application to demonstrate the power that having a common semantic infrastructure can bring to developers. Because of this, many of its technologies have been demonstrated in one form or another previously, but the research community has done little to integrate these many different technologies together. The Semantic eWallet [5], for example, combined location information from mobile devices with rules described using an ontology built with OWL-Lite, a small, computationally feasible subset of OWL [8,11], in order to make decisions to make user data available to other users. The most advanced mobile application to date, IYOUIT [3], was released in the European Union and was used to take mobile phone locations of the user, combine the location data with events or pictures described and classified using an event ontology, and then pushing that information to the user and select social networks within the application. Although it made use of some reusable components including the Friend-of-a-Friend (FOAF) and Semantically-Interlinked Online Communities (SIOC) vocabularies, the developers fixed the ontology used for modeling the relationships in the application. Due to the limitations of the

Semantic Web, social networks, mobile phones, semantic collaboration, reasoning

The Tetherless World Mobile Wine Agent is an adaptation of previous semantic wine recommendation systems developed by the Tetherless World Constellation at Rensselaer Polytechnic Institute [9] and the Knowledge Systems Laboratory (KSL) at Stanford University [7]. The goal of these previous recommenders was to recommend a particular description of wine and provide suggested wines matching the description given a meal description. The mobile version of this recommender that we have built includes a richer vocabulary and provides a more flexible interface for end users. It also includes the ability to include a users personal preferences, social connections to other Wine Agent users, and linked data on the Semantic Web to enrich the user experience. Location data provided by the phone provide the application with a way of identifying restaurants and recognizing when the user is at a planned social event (via Facebook). The benefits of bringing these technologies together and integrating them come at the cost of investing time to learn their capabilities and appropriately match them together, so we discuss our experiences with using these technologies in order to provide a basis for other researchers and developers to use similar methods in their software. Lastly, we will discuss these technologies and this work in relation to the concept of social machines [6] and how the Semantic Web community might address these problems

Copyright is held by the authors. Web Science Conf. 2010, April 26-27, 2010, Raleigh, NC, USA.

hardware platform, many of the interactions with the system actually occur through a web portal, with the mobile device acting as a new feed for the user. Accessing data stored within social networks is often difficult given that each network has a unique application-programming interface (API) for accessing its data, if the data is even available to begin with. One approach to solving this problem has been suggested by Battle and Benson [1], by providing an HTTP-based interface to common social networks and other communities including customer reviews and discussion boards on However, since this technology does not support authorization of users, it was not useful to the present work.

One of the primary benefits of mobile applications is availability. Because mobile devices have small form factors, many individuals have them on their person or easily within reach, much more so than a desktop or a laptop computer. Thus, an application like the Wine Agent is more accessible in situations it was intended to be used for such as planning dinners or picking out the perfect bottle at the local wine store. Another key technology that comes with the mobility of the platform is GPS and location services. With the ability to identify the users current location, the Wine Agent can check online to see if there are any nearby restaurants, and within a certain distance (currently 10 meters) automatically choose a restaurant. If no nearby restaurant has menu and wine list data available, or if the application is unsure about the users location given the current resolution reported by the operating system, it will display a map with the approximate location of the user (see Figure 1). This allows the agent to download additional class, property, and instance data to augment its existing knowledge without having to preload all of the data on the phone (see section 6 for more details). Figure 1. The Wine Agent will attempt to use the current location of the user to select a restaurant. If no restaurant is within proximity to the user, it will display a map of the area so the user can choose the appropriate restaurant.

3. PLATFORM LIMITATIONS 3.1 Power Consumption

Developers of mobile applications face a number of restrictions that are less common on desktop and laptop computers. Desktops, for example, have an unlimited power supply from the perspective of the developer, and so the amount of power needed by the system to perform a particular set of computations is not necessarily a focus of the algorithm design. Laptops do have this limitation, but users often have very easy methods of checking the amount of battery life remaining without interrupting the computation and can often save the state of an application without much trouble if they recognize that such a computation cannot complete given the battery constraint. On the iPhone, however, such an option is not available to the user. Advanced programs that monitor battery lifetime are available, but switching to one will prevent all other programs from running, thus stopping the agent prematurely. Therefore, it is worthwhile to develop an agent that performs computations quickly to reduce power consumption on the device and to maximize the amount of time the user can spend interacting with the application.

3.2 Processing Power

Microprocessors in mobile devices have the processing power of desktop machines of roughly one decade ago. Therefore, time complexity of algorithms in the agent is also of critical importance. This is particularly true when reasoning is used to make decisions about what information is available to the user as part of the applications interface. To decrease the response time of the interface, we trade space complexity for time complexity, caching results of operations and using hash tables to provide quick access to underlying triples. Resource Description Framework Schema (RDFS) entailments are computed during the data loading process, as are the applications of OWL restrictions and intersections. Searching for recommendations is offloaded to a remote server to reduce power consumption of the application as discussed previously.

3.3 Memory Constraints

Lastly, the iPhone has a user space limit of memory of around 80 MB once the operating system and user interface components have been accounted for. Because of this, care must be taken to balance how much information should be stored by the application for immediate access and how much should be inferred at run-time. Virtual memory is also done at the application level and not at the operating system level, forcing developers to invest more time in developing efficient methods of partitioning memory rather than solving interesting problems. As hardware becomes more advanced though, this should become less of a problem.

semantic content attached to messages that has been serialized using the JavaScript Object Notation (JSON), and import it for later reasoning. The application will also prioritize recommendations, restaurants, wines, and meals that friends of the user have marked as having liked, or penalize them if they disliked those items. Users can also share their preferences with friends in a manner similar to those in past works [5,3].

5.1.2 Utilizing Friend Lists

Users can also access friend lists, allowing them to share content with specialized groups. For example, someone planning a dinner for a corporate client may want to share preference information with privileged co-workers who are preparing the event whereas a wine enthusiast may want to share a favorite wine with a small group of other local aficionados for wine tastings. These tools make it possible to interact with varied groups of individuals instead of forcing the user to interact with each user individually.

5.1.3 Events
More often than not, people looking for wine recommendations do so because they are planning a special event where a food-wine pairing provides a certain ambiance. The Wine Agent provides an interface where Facebook users can view all events that they have marked as attending and pull down information related to that event (see Figure 2). We have supplied an option to the user to share his properties with the owner of the event. This feature helps facilitate collaboration about events over the social web while providing a semantic underpinning to the decisions being made.

5.2 Twitter
Due to Twitters simplified interaction model, it does not provide as much ability to structure data as Facebook does. However, we do take advantage of Twitter as a platform for individuals to share content of interest with other users both within and without the Wine Agent. When users create tweets about data from the Wine Agent, they are given buttons that allow them to automatically insert links to instance data. When users browse this data from a non-iPhone or iPod touch device, the link will redirect to an HTML page or use XSLT to transform the underlying content into a visual page for humans. Otherwise, it will attempt to launch the Wine Agent. The Wine Agent can also read a users Twitter feed and dereference links to find Semantic Web data in a manner similar to the Facebook method outlined above.

Figure 2. Event information from Facebook as seen by the Wine Agent. The user can check the attendee list (see bottom) before making a decision about sharing preferences with the event coordinator.


Facebook provides a rich set of APIs and tools for interacting with users friends through the social network. However, it is not a semantically enabled service that understands any semantically enabled structured data. Data are accessed via SQL-like queries (known as the Facebook Query Language, or FBQL) that may involve multiple queries or joins within a single query. It is up to the developer to provide appropriate meaning to any data structures provided by the API and to map them appropriately to the application. When a user logs into Facebook via the Wine Agent, we establish a link between his Wine Agent account and Facebook account by way of an RDF triple.


One of the primary limitations of the previous incarnations of the Wine Agent was that, while they were all based on semantic technologies, none of them ever took advantage of linked data on the Semantic Web to extend their knowledge bases. Over the last few years, however, the desire to grow a web of linked open data1 has become a primary focus of the Semantic Web community and has opened up a number of research areas. Linked data has the potential to greatly increase the use of the Wine Agent as a tool for providing recommendations. To take advantage of this, the agent will dereference URIs on the web that are made available through the Facebook API or a users Twitter feed in order to find consumable RDF content that contains references to the Wine Agent ontology. For demonstration purposes, we have encoded a number of menus and wine lists from local restaurants into RDF using the Wine Agent ontology

5.1.1 Sharing with Friends

Facebook access allows the application to provide a number of features to the user. Firstly, they can access a list of all their friends in order to publish content to their friends news feeds or walls. The application can also crawl those feeds looking for

See for more information.

level due to the ability for users to interact with one another in a manner that is intuitive. Therefore, it is in the best interest of those involved with the Semantic Web to make it easier to build intuitive applications. With these two points in mind, it would be worthwhile to assemble a collection of extensible APIs to interact with many of todays popular social networking sites for other developers to use. By reducing the amount of effort needed to start accessing the wealth of data, and by integrating Semantic Web technologies into the backbone of these applications, the ability of developers to construct intuitive applications with complex behaviors will be greatly improved.


The current iteration of the Wine Agent is available to interested parties via an ad-hoc distribution system. It has been released internally as a demonstration tool that incorporates OWL reasoning as part of an iPhone application, access to sharing and consuming semantic data through the social web, and locationbased services using GPS, in order to provide a more sophisticated wine recommendation system. The software has not been submitted for approval through the Apple iPhone App Store as of the time of this writing. Please contact the authors for software access.

The Wine Agent is a melting pot for many different technologies grounded in the web of people and the web of data, and combines those many different technologies into an application that connects people, places, and preferences to provide a powerful recommendation tool for both novice and expert wine drinkers. Figure 3. A sample restaurant wine list loaded from a remote URI and rendered by the Wine Agent. In addition to adding new instances, external sources can include properties and classes to augment the ontology. and loaded them onto different servers to simulate the disconnect between the two system. Using the agents crawling capabilities, a user can select a particular restaurant and the agent will download a copy of the menu and wine list and render them (see Figure 3). These lists, in turn, could reference other external entities. A winery, for example, might provide data for the different wines it produces and a restaurant could simply link to those data instead of reproducing them as part of its wine list. However, moving an existing desktop application to a mobile device has many different barriers that need to be overcome by developers. Since mobile phones lack power sources lasting more than a few hours under heavy computational load, developers of semantics-laden applications need to balance computational running time, memory limits, and responsiveness to the user so that users can accomplish their goals quickly. Being aware of power limitations and building better applications will make users more open to running Semantic Web applications, like the Wine Agent, on their devices. We also demonstrated that it is possible to use social networking tools both as data sources and data publishing platforms for other semantic web applications. We provided an example of how to consume linked data made available by other semantic systems. However, for those methods to become more ubiquitous, common frameworks may need to be assembled to reduce development overhead for future programmers.


One apparent problem that arose during the Wine Agents development was the issue of interacting with so many technologies and the amount of effort that went into learning the strengths and weaknesses, and the dos and do nots of each system. If every developer needs to repeat these same mistakes, the amount of wasted time spent doing development toward the next big application that could revolutionize how people socially collaborate over the Web would be great. Therefore, the Web development community as a whole needs to address this issue and build a better solution. The biggest hurdle toward creating social machines for individuals to use to collaborate over the Semantic Web will be breaking down the silos of information that currently exist. Popular sites such as YouTube, Flickr, and Facebook reach this


While the reasoner that drives the Wine Agent supports a rich subset of OWL-DL, the reasoner will be completed and released to the Semantic Web community at large in order to encourage the growth of semantic applications in the mobile space. With the completion of the reasoner, internal testing must be performed and then the entire application will be released through the Apple App Store in order to evaluate how the client-server architecture handles a large number of clients. To take advantage of the ubiquity of the mobile phone, a parallelized version of the reasoner will use the Bluetooth chipset within the device to look for neighboring devices also running the

Wine Agent. The goal of having multiple agents communicating with one another and processing in parallel is to reduce the overall running time to reach a solution, providing better response time and reducing power consumption. Opening up reasoning from a single limited device to many should help benefit developers of other social-collaborative tools that take advantage of the Semantic Web on mobile devices.

[6] Hendler, J., and Berners-Lee, T. From the Semantic Web to

social machines: A research challenge for AI on the World Wide Web. Artificial Intelligence, 174, 2010, Elsevier, 156161.

[7] Hsu, E., and McGuinness, D.L. KSL Wine Agent: Semantic

[1] Battle, R., and Benson, E. Bridging the Semantic Web and
Web 2.0 with Representational State Transfer (REST). Journal of Web Semantics, 6(1), February 2008, 61-69.

Web Testbed Application. In Proceedings of the 16th International Workshop on Description Logics (Rome, Italy, September 2003). Ontology Language Overview, February 2004.

[8] McGuinness, D.L., and van Harmelen, F. OWL Web [9] Michaelis, J., Ding, L., and McGuinness D.L. The TW Wine
Agent: A Social Semantic Web Demo. In Poster and Demonstration track of the 7th International Semantic Web Conference, (Karlsruhe, Germany, October 2008).

[2] Bechhofer, S., van Harmelen, F., Hendler, J., Horrocks, I.,
McGuinness, D.L., Patel-Schneider, P.F., and Stein, L.A. OWL Web Ontology Language Reference, February 2004.

[3] Boehm, S., Koolwaaij, J., Luther, M., Souville, B., Wagner,
M., and Wibbels, M. Introducing IYOUIT. In Proceedings of the 7th Annual International Semantic Web Conference, (Karlsruhe Germany, October 2008), 804-817.

[10] Noy, N.F., and McGuinness, D.L. Ontology Development

101: A Guide to Creating Your First Ontology. Stanford Knowledge Systems Laboratory Technical Report KSL-0105, March 2001.

[4] Brachman, R.J., McGuinness, D.L., Patel-Schneider, P.F.,

Resnick, L.A., & Borgida, A. Living with CLASSIC: When and how to use a KL-ONE-like language. Principles of Semantic Networks: Explorations in the Representation of Knowledge, 401-456.

[11] Patel-Schneider, P.F., Hayes, P., and Horrocks, I. OWL Web

Ontology Language Semantics and Abstract Syntax. W3C, February 2004.

[12] Sirin, B., Parsia, B., Grau, B.C., Kalyanpur, A., and Katz, Y.
Pellet: A practical OWL-DL reasoner. Journal of Web Semantics, 5(2), April 2007, 51-53.

[5] Gandon, F.L., and Sadeh, N.M. A Semantic e-Wallet to

Reconcile Privacy and Context Awareness. In Proceedings of the 2nd International Semantic Web Conference (Sanibel Island FL, October 2003), Springer Berlin, 385-401.