Some minor edits: On Tue, May 15, 2012 at 4:02 PM, Mark Rejhon <[email protected]> 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: > > >> The biggest impact on bandwidth of XEP-0301 are as follows: >> (1) Is key press intervals being preserved? (Natural Typing) (uses more >> bandwidth) >> Section 6.1.1 at >> http://xmpp.org/extensions/xep-0301.html#text_presentation >> Animation: http://www.realjabber.org/real_time_text_demo.html >> (2) What transmission interval is being used? (shorter uses more >> bandwidth) >> Section 4.4 at >> http://xmpp.org/extensions/xep-0301.html#transmission_interval >> (3) Is XEP-0138 stream compression being used? (uses less bandwidth) >> See http://xmpp.org/extensions/xep-0138.html >> (4) Are you using an optimized XMPP server that keeps headers compact? >> (i.e. eliminates a lot of XMPP payloads such as noarchive indicators or <x> >> tags). This overhead is added by Google Talk's servers and adds an >> additional >100 bytes per <message> packet. >> > > [now edited for correctness] > *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 > .........20 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. > Two edits were made: 1. N=20 instead of N=10 if Natural Typing is used. Gunnar pointed this out, and I realized I neglected to count the bytes of the <w/> elements in addition to the bytes of the other action elements such as <t/>. 2. One pair of missing parantheses have been added. Recalculating the bandwidth of XEP-0301 with these minor adjustments, result in only a minor change to the calculated answers (a few bytes per second). Thanks, Mark Rejhon
