Drive iOS push notifications with RethinkDB changefeeds
Push notifications provide a useful bridge between web applications and mobile clients, enabling a more seamless user experience across screens. RethinkDB changefeeds make it easy for developers to add push notification support to existing applications–using an event-driven approach that doesn’t require the developer to add much additional plumbing.
In this blog post, I’ll demonstrate how to wire up RethinkDB changefeeds to iOS push notifications, conveying realtime updates to iPhone users. For my demo, I built a simple location checkin app that takes advantage of GPS on the user’s mobile device and RethinkDB’s geospatial indexing on the backend. When a user checks in, the backend sends a push notification to every user whose last checkin was made within 100 miles of the new checkin. A map view in the app displays pins, marking all the nearby checkins.