atomsmasher

coming soon: end-user reactive behaviors on the web

 

atomsmasher is a framework which allows users to script automatically-triggered reactive behaviors by combining information from multiple, heterogeneous, time-based and static sources of data on the Web. These behaviors can be made robust by supporting multiple redundant sources for each type of knowledge, and context-adaptive by expressing behaviors in terms of simple conditions on dynamic state derived from web-based temporal data (i.e., from ATOM/RSS).

atomsmasher works by facilitating the construction of a single, consolidated world model consisting of an entity database and state model from heterogeneous web data sources This representation is used to drive a rule-based behavior engine built in Javascript that manages efficient evaluation of rule triggers (antecedents) and firings (actions) given the sequential arrival of new information. Behaviors are themselves specified in Javascript as simple conditions and actions over objects in the world model; comparisons operators are provided that retain as similar semantics to standard Javascript operators to make it easy for web developers to transfer existing experience in Javascript towards writing behaviors.

introduction

Despite the ever-increasing quantity of potentially valuable information brought to us by the Web and other channels of digital communication, our limited time and energy necessitates that some be neglected. In this paper, we explore the potential for web-based personal reactive behaviors to help us both cope with this information, and utilize it, saving us time and effort. These behaviors let users specify simple actions for responding to incoming information, leveraging web information sources for increased adaptivity. Some examples are as follows:

  • contextual information such as location – remind me to call my mother when I get home;
  • bridging channels of communication – translating texts send from my phone to Facebook status updates;
  • make my apps schedule aware – filter my e-mails and documents pertaining to my current meeting;
  • queries across multiple sources –find out if any bands I like are playing tonight, and which of my friends that like similar music are free to come.

While programmers could write custom applications to realize each of these behaviors, doing so would require repeatedly solving the same problems a number of times from scratch. Specifically: the transformation of raw data from web APIs, the identification of items of interest within that data, and articulating conditions for action.

AtomsMasher addresses these needs by providing a single, consolidated representation of data aggregated from arbitrary sources on the web, an object relation mapper (ORM) and query language to simplify access to this representation, and a rule engine for efficiently determining when behaviors should be run. This tool is aimed at a similar audience to that of most mashups and end-user automation, the “growing groups of web designers and developers familiar with scripting languages”[1], reducing the barrier to let users “jump in” and specify their behaviors in as simple and efficient a manner as possible, interactively experimenting and debugging as they go along.

system description

AtomsMasher consists of data management components, a programming language interface, and a graphical interface for behavior development and simulation/debugging. In order to simplify installation and access by web developers, AM is deployed as a self-contained Firefox plug-in that can be pulled up with a hotkey as a sidebar or full screen interface (see figure 1). The role of each of the components is described.

Data modeling and rule engine

The “engine” of AM consists of code for data acquisition (fetching, filtering and storage) and behavior management (a rule chainer). The former is responsible for pulling structured information from web data sources (i.e., Atom or RSS feeds and REST-based APIs), and transforming this information into instances of a common, open ontology that can be extended by users. Due to the highly varied information returned in often inconsistent form from Web APIs, entries processed by AM’s generic feed parser are handed over to hand-written feed-specific transformation plug-ins called atom splitters, which are responsible for distilling elements from obtained form into the AM ontology. Once ontology elements have been derived from new feed items, they are persisted in a knowledge base (KB) that is kept locally in the user’s Firefox profile. This KB acts as the world model for evaluating behavior antecedents and actions. Since behaviors can only access instances in the KB, the KB serves the important role of decoupling data sources from use. To reduce the need for users to write splitters, we have constructed a repository where authored splitters can be uploaded for others to use; when new data sources are added, AM checks this repository for new feeds prior to asking the user for help.

AM’s rule engine is modeled on a simple forward-chainer, with AM-specific extensions. To speed up trigger identification, antecedents are compiled into SQL queries that get pushed down into the underlying SQLite engine of the triple- store DB. The chainer keeps track of its history of firings to avoid repeated triggerings with previously fired bindings.

Programming language interface

To maintain familiarity to web programmers, AM extends JavaScript (JS) to provide mechanisms for easily specifying rules and referring to stored entities in the KB. To this end, we combined the roles of a object relation mapper (ORM) with that of a query language to create AM query variables (AMQVs) representing entities in the KB as JS objects, i.e., query sets. Applications of operators to AMQVs evaluate to new AMQVs with expanded or restricted sets of values, representing all non-false values resulting from mapping the operator over each of the items in the original set. The end result is that queries to the KB resemble plain expressions involving JS objects.

Besides query variables, AM maintains a global JS object that functions as a persistent state model that can be driven by new incoming data items. This state model is used to make convenient the tracking of dynamic aspects of the user’s state, such as their location or current activity. The state model is updated whenever a behavior that assigns to the state variable object is fired.

Rule simulation and debugging environment

AM’s UI provides two facilities to help users debug their behaviors. The first, inspired by the Pig pen [3], is behavior simulation, in which AM generates a set of example “situations” for which a particular behavior antecedent would fire, and the resulting action it would take. The second is an easy-to-inspect history of firings for debugging past actions.

Rule creation environment

In addition to its standard JS API interface for users comfortable with writing javascript code, we provide a friendly autocomplete and drop-down-and-select driven interface. This interface is visible below (no sound):

summary

By combining heterogeneous sources of personal and social information available on the web, AtomsMasher enables the construction of rich, context-aware reactive behaviors. In particular, AM demonstrates the simplicity and expressive power gained in deriving a unified data representation from heterogeneous web feeds, and the use of simple language extensions to make these representations natural to web developers already familiar with Javascript. Ongoing work spans two main areas: language design and user interface design. We will identify the most useful types of rules and use them to reconsider rule syntax. Our user interface will draw on work in visual programming and PBD to simplify the initiation, understanding, and scrutability of actions. In addition, we will be investigating the sharing of behaviors (similar to Co-Scripter [2]) as well as privacy and security implications of our work. We are currently planning an in-depth evaluation into the utility and unexpected applications of AM, as well as the usability of our rules and predicates, with a public release in late fall.

try it!

October 20, 2008 update: We are currently scheduled to release Atomsmasher on November 8, 2008. Please check back with us!

Questions? Comments? Send email to plum at csail.mit.edu .

papers:
uist poster
poster paper

authors:
electronic Max
paul andre
david karger
mc schraefel

try it!
coming soon!
beta release 11/8/08

license:
MIT License
(svn access coming soon!)

framework:
personal lifetime
user modeling