Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[autoendpoint] Route notifications to autopush connection servers #161

Closed
AzureMarker opened this issue Jun 22, 2020 · 0 comments · Fixed by #167 or #231
Closed

[autoendpoint] Route notifications to autopush connection servers #161

AzureMarker opened this issue Jun 22, 2020 · 0 comments · Fixed by #167 or #231
Assignees
Labels
3 Estimate - Small...ish

Comments

@AzureMarker
Copy link
Contributor

WebPush notifications (destined for desktop Firefox user agents) should be routed to the autopush connection servers.

This is the first router implementation, which may increase the estimate.

@AzureMarker AzureMarker added the 3 Estimate - Small...ish label Jun 22, 2020
@AzureMarker AzureMarker added this to the Autoendpoint Rust Server milestone Jun 22, 2020
@AzureMarker AzureMarker self-assigned this Jun 22, 2020
@AzureMarker AzureMarker changed the title [autoendpoint] Forward notifications to autopush connection servers [autoendpoint] Route notifications to autopush connection servers Jun 22, 2020
AzureMarker added a commit that referenced this issue Jul 13, 2020
* Generate a message ID for each notification

* Use a default TTL of 0 in NotificationHeaders

* Impl Serialize for Notification and NotificationHeaders

* Add a Router trait and stub WebPushRouter

* Use async_trait in Router and add RouterResponse

* Implement direct-route-to-node happy-path for WebPushRouter

* Replace serde Serialize notification impls with more direct impls

* Add DynamoStorage::remove_node_id and use in webpush router

The Router async functions may not return Send futures, so the
async_trait annotation is modified to not require Send.

* Add DynamoStorage::store_message and use in webpush router

* Add a UserNotFound error kind to the common code and use in get_uaid

* Try to notify the node after storing a message, if available

* Remove the `updates.client.deleted` metric

Based on metrics spreadsheet discussion.

* Add RouterType enum for easy matching on the router type

* Take notification by reference when routing

* Add Routers extractor and use in webpush_route

* Add endpoint_url setting and remove unused database settings

* Remove settings banner, as actix already logs the data as INFO

* Fix the Location header TODO in webpush router

* Add RouterError

* Fix incorrect usage of UserNotFound error (remove it)

* Return the router response from the HTTP handler

* Fix missing Clone impl (rebase error)

* Fix serialization of WebPush notifications

Notifications were serialized without required fields (due to
`skip_serializing` in the autopush-common code). While this is correct
when giving the notification to the UA, the connection server needs
these fields. We now perform this serialization separately from the
autopush-common Notification serialization.

* Add debug and trace level logging to the WebPush router

* Ignore local configs

* Fix wrong content encoding key in header map

WebPush expects "encoding" instead of "content_encoding"

* Return an error if there is no TTL value

* Fix NotificationHeader tests after requiring TTL

* Update errnos for RouterError and NoTTL

Closes #161
This was referenced Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment