-
Notifications
You must be signed in to change notification settings - Fork 30
Add WebPush Topics #643
Comments
r= Follow up from local discussion, the topic is only 32 char of ASCII, file name safe text, so simple hashes are preferred. This does not need to be secure, only unique, so compressed sampling is an option. This shouldn't add too much to the increasing URL length. |
It's also URL-safe Base64, so we don't need to worry about spaces or special characters besides |
It has since come up that we need to avoid delete calls in the future, so the key scheme needs to be compatible with the ability to seek into a position. Unfortunately topics are incompatible with this as they require a known and consistent key to be locateable in the db. So topic messages will always require deletion (but there should be less of them to delete since they replace prior ones). |
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
Add's webpush topics with versioned sort key. Closes #643
This will require a new keying scheme for the DynamoDB sort key. Right now the sort key is:
chidmessageid
- CHID : Encrypted(UAID : CHID)This also means that our messages are in arbitrary orders on retrieval.
There are some constraints on keys to consider:
A proposed scheme for sort keys originally failed to account for the need to possibly DELETE the message. Here's a new scheme that might work:
For topic messages only:
VERSION : CHID : HASH(TOPIC)
When a topic-bound message is created, we create a URL resource for a Location like so:
Encrypted(VERSION : UAID: CHID : HASH(TOPIC))
This is stored as the update_id for the message. Since we use a nonce-based crypto scheme, it changes every time we update it (as desired to reflect new resource creation). We can also locate the message, and ensure the update_id matches before deleting it.
For normal messages:
VERSION: CHID: Encrypted(VERSION : UAID : CHID)
Note that we must now include the VERSION so we know when we're using the newly versioned token scheme.
The text was updated successfully, but these errors were encountered: