Giter Site home page Giter Site logo

Comments (7)

youngj avatar youngj commented on July 30, 2024

My guess is that this would already work. EnvayaSMS uses a connection pool that allows two concurrent HTTP requests. You could set the EnvayaSMS poll interval to 1 minute and then configure your server to hold the request for ~55 seconds. Does that work?

from envayasms.

youngj avatar youngj commented on July 30, 2024

Oh, I see, that probably doesn't work now because the HTTP socket timeout is set to 10 seconds. I suppose we could just increase the timeout to 60 seconds.

from envayasms.

magixbox avatar magixbox commented on July 30, 2024

Yes, the timeout is too short at the moment. Verified.

from envayasms.

magixbox avatar magixbox commented on July 30, 2024

I can see some potential issue with such a short timeout hardcoded in EnvayaSMS, but I do understand the purpose of having such short timeout: the shortest Poll Interval is 15 seconds, so the active poll process must be ended before another kick in.

The quick "fix" is to have timeout near the Poll Interval value. Say 10 or 20 seconds before the next process start.
So for us, we can set Poll Interval to 1 minutes, hold the server CGI for 40 seconds, and get out clean.

The issue here is that, once EnvayaSMS got the SMS delivered on the first query, it will still wait for next schedule poll - which can be very long from the first one if the poll timer isn't based on "time between each poll".

from envayasms.

youngj avatar youngj commented on July 30, 2024

Try installing EnvayaSMS-long-poll.apk on https://github.com/youngj/EnvayaSMS/downloads ... it has a socket timeout of 60 seconds, only runs one poller task at a time, and adds an option for a poll interval of 5 seconds.

So just set Poll Interval to 5 seconds, and hold the server CGI for < 60 seconds... let me know if it works for you.

from envayasms.

magixbox avatar magixbox commented on July 30, 2024

Yes it works. I've set to hold the CGI for 10 seconds, poll interval of 5 seconds, the app query the server and stay on for 10 seconds till the server release, and hit back the server immediately with subsequence query.

This is exactly the behavior that we were expecting. Sweet!

from envayasms.

youngj avatar youngj commented on July 30, 2024

Great. Released as 2.0.4.

from envayasms.

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.