11.07.2015 Views

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 5.2: Message exchange between probe and client - On theleft side is the comp<strong>on</strong>ent thread publishing new data <str<strong>on</strong>g>for</str<strong>on</strong>g>c<strong>on</strong>nected clients. The data is send to the communicati<strong>on</strong>interface that handles all the communicati<strong>on</strong> withthe communicati<strong>on</strong> server. The server itself <str<strong>on</strong>g>for</str<strong>on</strong>g>wards themessage to the client. The communicati<strong>on</strong> interface <strong>on</strong>the client side notifies all observers. Each observer thenchecks the message and processes it if needed.Using Publish / SubscribeThe mechanism behind exchanging the data is using the publish/subscribeparadigm (Eugster et al., 2003). One entity subscribes to a publisher. Thepublisher collects data and <str<strong>on</strong>g>for</str<strong>on</strong>g>wards it to all subscribers. The probe offersservices and publishes their data <strong>on</strong> request. The client can subscribe to sucha service. In c<strong>on</strong>trast to a standard implementati<strong>on</strong> of the publish/subscribeparadigm the publisher also knows the subscriber and vise versa. A comp<strong>on</strong>entthread is not <strong>on</strong>ly acting as a publisher. Each comp<strong>on</strong>ent thread can alsoreceive commands which can change how the data is published. These commandsmay also change the state of a comp<strong>on</strong>ent thread. An example couldbe a comp<strong>on</strong>ent that has several parameters <str<strong>on</strong>g>for</str<strong>on</strong>g> changing the process of filteringthe data presented. The client knows the publisher and can directly sendcommands. Also this can be used to minimize the need of c<strong>on</strong>trol overheadand decrease the delay between sending and receiving a command. Specificcommands are <str<strong>on</strong>g>for</str<strong>on</strong>g>warded to a comp<strong>on</strong>ent thread which can directly use thecommands <str<strong>on</strong>g>for</str<strong>on</strong>g> further processing.To notify entities of incoming messages, the communicati<strong>on</strong> interface is usingthe observer pattern (Freeman et al. (2004), pages 37-78). For the exchange ofdata between the probe and the client, each message created c<strong>on</strong>tains the TAGof the sending element and the TAG of the comp<strong>on</strong>ent that receives the data.A TAG is unique to the system and allows to identify its elements. Whenevera new message is received, the interface notifies its observers. Each elementobserving this interface checks if the message c<strong>on</strong>tains its TAG and then reads22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!