Closed GoogleCodeExporter closed 8 years ago
Regarding your first comment, Apple simply states that you must make sure not
to connect/disconnect very rapidly in a way that could be considered a DoS
attack. Anything else is fine, and hundreds of sites routinely open and close
connections to push notifications periodically. You do not *need* to use the
Queue mechanism, the other push methods are fine, especially if you have
predefined lists of notifications to send (which the library will push over the
same connection whenever possible).
As for your bug report, I am pushing this to the next milestone. Thank you!
Original comment by sype...@gmail.com
on 13 Apr 2012 at 9:00
They are unclear on what "very rapidly" is, I guess. I noticed that it takes
over 5 seconds to connect, send a message and finish up. That severely limits
throughput. A note in the example would have saved me some trouble, otherwise
you are limited to 10-12 per minute.
Glad I could help! Thanks for modifying this for the next release.
Original comment by beth...@gmail.com
on 13 Apr 2012 at 9:04
The wiki doc (basic push notification) clearly states that you can (and should)
pass a list of devices instead of looping and sending individual notifications
yourself, to allow the library to optimize connection usage. The 5-second
delay is necessary when closing the connection to read error-response packets,
but obviously not after each individual push. You can send hundreds or
thousands of notifications a minute if you provide a list to the library.
Original comment by sype...@gmail.com
on 13 Apr 2012 at 9:16
It's not a big deal. I figure more documentation is better. I have it working
with a queue and 10 threads. I query them from a database very frequently since
we want people to get them ASAP, and batching would slow things down. We
generate them at a rate of one or two a second at peak times. So, whatever on
the documentation. I'll look forward to 2.3
Original comment by beth...@gmail.com
on 13 Apr 2012 at 11:22
Fixed in r363, which nows requires a boolean parameter indicating if the
internal list should be cleared while getting the list of pushed notifications
(within a synchronized block). This version also deprecates related
thread-unsafe methods.
Original comment by sype...@gmail.com
on 24 Apr 2012 at 3:21
Original issue reported on code.google.com by
beth...@gmail.com
on 13 Apr 2012 at 8:21