Chapter 5: Realizing a Metadata Framework 189 Script Engine is the only way to access the contexts in Context Engine. Using scripts is simple, all scripts having one condition and one or more actions. When the condition becomes true, the actions are carried out. The current version of Script Engine can perform two actions, “set atom” and “notify”. The set atom action creates a new context object that is put onto the blackboard. The notify action creates an event with a message that is sent to the application that owns the script. It is the duty of the application to process the message. For example, Context Engine’s Communications Manager understands messages that are SMS URLs. One script may contain both types of actions. 5.7.5.3 Communications Manager Communication Manager (CM) is the component in Context Engine that is in charge of all communications with external applications and context sources. It is analogous to harvesters and composers in the overall metadata framework. CM can receive requests for reading and writing context objects from external sources using Context Exchange Protocol. For example, if an external application needs to know the location of the user, it can send the query using CEP to Communica- tions Manager. CM fi rst checks if the external party has rights to read the data and if it is allowed, reads the location context object from the blackboard and fi nally sends it back to the requester. External parties can also send scripts to CE. Whenever this kind of script is fi red, that is, it becomes true, the CM is notifi ed by the Script Engine. It is then up to Communications Manager to notify the external party if consid- ered necessary. 5.8 Facing Real Life As a system component, the framework incurs a performance penalty to all applications using it. Since it is intended to manage all content in the mobile device, almost all applications are affected. Obviously, the applications that manage large amounts of content, such as image galleries, phonebooks, and music players, are heavily affected. Unfor- tunately, those are also among the most used applications for many mobile device owners. What follows is that the framework must be implemented carefully so that it performs optimally, by making com- promises where they are needed yet still providing the best possible service.
Personal Content Experience Page 212 Page 214