Cocoa includes two types of notification centers:
-
The
NSNotificationCenter
class manages notifications within a single process. -
The
NSDistributedNotificationCenter
class manages notifications across multiple processes on a single computer.
A notification center delivers notifications to observers synchronously. In other words, when posting a notification, control does not return to the poster until all observers have received and processed the notification. To send notifications asynchronously use a notification queue, which is described in “Notification Queues.”
For communication between processes on different machines, use distributed objects (see Distributed Objects Programming Topics).