I am looking for a high performance inter process communication system in macos X.
What is the best system? AppleEvents
or NSNotifications
?
I am looking for a high performance inter process communication system in macos X.
What is the best system? AppleEvents
or NSNotifications
?
If you control both the sender and the recipient, you can open a socket between the two processes ( man socketpair ), which is quite high performance. You can also open a file in a shared location ( like /tmp ) and write to it from one process and read from the other, which is quite speedy. You can also open two TCP/IP ports on the local machine, one in each process, and then send from one to the other "over the network".
If your only two choices are NSNotifications or AppleEvents, well, AppleEvents will likely perform better.
Distributed notifications (i.e. notifications sent through NSDistributedNotificationCenter) are most likely not a good option if your goal is high performance and/or reliability. Here is Apple's own take on this subject:
Depending on what you mean by "high performance", you might want to look into distributed objects, or plain old Unix IPC mechanisms (sockets, pipes, shared memory etc).