[Gpephone-devel] Examing inter-process communication (1) -- signal

Yu Yijun linuxstb at yahoo.com
Mon Mar 26 14:36:14 CEST 2007


Hi,
   
  It is common on the phone device that one process needs to notify other processes that something interesting has happened. e.g., once phone server (which monitors the modem) detects an incoming call, it needs to inform a dialer application that an incoming call has arrived.
   
  Access Hiker application framework uses Notification Manager to handle this type of inter-process communication -- so called "notification". One process can broadcast a notification without knowing who will be the recipients. Any other process can select to register this notification, and once the notification is broadcasted, all registered processes will be notified. 
   
  One thing special here is that each register record (recording which process registers which notification) is permanently stored on the device until it is explicitly un-registered. I.e., if an application registers a notification and then shuts down without un-registering it, this record is kept on the device. And once the corresponding notification happens, this application will be launched and then notified.
   
  DBus provides similar mechanism named signal to deal with this type of inter-process communication. However, when a signal is emitted, only those running processes can receive and handle it (right?).
   
  I am thinking introducing this inter-process communication to the GPE Phone Edition. In the current implementation, one process can also notify other processes that something has happened, however, currently there is no notification register/un-register mechanism and the notification sender hard-codes to which processes it will notify. e.g., the phone server can only notify the dialer application an incoming call. If any other applications want also to be notified an incoming call, the phone server source code has to be modified. 
   
  In my personal opinion, it is ideal to use DBus signal to implement this type of inter-process communication. One problem is that DBus signal can only notify running applications, however, some important signal/notification may need to be delivered to an application no matter whether or not the latter is running. (example?).  Therefore, there should be a mechanism that let applications tell whether or not it need be launched to deal with a signal or just ignore a signal if the app is not running. I have no idea yet.
   
  After implementing the notification/signal mechanism, then we need to define a set of signals on the platform.
   
   
  Regards
  Yu Yijun
   
   
   

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linuxtogo.org/pipermail/gpephone-devel/attachments/20070326/62c0d80c/attachment.htm 


More information about the Gpephone-devel mailing list