GithubHelp home page GithubHelp logo

Async? about vapor-apns HOT 4 OPEN

matthijs2704 avatar matthijs2704 commented on May 10, 2024
Async?

from vapor-apns.

Comments (4)

malhal avatar malhal commented on May 10, 2024

That could also batch the notifications into one connection to APNS to avoid the mythical IP ban for too many connections.

Another way would just be to install a service could send the notification in a separate process, however that then has cross-platform complications.

from vapor-apns.

matthijs2704 avatar matthijs2704 commented on May 10, 2024

@malhal It should already only use one connection, unless you use multiple VaporAPNS instances :)

from vapor-apns.

malhal avatar malhal commented on May 10, 2024

Oh right, cool then!

I was wondering if you happened to know if Vapor runs on a web server rather than using its built in basic server would that result in multiple processes and hence multiple instances? Thanks

from vapor-apns.

matthijs2704 avatar matthijs2704 commented on May 10, 2024

@malhal It only creates multiple instances if you initiate VaporAPNS inside of the request handler. When you create the VaporAPNS instance in the main.swift (so on server startup) you can use it anywhere in the response but it reuses that same connection

from vapor-apns.

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.