Blog Archives

Inter-Process Communication on Mac – Know How part4(Distributed Notifications)

In  Part 1 of this blog series we discussed about various techniques available for Inter-Process Communication (IPC) on Mac OS X.

As discussed in previous blog  Distributed notifications work as follows :
1. A notification center manages the sending and receiving of notifications. It notifies all observers of notifications meeting specific criteria.
2. The notification information is encapsulated in NSNotification objects. Client objects register themselves with the notification center as observers of specific notifications posted by other objects.
3. When an event occurs, an object posts an appropriate notification to the notification center.

Posting a distributed notification is an expensive operation. The notification gets sent to a system wide server that then distributes it to all the processes that have objects registered for distributed notifications. The latency between posting the notification and the notification’s arrival in another process is unbounded. In fact, if too many notifications are being posted and the server’s queue fills up, notifications can be dropped.

Let’s look at a simple code to send and receive distributed notification. Read the rest of this entry

Inter-Process Communication on Mac – Know How part1

Inter-process communication (IPC) can be defined as set of techniques used for  exchanging  data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods can divided into methods for message passing, synchronization, shared memory, and remote procedure calls (RPC).

Reasons for allowing two processes to communicate with each other may be different :

  • Information sharing
  • Computational speedup
  • Modularity
  • Convenience
  • Privilege separation

In this article we will discuss various techniques available on Mac to accomplish IPC. In the subsequent articles we will see the implementation part for various techniques.
Let’s look at the techniques available for IPC one by one. Read the rest of this entry

%d bloggers like this: