<?xml version="1.0" encoding="UTF-8"?><feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en"
  xml:base="http://www.xiaoka.com/blog/wp-atom.php"
   >
	<title type="text">Xiaoka Notes</title>
	<subtitle type="text">Random Ramblings</subtitle>

	<updated>2011-02-23T20:08:21Z</updated>

	<link rel="alternate" type="text/html" href="http://www.xiaoka.com/blog" />
	<id>http://www.xiaoka.com/blog/feed/atom/</id>
	<link rel="self" type="application/atom+xml" href="http://www.xiaoka.com/blog/feed/atom/" />

	<generator uri="http://wordpress.org/" version="3.3.1">WordPress</generator>
		<entry>
		<author>
			<name>Tomasz Sterna</name>
						<uri>http://tomasz.sterna.tv</uri>
					</author>
		<title type="html"><![CDATA[Roster Versioning in jabberd2]]></title>
		<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/" />
		<id>http://tomasz.sterna.tv/?p=427</id>
		<updated>2010-12-30T10:49:00Z</updated>
		<published>2009-07-11T19:38:58Z</published>
		<category scheme="http://www.xiaoka.com/blog" term="XMPP" /><category scheme="http://www.xiaoka.com/blog" term="Announcement" /><category scheme="http://www.xiaoka.com/blog" term="Jabber/XMPP" /><category scheme="http://www.xiaoka.com/blog" term="jabberd2" /><category scheme="http://www.xiaoka.com/blog" term="roster versioning" /><category scheme="http://www.xiaoka.com/blog" term="syndicate" /><category scheme="http://www.xiaoka.com/blog" term="xep" />		<summary type="html"><![CDATA[Thanks to the encouragement from Prosody Team, I spent 2 hours and implemented XEP-0237 Roster Versioning in jabberd2. The code is in jabberd2 SVN repository. Unfortunately the only client supporting XEP-0237 is Gajim Trunk. Roster Versioning in jabberd2 &#169;, .]]></summary>
		<content type="html" xml:base="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/"><![CDATA[<p>Thanks to the <a href="http://blog.prosody.im/prosody-plus-gajim-equals-faster-logins/">encouragement from Prosody Team</a>, I spent 2 hours and implemented <a href="http://xmpp.org/extensions/xep-0237.html">XEP-0237 Roster Versioning</a> in <a href="http://codex.xiaoka.com/wiki/jabberd2%3A">jabberd2</a>. The code is in <a href="http://codex.xiaoka.com/svn/jabberd2/trunk/">jabberd2 SVN repository</a>.</p>
<p>Unfortunately the only client supporting XEP-0237 is <a href="http://gajim.org/dev.php?lang=en">Gajim Trunk</a>.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/">Roster Versioning in jabberd2</a> &copy;, <a rel="license" href="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/"></a>.</small></p>]]></content>
<source>
	<title>Aberration » Jabber/XMPP</title>
	<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv" />
	<link rel="self" href="http://tomasz.sterna.tv/topics/jabberxmpp/feed/" />
	<id>http://tomasz.sterna.tv/topics/jabberxmpp/feed/</id>
</source>
		<link rel="replies" type="text/html" href="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://tomasz.sterna.tv/2009/07/roster-versioning-in-jabberd2/feed/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Tomasz Sterna</name>
						<uri>http://tomasz.sterna.tv</uri>
					</author>
		<title type="html"><![CDATA[jabberd2 packet throttling in action]]></title>
		<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/" />
		<id>http://tomasz.sterna.tv/?p=419</id>
		<updated>2010-12-30T10:49:00Z</updated>
		<published>2009-07-06T11:15:02Z</published>
		<category scheme="http://www.xiaoka.com/blog" term="XMPP" /><category scheme="http://www.xiaoka.com/blog" term="Jabber/XMPP" /><category scheme="http://www.xiaoka.com/blog" term="jabberd2" /><category scheme="http://www.xiaoka.com/blog" term="syndicate" />		<summary type="html"><![CDATA[Today I saw jabberd2 packet throttling in action and nicely visualized. There is a visible 16 pkt/s (64 stanzas per 4 seconds) cutoff on the following graph: jabberd2 packet throttling in action &#169;, .]]></summary>
		<content type="html" xml:base="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/"><![CDATA[<p>Today I saw <a href="http://codex.xiaoka.com/wiki/jabberd2%3A">jabberd2</a> packet throttling in action and nicely visualized. There is a visible 16 pkt/s (64 stanzas per 4 seconds) cutoff on the following graph:<br />
<a href="http://tomasz.sterna.tv/uploads/2009/07/graph_image.php.png"><img src="http://tomasz.sterna.tv/uploads/2009/07/graph_image.php-300x104.png" alt="Chrome.pl pkt/s graph" title="Chrome.pl pkt/s graph" width="300" height="104" class="aligncenter size-medium wp-image-420" /></a></p>
<p><small><a href="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/">jabberd2 packet throttling in action</a> &copy;, <a rel="license" href="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/"></a>.</small></p>]]></content>
<source>
	<title>Aberration » Jabber/XMPP</title>
	<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv" />
	<link rel="self" href="http://tomasz.sterna.tv/topics/jabberxmpp/feed/" />
	<id>http://tomasz.sterna.tv/topics/jabberxmpp/feed/</id>
</source>
		<link rel="replies" type="text/html" href="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://tomasz.sterna.tv/2009/07/jabberd2-packet-throttling-in-action/feed/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Tomasz Sterna</name>
						<uri>http://tomasz.sterna.tv</uri>
					</author>
		<title type="html"><![CDATA[Transport clustering in jabberd2]]></title>
		<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/" />
		<id>http://tomasz.sterna.tv/?p=412</id>
		<updated>2010-12-30T10:49:00Z</updated>
		<published>2009-06-16T23:16:59Z</published>
		<category scheme="http://www.xiaoka.com/blog" term="XMPP" /><category scheme="http://www.xiaoka.com/blog" term="clustering" /><category scheme="http://www.xiaoka.com/blog" term="Jabber/XMPP" /><category scheme="http://www.xiaoka.com/blog" term="jabberd2" /><category scheme="http://www.xiaoka.com/blog" term="syndicate" /><category scheme="http://www.xiaoka.com/blog" term="transport" />		<summary type="html"><![CDATA[The added value feature of clustering changes in jabberd2 is a possibility to multiplicate not only Session Manager component, but also components connected with XEP-0114 component protocol. Namely: Transports to other networks. Component protocol connections differ from jabberd2 components that the hash used for selecting component instance to route to is computed using a &#8216;from&#8217; [...]]]></summary>
		<content type="html" xml:base="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/"><![CDATA[<p>The added value feature of <a href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/">clustering changes in jabberd2</a> is a possibility to multiplicate not only Session Manager component, but also components connected with <a href="http://xmpp.org/extensions/xep-0114.html">XEP-0114 component protocol</a>. Namely: Transports to other networks.</p>
<p>Component protocol connections differ from jabberd2 components that the hash used for selecting component instance to route to is computed using a &#8216;from&#8217; address, not &#8216;to&#8217; address. This means that the server (and s2s) userbase is distributed amongst the components (evenly).</p>
<p>I am currently running several clustered transports with no changes to the transport code. Pretty neat. :-)</p>
<p><small><a href="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/">Transport clustering in jabberd2</a> &copy;, <a rel="license" href="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/"></a>.</small></p>]]></content>
<source>
	<title>Aberration » Jabber/XMPP</title>
	<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv" />
	<link rel="self" href="http://tomasz.sterna.tv/topics/jabberxmpp/feed/" />
	<id>http://tomasz.sterna.tv/topics/jabberxmpp/feed/</id>
</source>
		<link rel="replies" type="text/html" href="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://tomasz.sterna.tv/2009/06/transport-clustering-in-jabberd2/feed/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Tomasz Sterna</name>
						<uri>http://tomasz.sterna.tv</uri>
					</author>
		<title type="html"><![CDATA[Clustering for jabberd2]]></title>
		<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/" />
		<id>http://tomasz.sterna.tv/?p=407</id>
		<updated>2010-12-30T10:49:01Z</updated>
		<published>2009-06-13T15:05:12Z</published>
		<category scheme="http://www.xiaoka.com/blog" term="Software" /><category scheme="http://www.xiaoka.com/blog" term="XMPP" /><category scheme="http://www.xiaoka.com/blog" term="Announcement" /><category scheme="http://www.xiaoka.com/blog" term="clustering" /><category scheme="http://www.xiaoka.com/blog" term="Jabber/XMPP" /><category scheme="http://www.xiaoka.com/blog" term="jabberd" /><category scheme="http://www.xiaoka.com/blog" term="performance" /><category scheme="http://www.xiaoka.com/blog" term="syndicate" />		<summary type="html"><![CDATA[The largest problem for large jabberd2 deployments is a single-process, single-threaded Session Manager. Being single-threaded means that it can process only one XMPP packet at a time. More importantly, when it waits for some data (from the storage mostly) it does not process any other packets. One possible solution would be to rewrite the SM [...]]]></summary>
		<content type="html" xml:base="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/"><![CDATA[<p>The largest problem for large jabberd2 deployments is a single-process, single-threaded Session Manager.<br />
Being single-threaded means that it can process only one XMPP packet at a time. More importantly, when it waits for some data (from the storage mostly) it does not process any other packets.</p>
<p>One possible solution would be to rewrite the SM to be multi-threaded. And I do mean rewrite &#8211; the way it is designed now, would mean rewrite (or reassembly) from scratch.</p>
<p>Other possible solution is to make the SM multi-processed. This means a possibility to launch many Session Manager instances to service one XMPP domain. This would balance processing load between many processes (possibly machines) and spread storage load on many separate DB connections.</p>
<p>Most server implementation approach this with a separate &#8216;clustering&#8217; component, which tracks which session component is handling which user.<br />
In case of jabberd2 I think it is not necessary. We already have the all decision making overseer &#8211; the router component.</p>
<p>I just committed to <a href="http://codex.xiaoka.com/svn/jabberd2/trunk/">SVN trunk</a> a router version, that handles many SM and/or external components (i.e. transports) instances for one XMPP domain. Router selects the destination instance using a hash of user JID (receiver in case of SM instances, sender in case of external components). This is an approach that most clustering HTTP deployments use, which select the web server using session-id hash.</p>
<p>I&#8217;m running clustered jabberd2 on <a href="http://www.chrome.pl/">Chrome.pl</a> with no problems.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/">Clustering for jabberd2</a> &copy;, <a rel="license" href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/"></a>.</small></p>]]></content>
<source>
	<title>Aberration » Jabber/XMPP</title>
	<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv" />
	<link rel="self" href="http://tomasz.sterna.tv/topics/jabberxmpp/feed/" />
	<id>http://tomasz.sterna.tv/topics/jabberxmpp/feed/</id>
</source>
		<link rel="replies" type="text/html" href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://tomasz.sterna.tv/2009/06/clustering-for-jabberd2/feed/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>Tomasz Sterna</name>
						<uri>http://tomasz.sterna.tv</uri>
					</author>
		<title type="html"><![CDATA[Virtual domains for jabberd2]]></title>
		<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/" />
		<id>http://tomasz.sterna.tv/?p=401</id>
		<updated>2010-12-30T10:49:01Z</updated>
		<published>2009-06-10T13:54:46Z</published>
		<category scheme="http://www.xiaoka.com/blog" term="Software" /><category scheme="http://www.xiaoka.com/blog" term="XMPP" /><category scheme="http://www.xiaoka.com/blog" term="Announcement" /><category scheme="http://www.xiaoka.com/blog" term="Jabber/XMPP" /><category scheme="http://www.xiaoka.com/blog" term="jabberd" /><category scheme="http://www.xiaoka.com/blog" term="syndicate" /><category scheme="http://www.xiaoka.com/blog" term="virtual hosts" />		<summary type="html"><![CDATA[One of jabberd2 annoyances was its requirement to run one SM instance for every serviced domain. I already did some work for dynamic jabberd2 configuration introducing default host option in c2s.xml to remove requirement of restarting C2S every time one adds new serviced domain. But it still required launching separate SM process instance. Today I [...]]]></summary>
		<content type="html" xml:base="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/"><![CDATA[<p>One of jabberd2 annoyances was its requirement to run one SM instance for every serviced domain. I already did some work for dynamic jabberd2 configuration introducing default host option in c2s.xml to remove requirement of restarting C2S every time one adds new serviced domain. But it still required launching separate SM process instance.</p>
<p>Today I committed virtual domains support changes to SVN branch <a href="http://codex.xiaoka.com/svn/jabberd2/trunk/">http://codex.xiaoka.com/svn/jabberd2/branches/vhosts</a> which allows you to configure more than one serviced domain in only one SM instance.<br />
I successfully configured 3 domains in one SM instance and was able to talk between these 3 and one another in second SM process. All 4 connected to one Router process instance.</p>
<p>Unexpectedly it was pretty simple &#8211; it took me only ~6h. to get it working. :-)</p>
<p>Of course all domains serviced in one SM process have identical configuration. If you need domains with different configuration, you need to create another sm.xml and launch separate SM process for them.</p>
<p>The SVN <em>vhosts</em> branch changes need some polishing and testing. I would appreciate if you tried these and tell me what you think.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/">Virtual domains for jabberd2</a> &copy;, <a rel="license" href="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/"></a>.</small></p>]]></content>
<source>
	<title>Aberration » Jabber/XMPP</title>
	<link rel="alternate" type="text/html" href="http://tomasz.sterna.tv" />
	<link rel="self" href="http://tomasz.sterna.tv/topics/jabberxmpp/feed/" />
	<id>http://tomasz.sterna.tv/topics/jabberxmpp/feed/</id>
</source>
		<link rel="replies" type="text/html" href="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/#comments" thr:count="0"/>
		<link rel="replies" type="application/atom+xml" href="http://tomasz.sterna.tv/2009/06/virtual-domains-for-jabberd2/feed/" thr:count="0"/>
		<thr:total>0</thr:total>
	</entry>
	</feed>
