188 Personal Content Experience: Managing Digital Life in the Mobile Age that start with the same string as given in the subscription. As an example, if an application subscribes to “Location” context, any change in “Location:GPS”, “Location:CellID”, and “Location:Name” context objects will be sent to the application. The source uniquely identifi es the creator of the context object (the context producer) who created the context object or changed its value. We recommend that a URI is used as the source string. One provider can produce different types of context objects and any given type of context object can be produced by several producers, but the type and source together uniquely identify any context object. Each context object also has a value. Context Engine handles all values as strings but, again, the real interpretation of the value depends of the semantics of the type. Context Engine maintains some metadata with every context object. Every object has a timestamp that is updated every time the value of the context object is changed. Applications can also add a confi dence value to any context object they create or change. Also, CE maintains a history buffer for every context object, so old context objects can also be retrieved. However, there is no guarantee on how many old objects are stored. For historical reasons, CE takes care of its own metadata, even though its metadata should be in Metadata Engine. 5.7.5.2 Scripts Scripts are small “context-aware applications” that run on behalf of their owning application in the Script Engine component of Context Engine. Each script has a condition that is related to values of one or more context objects. When a condition becomes true, one or more actions are carried out. Actions can include inserting new context objects into the blackboard where all context objects are stored, or sending a notifi cation message to the owner application. There is no restriction on what kind of applications can use scripts. To external applications (those running outside of the mobile device), the scripts are the only way to get access to context objects on the blackboard. Script Engine provides more complex subscription facility to applications than the blackboard. Scripts can be sent over the air in XML format by using facilities in Communications Manager. The script XML specifi cation is available at the MUPE homepage. Applications have a possibility to delegate subscriptions to context objects to Script Engine. If the purpose of an application is to create higher-level context objects, it might be easier to use the script engine rather than Context Engine directly. Of course, as discussed above, for those applications that run on a network outside of the mobile device,
Personal Content Experience Page 211 Page 213