Giter Club home page Giter Club logo

Comments (3)

nathany avatar nathany commented on June 6, 2024

I'm wondering the same thing.

My guess is that it should be used in pusher.rb after writing to the connection.

The thing is, I don't think the response from Apple is synchronous. The docs are a bit confusing, because the table suggests that 0 is returned when no error occurs, but elsewhere it says:

"If you send a notification that is accepted by APNs, nothing is returned."

And if there is an error response, Apple hangs up.

APNs returns an error-response packet and closes the connection

It looks like Grocer will retry 3 times by default (see connection.rb with_connection), but it doesn't appear to read off the connection to determine the ErrorResponse.

from grocer.

nathany avatar nathany commented on June 6, 2024

For more information: http://redth.codes/the-problem-with-apples-push-notification-ser/

from grocer.

stevenharman avatar stevenharman commented on June 6, 2024

You are correct - we have an ErrorResponse class, but don't currently use it. In #14 you'll find a lengthy discussion and several proposed solutions for not dropping messages and also reading the error response. The most promising would be adding a producer/consumer queue, with a ring buffer to hold sent messages. This would allow us to continue to write at high speeds, but not block while waiting an arbitrary amount of time for an error message from APNS.

None of the original authors currently have available time to undertake the changes, but would be happy to work with any individuals who wish to.

from grocer.

Related Issues (20)

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.