Sorry, you need to enable JavaScript to visit this website.

You are here

Polling multiple messages at once & Reliability

3 posts / 0 new
Last post

Yose's picture
by Yose

Polling multiple messages at once & Reliability

So I've had the chance to develop an app that uses the SMS messaging API for govhack, and I've been wondering.. any chance of ever having an API endpoint for polling for multiple messages at once?

Querying for one message at a time, as opposed to, for example, specifying "give me 10 message and tell me how many more left" just feels a lot less efficient. Right now, with the polling API, if my subscription number gets sent 10 messages at once, and I poll once a second, it'll take 10 second before I get to see the last message. I can reduce the polling number but then it'd make the server get that many more API calls.

Of course I could use the notifyURL argument and provide a web address, but I thought the polling API was more convenient to use

Additionally, is there any way to get previously polled messages? For example, if during a polling call my server crashes while processing the result (power outage or what have you), it'd be great if I can resume and get that previous message, as opposed to losing it forever.

Also - what are the costs associated with reading sms replies? 1c? A bit less clear on this on the PAYG pricing page.

Thanks (and maybe I should post separate topics? don't want to spam the forums though)

Michelle's picture
by Michelle

Polling multiple messages at once

Hey ywid062 great to see you met us at GovHack! How did your weekend go?

Regarding Polling multiple messages at once. This is not something currently supported by our platform. It's a great idea though and I'll add it to our backlog! For now hopefully you can get the info you need from the NotifyURL.

I've answered the pricing question in a seperate post: https://dev.telstra.com/content/cost-receiving-sms-messaging-api :) 

 

Yose's picture
by Yose

Govhack was great, we spent

Govhack was great, we spent much less time fighting the API than in other hackathons, things just "worked" for our purposes.

In addition to being able to get 10 messages at once, it'd be nice to be able to have some kind of way to get messages by ID. For example, suppose my server polls for message number 3, but crashes because of power outage (or something like that). The next time the server starts, when it polls for new messages, it'll get message number 4, and message number 3 will be lost to the ether forever, unless there's a way to keep track of the last few messages.

In a conversation analogy, it's like being able to say "Sorry, what did you say just then?" - I believe this is important to the development of a rock-solid, reliable SMS service.

This would be useful coupled with the NotifyURL, in case the server crashes and is down while telstra calls the NotifyURL, the server can catch up to the messages missed. A "sorry, I zoned out for a second there, what did I miss" kinda thing.

Log in or register to post comments