Inter-Process Communication (IPC) in Symbian
In Symbian for IPC there are majorly three mechanisms.
publish and subscribe and
Now we shall understand the publish and subscribe method of IPC.
The publish and subscribe mechanism was created to provide asynchronous multicast event notification, and to allow for connectionless communication between threads.
Basically publish and subscribe is good for notification of state changes and to subscribe to them
Subscribe – to get the changes the system wide properties.
Impose Platform security by protecting properties against malicious manipulation
Publish and subscribe and platform security
From Symbian OS v9 processes are partitioned so that one process cannot interfere with the property
of another process.
Publish and subscribe provides a means to define and publish changes
to system-wide global variables known as ‘‘properties’’.
Changes to the properties can be ‘published to more than one interested subscriber asynchronously.
Properties are data values “ uniquely identified by a 64-bit integer”.
Properties are the only information that must be shared between a publisher and a subscriber
Once a property has been defined, it will persist in the kernel until it is deleted explicitly or the system reboots. The property’s lifetime is not linked to that of the defining thread or process
A property is published by calling Set()API. This api writes a new value atomically to the property, facilitating the access by multiple threads.
Subscribers do not need to know which component is publishing to a property,
But only identity of the property which is of its interest.
Publishers and subscribers do not need any hard connections.
joining and leaving without any connection is possible in Publish and subscribe.
Before accepting a subscription to a property,
1. The security policy is checked which was defined when the property was created initially
2. The subscription request only completes if the check fails or succeeds.
Publish and subscribe IPC mechanism should be used when a component needs
to supply or consume timely and atomic information to or from an unknown number of interested parties, while maintaining loose coupling.
WiFi - on/offflight-mode