Darwin Notification vs polling every 5 seconds.

There is one xpc server and two xpc clients (clientA and clientB). When clientB sends a message to the xpc server, xpc server fills a value for dummyString in it's memory and I want clientA to know that dummyString got updated and also the new value for this dummyString. The updation of dummyString is not something that happens often.

Two options we tried:

  1. Have a timer for 5 seconds in clientA and keep polling and request for the value of this dummyString.
  2. Setup a darwin notification in server that gets posted whenever dummyString is being updated. clientA receives requests for dummyString value only when it observes a notification being posted.

Which of these two approaches causes the least delay for clientA to know the updated value of dummyString?

Answered by DTS Engineer in 824919022

Isn’t this basically the same question that you asked over your your other thread?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Isn’t this basically the same question that you asked over your your other thread?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Darwin Notification vs polling every 5 seconds.
 
 
Q