Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Architecting push notifications using GitHub API
2 points by bsudekum on Jan 12, 2016 | hide | past | favorite | 1 comment
I'm building an iOS app for managing GitHub notifications. I'd like to add a push notification feature for when a user is mentioned or a comment comes in on thread their participating on. I've come up with 2 ways to implement the notification but I don't like either option so far:

* Each individual app polls the /notifications endpoint. This would take the server component out of picture but would require background app refreshing. Polls endpoint -> checks if it's different, if so send notification.

* When the user authenticates in the app, their access token and device id are sent to a server. The server loops through an array of users objects hitting the /notifications endpoint with their credentials. When a notification is detected, a push notification is sent to that device. This could become very unwieldy.

I could be looking at this wrong, open to suggestions.



Building it both ways and seeing which is better might be a good way to understand the problem.

Good luck.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: