On Tue, May 15, 2012 at 4:02 PM, Mark Rejhon <webmail...@marky.com> wrote:
> Regarding XEP-0301 at http://www.xmpp.org/extensions/xep-0301.html > I have a mathematic formula for the bandwidth of XEP-0301 as follows: > > *Math Formula for Bandwidth of XEP-0301:* > Here is a math formula for estimating the bandwidth of XEP-0301, for > regular typing: > > X = H + (M + (K * i * N)) * C * (1 / i) > > Where: > X = Average bandwidth, in bytes per second. > H = Average TCP/IP packet header overhead. > .........40 if using regular headers. > .........10 if using header compression. (Average. This varies. Adjust > appropriately for your network) > M = Minimum <message> overhead in bytes, including <rtt> and one XEP-0301 > action element. > .........120 if highly optimized XMPP is used. (super compact jid's) > .........200 if reasonably optimized XMPP is used. (public full jid's, > infrequent extra payload) > .........400 if Google servers is used. > K = Number of keypresses per second. (Divide WPM by 12, so use K=5 for 60 > WPM) > N = Overhead per keypress. > .........1 if Natural Typing is not used > .........10 if Natural Typing is used (Average. This varies a bit, i.e. > editing vs typing) > i = Transmission interval between packets in seconds. Note: Variable is > used twice in formula. > .........Recommended value is between 0.3 to 1.0 > C = Compression factor of XMPP > .........1 if no compression used > .........Less than 1 if compression used (XEP-0138 or TLS). Use a value > of 0.2 for 5:1 ratio. > Addendum, one minor correction to the math formula. X = H + (M + (K * i * N)) * C * (1 / i) Should be: X = (H + (M + (K * i * N)) * C) * (1 / i) As a result, the H variable (TCP header) is now included in the i variable calculation (interval). However, this only changes calculations by a few percent. Still less than 50 bytes per second for optimized/compressed XEP-0301 without natural typing. Thanks Mark Rejhon