TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HTTP/2 Protocol for iOS Push Notifications

61 pointsby drl42about 9 years ago

5 comments

Sidniciousabout 9 years ago
For anyone who&#x27;s not familiar with APNs, this new protocol is a huge improvement. Since it uses HTTP&#x2F;2, you can just use an existing HTTP library (which should handle reusing the connection for multiple notifications, too).<p>Here&#x27;s an example client that I wrote in Go for a client that <i>doesn&#x27;t</i> have access to an HTTP&#x2F;2 library. It listens for JSON on stdin. I highlighted the guts:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Sidnicious&#x2F;pushprovider&#x2F;blob&#x2F;49b1f63295229e620bc135e8028c3ef88ff81984&#x2F;pushprovider.go#L53-L107" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Sidnicious&#x2F;pushprovider&#x2F;blob&#x2F;49b1f6329522...</a>
评论 #11177174 未加载
simonwabout 9 years ago
Has anyone used this successfully yet from Python? It seems like the Hyper library should be able to talk to it, but that comes with a very strong &quot;hyper is in a very early alpha&quot; warning: <a href="http:&#x2F;&#x2F;hyper.readthedocs.org&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">http:&#x2F;&#x2F;hyper.readthedocs.org&#x2F;en&#x2F;latest&#x2F;</a>
评论 #11177428 未加载
magilaabout 9 years ago
While the old binary protocol has its deficiencies, they could have been addressed with relatively minor changes. The plus side with the old protocol is that the message format itself is very simple to generate and parse. Now I have to drag an HTTP&#x2F;2 library into my notification server and deal with a much more complex protocol where the vast majority of that complexity is completely unnecessary.
sbose78about 9 years ago
This will be very helpful for enterprise environments which have an HTTP proxy for external URLs. I&#x27;m guessing this improvement wouldn&#x27;t need a socks proxy since this is no longer a socket protocol?
leesalminenabout 9 years ago
The old APNs flow seemed overly complex, especially in comparison to GCM. This seems like a big improvement.<p>Does anyone know why Apple uses certificates instead of API keys (a la GCM) for authorization?
评论 #11177415 未加载
评论 #11176478 未加载
评论 #11177250 未加载
评论 #11176449 未加载
评论 #11176246 未加载