Subject: Difference in behaviour between Matrix and agsXMPP connection
Hi there.
I've been investigating agsXMPP for a while, but am now looking at MatriX. One feature of particular interest is the performance of the compression algorithms.
Using the Matrix MiniClient I connected to an ejabberd server but could not get compression to work at all (ejabberd compression works fine with agsXMPP). The Matrix Miniclient sucessfully configured compression when connecting to an MLink server.
Looking at the traces I can see that ejabberd does not offer the compression option once the user challenge is complete. agsXMPP starts compression prior to the challenge, so I had no problem with this.
I'd be greatful if you can explain why I see this difference in behaviour.
Many thanks
Dave
Attached are the traces for the MatriX MLink, Matrix ejabberd and agsXMPP ejabberd.
Matrix - MLink trace
Matrix - ejabberd trace
agsXMPP - ejabberd trace
I've been investigating agsXMPP for a while, but am now looking at MatriX. One feature of particular interest is the performance of the compression algorithms.
Using the Matrix MiniClient I connected to an ejabberd server but could not get compression to work at all (ejabberd compression works fine with agsXMPP). The Matrix Miniclient sucessfully configured compression when connecting to an MLink server.
Looking at the traces I can see that ejabberd does not offer the compression option once the user challenge is complete. agsXMPP starts compression prior to the challenge, so I had no problem with this.
I'd be greatful if you can explain why I see this difference in behaviour.
Many thanks
Dave
Attached are the traces for the MatriX MLink, Matrix ejabberd and agsXMPP ejabberd.
Matrix - MLink trace
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>SCRAM-SHA-1</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>NTLM</mechanism>
<mechanism>GSSAPI</mechanism>
<mechanism>GSS-SPNEGO</mechanism>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>CRAM-MD5</mechanism>
</mechanisms>
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <auth mechanism="SCRAM-SHA-1" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...........</auth>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">................</response>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">.............</success>
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="nowiresemail.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nowiresemail.com" id="21af7187d8bc6d60" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<required />
</bind>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <compress xmlns="http://jabber.org/protocol/compress">
<method>zlib</method>
</compress>
RECV: <compressed xmlns="http://jabber.org/protocol/compress" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="nowiresemail.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nowiresemail.com" id="a14a74612b7e1b15" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<required />
</bind>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <iq id="MX_7" type="set" xmlns="jabber:client">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>MatriX</resource>
</bind>
</iq>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>SCRAM-SHA-1</mechanism>
<mechanism>PLAIN</mechanism>
<mechanism>NTLM</mechanism>
<mechanism>GSSAPI</mechanism>
<mechanism>GSS-SPNEGO</mechanism>
<mechanism>DIGEST-MD5</mechanism>
<mechanism>CRAM-MD5</mechanism>
</mechanisms>
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <auth mechanism="SCRAM-SHA-1" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...........</auth>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">................</response>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">.............</success>
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="nowiresemail.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nowiresemail.com" id="21af7187d8bc6d60" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<required />
</bind>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <compress xmlns="http://jabber.org/protocol/compress">
<method>zlib</method>
</compress>
RECV: <compressed xmlns="http://jabber.org/protocol/compress" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="nowiresemail.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nowiresemail.com" id="a14a74612b7e1b15" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<required />
</bind>
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<ver xmlns="urn:xmpp:features:rosterver">
<optional />
</ver>
</stream:features>
SEND: <iq id="MX_7" type="set" xmlns="jabber:client">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>MatriX</resource>
</bind>
</iq>
Matrix - ejabberd trace
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">..............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">.............</response>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...........</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="bubble.im" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" id="3081550908" from="bubble.im" version="1.0" lang="en" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <iq id="MX_10" type="set" xmlns="jabber:client">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>MatriX</resource>
</bind>
</iq>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method>
</compression>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">..............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">.............</response>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...........</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="bubble.im" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" id="3081550908" from="bubble.im" version="1.0" lang="en" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <iq id="MX_10" type="set" xmlns="jabber:client">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>MatriX</resource>
</bind>
</iq>
agsXMPP - ejabberd trace
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method></compression>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism></mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <compress xmlns="http://jabber.org/protocol/compress">
<method>zlib</method></compress>
RECV: <compressed xmlns="http://jabber.org/protocol/compress" />
SEND: <stream:stream to='bubble.im' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="bubble.im" version="1.0" xml:lang="en" id="3284626828" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism></mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">......................</response>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">....................</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream to='bubble.im' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="bubble.im" version="1.0" xml:lang="en" id="3894236482" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <iq id="agsXMPP_1" type="set" to="bubble.im"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>B0IMSERVER</resource></bind></iq>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<compression xmlns="http://jabber.org/features/compress">
<method>zlib</method></compression>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism></mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <compress xmlns="http://jabber.org/protocol/compress">
<method>zlib</method></compress>
RECV: <compressed xmlns="http://jabber.org/protocol/compress" />
SEND: <stream:stream to='bubble.im' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="bubble.im" version="1.0" xml:lang="en" id="3284626828" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism></mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">............</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">......................</response>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">....................</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream to='bubble.im' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="bubble.im" version="1.0" xml:lang="en" id="3894236482" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" ver="ZxRgq/J2r/kR9P8I10GDWCwgGEQ=" node="http://www.process-one.net/en/ejabberd/" />
<register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <iq id="agsXMPP_1" type="set" to="bubble.im"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
<resource>B0IMSERVER</resource></bind></iq>