Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Probability distribution for sms answer delays

I'm writing an app using sms as communication. I have chosen to subscribe to an sms-gateway, which provides me with an API for doing so.

The API has functions for sending as well as pulling new messages. It does however not have any kind of push functionality.

In order to do my queries most efficient, I'm seeking data on how long time people wait before they answer a text message - as a probability function.

Extra info:

  • The application is interactive (as can be), so I suppose the times will be pretty similar to real life human-human communication.
  • I don't believe differences in personal style will play a big impact on the right times and frequencies to query, so average data should be fine.

Update

I'm impressed and honered by the many great answers recieved. I have concluded that my best shot will be a few adaptable heuristics, including exponential (or maybe polynomial) backoff.

All along I will be gathering statistics for later analysis. Maybe something will show up. I think I will cheat start on the algorithm for generating poll-frquenzies from a probability distribution. That'll be fun.

Thanks again many times.

like image 284
Thomas Ahle Avatar asked May 24 '10 19:05

Thomas Ahle


2 Answers

In the absence of any real data, the best solution may be to write the code so that the application adjusts the wait time based on current history of response times.

Basic Idea as follows:

Step 1: Set initial frequency of pulling once every x seconds.

Step 2: Pull messages at the above frequency for y duration.

Step 3: If you discover that messages are always waiting for you to pull decrease x otherwise increase x.

Several design considerations:

  1. Adjust forever or stop after sometime

    You can repeat steps 2 and 3 forever in which case the application dynamically adjusts itself according to sms patterns. Alternatively, you can stop after some time to reduce application overhead.

  2. Adjustment criteria: Per customer or across all customers

    You can chose to do the adjustment in step 3 on a per customer basis or across all customers.

I believe GMAIL's smtp service works along the same lines.

like image 51
vad Avatar answered Oct 10 '22 06:10

vad


well I would suggest finding some statistics on daily SMS/Text Messaging usage by geographical location and age groups and come up with an daily average, it wont be an exact measurement for all though.

like image 31
Phill Pafford Avatar answered Oct 10 '22 04:10

Phill Pafford