Giter Club home page Giter Club logo

specifications's People

Contributors

karmanyaahm avatar matmaul avatar nicolasfella avatar noman-land avatar p1gp1g avatar schnilz avatar sparchatus avatar vurpo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

specifications's Issues

413 behavior

see discussion in #unifiedpush-devs:matrix.org. Will post more details and ideas soon.

Data should be bytearray not string

Messages should be passed around as byte arrays not strings. Encoding encrypted bytes to UTF-8 results in garbage decoding.

This was recently discussed in #unifiedpush-devs:matrix.org with relation to binwiederhier/ntfy#101

The spec will probably have to be updated to change data types. This issue exists to keep track of progress regarding that.

OPTIONS support

It would be nice to add support for OPTIONS to push endpoints. This would allow the HTTP clients to check which methods are supported and check CORS.

switch from token to instance ?

Following the lengthy discussion in UnifiedPush/flutter-connector#56, and since we are potentially up for some breaking changes I would like to propose a change from token to instance in the spec.

They are supposed to be almost the same but doesn't have the exact same semantic, and this is both confusing and error-prone I believe.

Main change in the spec would be the rename + relax the constraint regarding the need to be random, but keep the uniqueness.

Implications (good or bad) I can think off:

  • no potential misuse by an app/lib that would ignore the random token requirement
  • mimic current lib interfaces
  • Distributors can't rely on that to be a random string that can be used for auth and/or uniqueness. They will have to store a mapping. This is however already the case for most of them. People writing distributors should have better knowledge of the spec than people dealing with the connector interface, hence I think this is fine.

For backward compatibility:

  • existing UP distributors that currently directly used the random token should be able to do token=token in their initial instance-token mapping when upgrading
  • we can keep support for token EXTRA param in the Android code and treat it as an instance for a while until all apps/framework migrate
  • for D-Bus, parameters are unnamed I believe, so no change should be needed at the interface level. We can just use current positional string token parameter as instance.

Retransmission is not specified

See: https://codeberg.org/iNPUTmice/up/issues/1

How are we handling retries? Should we implement RFC8030's TTL? If so, should it be a MUST not deliver after time or SHOULD not deliver after time (i.e. is TTL a required feature)?

One possible solution from @iNPUTmice:

A push server that implements storage and multiple delivery attempts SHOULD implement the TTL and Topic headers from RFC 8030. According to RFC 8030 §5.2 a push service MAY retain a push message for a shorter duration than requested; since this value can be 0 a push server that does not store messages is still a valid WebPush service. Push servers that do not implement storage MUST include a TTL: 0 header in the response.

Size limits

The WebPush spec states:

Push services might need to limit the size and number of stored push
messages to avoid overloading. To limit the size of messages, the
push service MAY return a 413 (Payload Too Large) status code
[RFC7231] in response to requests that include an entity body that is
too large. Push services MUST NOT return a 413 status code in
responses to an entity body that is 4096 bytes or less in size.

Currently, the UP limit is 4000. We should consider changing this for better WebPush compatibility; it's only a 96 byte increase.

From what I remember, we originally did 4000 to make FCM Distributor work within FCM's 4096 limit. Now, we are running into size problems with FCM anyway due to base64 encoding, so adding another 96 bytes shouldn't be that big a deal (as long as UnifiedPush/fcm-distributor#56 is dealt with in some way)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.