Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Use HTTP/2 APNS protocol #68

Merged
merged 3 commits into from
Jul 11, 2016
Merged

Use HTTP/2 APNS protocol #68

merged 3 commits into from
Jul 11, 2016

Conversation

cheungpat
Copy link
Contributor

@cheungpat cheungpat commented Jul 6, 2016

This commit switch the underlying APNS library to
RobotsAndPencils/buford, which sends push notification to APNS
through HTTP/2 protocol. The new protocol provides immediate feedback
for each notification sent.

connects #47

This commit switch the underlying APNS library to
RobotsAndPencils/buford, which sends push notification to APNS
through HTTP/2 protocol. The new protocol provides immediate feedback
for each notification sent.

refs SkygearIO#47
@cheungpat
Copy link
Contributor Author

To try this out, pull from quay.io/skygeario/skygear-server:new-push which uses the new HTTP/2 APNS protocol. Note that this version is based on 0.13.0.

cc @rockychan @royuen

@cheungpat cheungpat changed the title Use HTTP/2 APNS protocol WIP: Use HTTP/2 APNS protocol Jul 8, 2016
@cheungpat cheungpat added the WIP label Jul 8, 2016
@cheungpat
Copy link
Contributor Author

@rockychan Please pull again for the new-push image, which supports APNS certificate containing multiple topics. There is no configuration options for topic name as skygear-server will use the UID in the APNS certificate Subject as the default topic name.

@cheungpat cheungpat changed the title WIP: Use HTTP/2 APNS protocol Use HTTP/2 APNS protocol Jul 8, 2016
@cheungpat cheungpat removed the WIP label Jul 8, 2016
@cheungpat
Copy link
Contributor Author

@rickmak updated, see if you have any comment

This could happen when the same device token is registered to multiple
users (hence multiple devices can be deleted). This commit avoids the
panic by not checking whether the number of deleted devices equal to 1.
@cheungpat
Copy link
Contributor Author

@rickmak: @rockychan reported that he encountered a skygear-server panic in DeleteDeviceByToken which I think could occurs when:

  • a device token is registered to multiple users (which is permitted by database schema unique constraint, because that constraint is a tuple of user_id, type, token)
  • APNS reported the device token is bad or is unregistered

DeleteDeviceByToken check whether the number of deleted device is 1. I removed this check to avoid the panic.

@rickmak rickmak merged commit 41a5112 into SkygearIO:master Jul 11, 2016
@rickmak rickmak removed the In Review label Jul 11, 2016
@cheungpat cheungpat deleted the new-push branch July 20, 2016 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants