Sent from my iPhone
> --
> You received this message because you are subscribed to the Google
> Groups "Easy APNS" group.
> To post to this group, send email to easy...@googlegroups.com
> To unsubscribe from this group, send email to
> easyapns+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/easyapns?hl=en
There is some code here
http://www.macoscoders.com/2009/05/17/iphone-apple-push-notification-service-apns/
That will help you on the way, of keeping open the door to the server whilst you loop.
What I have done on top of that is combined multiple messages together. (concatenate the packets)
John
you could try to run all 50,000 at once, but it could time out, so what I did was put a loop around this, that I could interrupt if needed.
You have to remember that you are blocking a request by sending out to apple, and loosing capacity whilst sending the messages.
J
You wrote that It will "block request"
Do you mean to iPhones request to register or do other request ?
For "loosing capacity" do you mean that the server will run slow at that sending time ?
Blocking is stoping the thread in this case.
J
Sent from my iPhone
Thanks,
Zhou Hao
If i try to send 1000 in one go the file size status returned does not go above 68000 and i think thats a limit, hence forming them to 250 packets of messages thenll looping ocer them writes
Sent from my iPhone
Really, your app should directly query your server to get the updated info for 100,000 users; doing so in response to a Push Notification or when the user launches your app and there hasn't been a Push Notification lately.
"Each push notification carries with it a payload. The payload specifies how users are to be alerted to the data waiting to be downloaded to the client application. The maximum size allowed for a notification payload is 256 bytes; Apple Push Notification Service refuses any notification that exceeds this limit. Remember that delivery of notifications is “best effort” and is not guaranteed."
--
C. Keith Ray
twitter: @ckeithray
phone: 650-KEY-4RAY
650-539-4729
http://agilesolutionspace.blogspot.com/
Somebody suggest to combine multiple messages into one packet. The idea is to compile multiple ,for example, 200 payloads (maximum size of a payload is 256 bytes) into one big packet then send them out. In this way, to send out all 100,000 messages, you can take only about less than 10 minutes ( theoretically ) to send out all messages.
But I haven't tried this method because there is one problem for me in this way. I'll check the feedback when I send out one message so that I know whether the message is sent out successfully and whether the device token is still valid. If it's not valid anymore(maybe user uninstall your app already), I'll delete it from my database. But if I use above mentioned method, I don't know how to check the feed back.
If it check that push send more slow (they check apple response) , if it is not check than it sends 100 times faster
(guess they might not checking response)
Any way i will be happy if someone have easy apn modified php code to send multiple token in one message , since I'm also handling 60,000 tokens and it will take many hours to send broadcast