<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>leŭksman</title>
	<atom:link href="http://leuksman.com/log/feed/" rel="self" type="application/rss+xml" />
	<link>http://leuksman.com/log</link>
	<description>reticula, electronica, &#38; oddities</description>
	<lastBuildDate>Fri, 26 Feb 2010 19:52:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Printing from Mac to Linux: the cheat sheet</title>
		<link>http://leuksman.com/log/2010/02/26/printing-from-mac-to-linux-the-cheat-sheet/</link>
		<comments>http://leuksman.com/log/2010/02/26/printing-from-mac-to-linux-the-cheat-sheet/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 19:47:26 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[whinging]]></category>
		<category><![CDATA[linux cups printing desktoplinux]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=705</guid>
		<description><![CDATA[For the last few years, desktop Linux and Mac OS X alike have used CUPS (Common Unix Printing System) as their native printing subsystem. In an ideal world, this would mean it&#8217;s really easy to set them up to talk to each other.
In the world we live in, however, things are not so easy. Configuring [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few years, desktop Linux and Mac OS X alike have used <a href="http://www.cups.org/">CUPS (Common Unix Printing System)</a> as their native printing subsystem. In an ideal world, this would mean it&#8217;s really easy to set them up to talk to each other.</p>
<p>In the world we live in, however, things are not so easy. Configuring CUPS remains a black art, compounded by the absolutely abysmal reporting of errors to the printer UI on both OSes. To have any clue what&#8217;s going on you have to seek out and find the log files&#8230;</p>
<p>I can understand that on Linux, but really, how did Steve Jobs let this out the door on his precious Macintosh? Heck, Apple even <strong>bought</strong> the company that developed CUPS a few years back. Stop making our iPods smaller for a couple minutes and fix your printing error messages! <img src='http://leuksman.com/log/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>The situation</strong>:</p>
<p>I have a relatively straightforward setup: an Ubuntu Linux desktop PC (<em>stormcloud.local</em>) with a well-supported USB printer hooked up, and a Mac laptop (<em>nimbus.local</em>) which roams the world. When at home, it&#8217;s nice to be able to print directly from the Mac rather than print to PDF, copy the file, and then print.</p>
<p><strong>The cheat sheet:</strong></p>
<p>First the basics &#8212; make sure printer sharing is enabled on Linux; this much you should be able to do through the regular GUI:<strong><br />
</strong></p>
<p><a href="http://leuksman.com/log/wp-content/uploads/2010/02/Screenshot-Basic-Server-Settings.png"><img class="aligncenter size-medium wp-image-712" title="Screenshot-Basic Server Settings" src="http://leuksman.com/log/wp-content/uploads/2010/02/Screenshot-Basic-Server-Settings-300x197.png" alt="" width="300" height="197" /></a></p>
<p><a href="http://leuksman.com/log/wp-content/uploads/2010/02/Screenshot-Printer-configuration-localhost.png"><img class="aligncenter size-medium wp-image-713" title="Screenshot-Printer configuration - localhost" src="http://leuksman.com/log/wp-content/uploads/2010/02/Screenshot-Printer-configuration-localhost-300x262.png" alt="" width="300" height="262" /></a></p>
<p>Now the voodoo! Add to /etc/cups/cupsd.conf on Linux:</p>
<pre><span style="color: #000000;">    # Allow remote access
    ServerAlias *
    Port 631</span></pre>
<p>And restart cupsd:</p>
<pre>    sudo /etc/init.d/cupsd restart
</pre>
<p>Now, you can add the printer on the Mac; be sure to fill everything out!</p>
<p><a href="http://leuksman.com/log/wp-content/uploads/2010/02/Screen-shot-2010-02-26-at-11.02.54-AM.png"><img title="Screen shot 2010-02-26 at 11.02.54 AM" src="http://leuksman.com/log/wp-content/uploads/2010/02/Screen-shot-2010-02-26-at-11.02.54-AM.png" alt="" width="400" height="296" /></a></p>
<p>Several gotchas I discovered:</p>
<p><strong>Listening isn&#8217;t enough</strong></p>
<p>Very early in my journey I made sure that the Linux box&#8217;s cupsd.conf was set to listen on the network as well as to itself:</p>
<pre>    <span style="color: #993300;"><strong>BAD:</strong></span> Listen localhost:631</pre>
<pre>    <span style="color: #339966;"><strong>GOOD:</strong></span> Port 631</pre>
<p>But when I&#8217;d try to hit the CUPS web administration pages I&#8217;d just get a &#8220;400 Bad Request&#8221;. After some experimentation, I found that it actually responds just fine&#8230; as long as in the HTTP headers I call it &#8220;localhost&#8221; instead of by its proper local network name.</p>
<p>To get it working (so eg http://stormcloud.local:631/ would actually pull something up!) I had to add this to cupsd.conf:</p>
<pre>    <span style="color: #339966;"><strong>GOOD:</strong></span> ServerAlias *</pre>
<p>No, setting the name I wanted in ServerName mysteriously wasn&#8217;t enough.</p>
<p><strong>Pick a queue, any queue</strong></p>
<p>The Mac&#8217;s IPP printer setup dialog says you can leave the &#8220;Queue&#8221; field &#8220;blank for default queue&#8221;. This is a lie! Despite having only one printer available, I could only get printing working if I listed the queue explicitly.</p>
<p>To add insult to injury, you need to include the &#8220;printers/&#8221; prefix. This is easiest if you find the printer on the web interface and copy-paste the path from the URL&#8230;</p>
<p style="text-align: center;"><a href="http://leuksman.com/log/wp-content/uploads/2010/02/Screen-shot-2010-02-26-at-11.22.43-AM.png"><img class="aligncenter size-medium wp-image-709" title="Screen shot 2010-02-26 at 11.22.43 AM" src="http://leuksman.com/log/wp-content/uploads/2010/02/Screen-shot-2010-02-26-at-11.22.43-AM.png" alt="" width="400" height="343" /></a></p>
<p style="text-align: left;">Now I can print my dang Fandango tickets, which I&#8217;m pretty happy about!</p>
<p style="text-align: left;"><strong>Drivers</strong></p>
<p style="text-align: left;">I&#8217;ve been using the native driver for the printer on the Mac side. It should also work to just leave it at Generic PostScript as long as the Linux box has a driver, but I feel safer with it there. <img src='http://leuksman.com/log/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/02/26/printing-from-mac-to-linux-the-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introduction to OStatus: Atom-based federated messaging</title>
		<link>http://leuksman.com/log/2010/02/25/introduction-to-ostatus-atom-based-federated-messaging/</link>
		<comments>http://leuksman.com/log/2010/02/25/introduction-to-ostatus-atom-based-federated-messaging/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 05:55:05 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[microblogging]]></category>
		<category><![CDATA[OStatus]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=699</guid>
		<description><![CDATA[I&#8217;ve written up the little introduction to StatusNet&#8217;s new inter-site federation protocol; for now you can also find this article on the StatusNet wiki. I&#8217;ll follow up in the next couple days with demos of the subscription UI and subscribing to Google Buzz feeds as native OStatus data sources. &#8212; brion
What is OStatus?
You&#8217;re about to [...]]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;ve written up the little introduction to StatusNet&#8217;s new inter-site federation protocol; for now you can also find this article <a href="http://status.net/wiki/OStatus">on the StatusNet wiki</a>. I&#8217;ll follow up in the next couple days with demos of the subscription UI and subscribing to Google Buzz feeds as native OStatus data sources. &#8212; brion</em></p>
<h2>What is OStatus?</h2>
<p>You&#8217;re about to learn what <a title="http://ostatus.net/" rel="nofollow" href="http://ostatus.net/">OStatus</a> is and how it&#8217;s going to make communications between StatusNet sites work better!</p>
<p>Some of you may remember the bad old days when you couldn&#8217;t send e-mail between services like AOL and CompuServe. StatusNet/Laconica sites have used a custom protocol <a title="http://openmicroblogging.org/protocol/0.1/" rel="nofollow" href="http://openmicroblogging.org/protocol/0.1/">OMB</a> to set up subscriptions between sites, but OMB requires special support to be used with non-StatusNet services and is hard to extend.</p>
<p>By building on top of shared technologies already in use and being rolled out, we can go beyond that&#8230; our new effort, with better compatibility between sites, is named <strong>OStatus</strong>.</p>
<p><a id="The_basics" name="The_basics"></a></p>
<h2>The basics</h2>
<p>If we step back a bit, we find that <a title="http://www.atomenabled.org/" rel="nofollow" href="http://www.atomenabled.org/">Atom and RSS feeds</a> are already a lingua franca between sites. Virtually every service provides such feeds, giving a way for other tools and services to read someone&#8217;s outgoing posts.</p>
<table border="1" cellpadding="8" width="200" align="center">
<tbody>
<tr>
<td><a title="File:Basic-feed.png" href="http://status.net/wiki/File:Basic-feed.png"><img style="border: 0pt none;" src="http://status.net/wiki/images/f/fe/Basic-feed.png" border="0" alt="File:Basic-feed.png" width="198" height="280" /></a>At its simplest, a feed is a list of recent posts with some author attribution.</td>
</tr>
</tbody>
</table>
<p>But the fun of social networks is in real-time interaction &#8212; if your updates don&#8217;t get sent to your friends right away, it&#8217;s just not the same.</p>
<p>Luckily, that exact problem has been solved recently,  with <strong><a title="http://code.google.com/p/pubsubhubbub/" rel="nofollow" href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a> (PuSH)</strong>. In the PuSH system, a site can subscribe to updates for a feed from a hub server associated with that feed. Whenever a new post is created, the publishing site pings the hub, and the hub sends out just the new posts to all the subscribers.</p>
<p>OStatus is built on that simple base: each participating site produces Atom feeds of updates and uses PuSH subscriptions to send relevant updates to other sites:</p>
<table border="1" cellpadding="8" width="300" align="center">
<tbody>
<tr>
<td><a title="File:Push-delivery.png" href="http://status.net/wiki/File:Push-delivery.png"><img style="border: 0pt none;" src="http://status.net/wiki/images/f/f2/Push-delivery.png" border="0" alt="File:Push-delivery.png" width="315" height="350" /></a></p>
<p>Alice posts a message on identi.ca; a fragment of her Atom feed is PuSHed out to the other StatusNet sites that have users following her posts. Each of those sites is responsible for routing the message to individual subscribers.</td>
</tr>
</tbody>
</table>
<p>The real beauty of it is that at this point we already have something useful, without anything StatusNet-specific. In fact you can already subscribe to someone&#8217;s public <a title="http://www.google.com/buzz" rel="nofollow" href="http://www.google.com/buzz">Google Buzz</a> feed as an OStatus remote user, and they haven&#8217;t done anything special for us!</p>
<p><a id="The_good_stuff" name="The_good_stuff"></a></p>
<h2>The good stuff</h2>
<p>PuSH is a low-level piece of the puzzle; it&#8217;s just a way for services to send updates to each other. For a fully interactive social network, you need that human touch&#8230; you want to know who&#8217;s subscribing to you, which of your posts they like, and you want to get their replies to you.</p>
<p>For this we&#8217;re making use of more extensions that build on top of Atom feeds: Activity Streams, Portable Contacts, and Salmon.</p>
<p><strong><a title="http://activitystrea.ms/" rel="nofollow" href="http://activitystrea.ms/">Activity Streams</a></strong> extends Atom feeds to describe social &#8220;activities&#8221; more specifically than just &#8220;ok here&#8217;s a post&#8221;. Entries are marked with a verb (post, follow, favorite, etc) and more detail on who or what&#8217;s being acted on. We&#8217;ve extended this further using elements from <strong><a title="http://portablecontacts.net/" rel="nofollow" href="http://portablecontacts.net/">Portable Contacts</a></strong> to provide profile information:</p>
<table border="1" cellpadding="8" width="400" align="center">
<tbody>
<tr>
<td><a title="AS-actor.png" href="http://status.net/wiki/File:AS-actor.png"><img style="border: 0pt none;" src="http://status.net/wiki/images/thumb/8/89/AS-actor.png/500px-AS-actor.png" border="0" alt="" width="350" height="224" /></a>Extended author information beyond what Atom&#8217;s native &lt;author&gt; element provides.</td>
</tr>
</tbody>
</table>
<p><strong><a title="http://www.salmon-protocol.org/" rel="nofollow" href="http://www.salmon-protocol.org/">Salmon</a></strong> was created as a way for blog aggregators to send comments back to the original blog server, &#8220;like salmon swimming upstream&#8221;. We&#8217;re using this channel to send replies as well as other user-to-user events:</p>
<table border="1" cellpadding="8" width="400" align="center">
<tbody>
<tr>
<td><a title="File:Salmon-delivery.png" href="http://status.net/wiki/File:Salmon-delivery.png"><img style="border: 0pt none;" src="http://status.net/wiki/images/5/5b/Salmon-delivery.png" border="0" alt="File:Salmon-delivery.png" width="350" height="179" /></a>Bob replies to Alice from his home site; since she&#8217;s not subscribed to him, the reply is sent back to identi.ca as a Salmon ping.</td>
</tr>
</tbody>
</table>
<p>When your friend on Example.Net subscribes to your Identi.ca account, Example.Net sends an Atom entry with an Activity Streams &#8220;follow&#8221; verb to your Salmon reply channel on Identi.ca. This lets Identi.ca know who subscribed to you, so their profile gets added to your subscribers list and you get a notification that they&#8217;re following you.</p>
<p>If your Example.Net buddy gets social network overload and decides to unsubscribe from you, another notification comes through about the unsubscribe, and we can drop them from the list.</p>
<p>Other events can be sent over this channel as well, such as when your friends on other services mark your posts as a favorite.</p>
<p><a id="Groups" name="Groups"></a></p>
<h2>Groups</h2>
<p>One of the most annoying limitations with OMB 0.1 was that there&#8217;s no support for joining a group on another service. You might have noticed that groups have Atom feeds of posts just like users do&#8230; if you were wondering if that means groups could be run over OStatus too, you&#8217;re correct!</p>
<p>As a user on Identi.ca you can join a group on Example.Net without setting up an Example.Net account. Group posts from Example.Net will appear right in your inbox on Identi.ca just like any local group, and you can even post back to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/02/25/introduction-to-ostatus-atom-based-federated-messaging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why OStatus will rock your world</title>
		<link>http://leuksman.com/log/2010/02/22/why-ostatus-will-rock-your-world/</link>
		<comments>http://leuksman.com/log/2010/02/22/why-ostatus-will-rock-your-world/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 02:30:46 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=697</guid>
		<description><![CDATA[Hey everybody!
Things may have looked pretty quiet the last couple weeks, but here at SNI we&#8217;ve actually been rushing to get some really awesome things ready for you all&#8230;
In addition to finalizing StatusNet 0.9 with scalability and bug fixes to make it release-ready, we&#8217;ve been implementing our new federation protocol OStatus, successor to our older [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everybody!</p>
<p>Things may have looked pretty quiet the last couple weeks, but here at SNI we&#8217;ve actually been rushing to get some really awesome things ready for you all&#8230;</p>
<p>In addition to finalizing <a href="http://status.net/wiki/Product_Plan#0.9.x">StatusNet 0.9</a> with scalability and bug fixes to make it release-ready, we&#8217;ve been implementing our new federation protocol OStatus, successor to our older<a href="http://openmicroblogging.org/protocol/0.1/"> OMB 0.1</a>.</p>
<p>I know the <a href="http://status.net/wiki/OStatus">scattered notes</a> we&#8217;ve got up on the wiki right now are a little confusing, so over the next few days I&#8217;m going to start consolidating those into a clearer picture what OStatus is and how it&#8217;ll let StatusNet sites connect better to each other and to other systems.</p>
<p>In the meantime, active work on OStatus is currently proceeding in the &#8216;testing&#8217; branch in our gitorious mainline repository&#8230;</p>
<p>Stay tuned!</p>
<p>&#8211; brion vibber (brion @ status.net)<br />
Software Architect<br />
StatusNet, Inc<br />
San Francisco</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/02/22/why-ostatus-will-rock-your-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMPP output fix for StatusNet</title>
		<link>http://leuksman.com/log/2010/01/21/xmpp-output-fix-for-statusnet/</link>
		<comments>http://leuksman.com/log/2010/01/21/xmpp-output-fix-for-statusnet/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 01:22:42 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=695</guid>
		<description><![CDATA[Yay, it&#8217;s big commit time!
I&#8217;ve landed my XMPP output queuing work in 0.9.x, running on my public test site.  Do let me know if XMPP subscription or i/o is flaky on it!
Should be ready to merge to testing &#38; master and deploy when we&#8217;re content to do so&#8230; there is a database change necessary for [...]]]></description>
			<content:encoded><![CDATA[<p>Yay, it&#8217;s big commit time!</p>
<p>I&#8217;ve landed my <a href="http://status.net/wiki/Daemon_redesign#Output">XMPP output queuing work</a> in 0.9.x, running on my <a href="http://status.leuksman.com/">public test site</a>.  Do let me know if XMPP subscription or i/o is flaky on it!</p>
<p>Should be ready to merge to testing &amp; master and deploy when we&#8217;re content to do so&#8230; there is a database change necessary for the DB-based queueing system, so I want to confirm that&#8217;s not a problem before pushing out.</p>
<p>Big thanks to Craig Andrews for his work on generalizing the DB queues which I&#8217;ve started integrating; we should be able to land the rest including the IM pluginization for 1.0.</p>
<p><strong>Commit summary:</strong></p>
<p>XMPP queued output &amp; initial retooling of DB queue manager to support non-Notice objects.</p>
<p>Queue handlers for XMPP individual &amp; firehose output now send their XML stanzas to another output queue instead of connecting directly to the chat server. This lets us have as many general processing threads as we need, while all actual XMPP input and output go through a single daemon with a single connection open.</p>
<p>This avoids problems with multiple connected resources:</p>
<ul>
<li>multiple windows shown in some chat clients (psi, gajim, kopete)</li>
<li>extra load on server</li>
<li>incoming message delivery forwarding issues</li>
</ul>
<p>Database changes:</p>
<ul>
<li>queue_item drops &#8216;notice_id&#8217; in favor of a &#8216;frame&#8217; blob. This is based on Craig Andrews&#8217; work branch to generalize queues to take any object, but conservatively leaving out the serialization for now. Table updater (preserves any existing queued items) in db/rc3to09.sql</li>
</ul>
<p>Code changes to watch out for:</p>
<ul>
<li>Queue handlers should now define a handle() method instead of handle_notice()</li>
<li>QueueDaemon and XmppDaemon now share common i/o (IoMaster) and respawning thread management (RespawningDaemon) infrastructure.</li>
<li>The polling XmppConfirmManager has been dropped, as the message is queued directly when saving IM settings.</li>
<li>Enable $config['queue']['debug_memory'] to output current memory usage at each run through the event loop to watch for memory leaks</li>
</ul>
<p>To do:</p>
<ul>
<li>Adapt XMPP i/o to component connection mode for multi-site support.</li>
<li><a href="http://status.net/wiki/Daemon_redesign#Input">XMPP input can also be broken out</a> to a queue, which would allow the actual notice save etc to be handled by general queue threads.</li>
<li>Make sure there are no problems with simply pushing serialized Notice objects to queues.</li>
<li>Find a way to improve interactive performance of the database-backed queue handler; polling is pretty painful to XMPP.</li>
<li>Possibly redo the way QueueHandlers are injected into a QueueManager. The grouping used to split out the XMPP output queue is a bit awkward.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/01/21/xmpp-output-fix-for-statusnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RTL language requirements for StatusNet</title>
		<link>http://leuksman.com/log/2010/01/13/rtl-language-requirements-for-statusnet/</link>
		<comments>http://leuksman.com/log/2010/01/13/rtl-language-requirements-for-statusnet/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 22:40:47 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=692</guid>
		<description><![CDATA[There&#8217;s a few tricks to properly supporting right-to-left languages like Arabic and Hebrew in web applications, which we currently have a few issues with in StatusNet.
I&#8217;ve written up some notes on the wiki&#8230; link on for the fun!

]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a few tricks to properly supporting right-to-left languages like Arabic and Hebrew in web applications, which we currently have a few issues with in StatusNet.</p>
<p>I&#8217;ve written up some <a href="http://status.net/wiki/RTL_support">notes on the wiki</a>&#8230; link on for the fun!</p>
<p><a href="http://status.net/wiki/RTL_support"><img class="alignnone" title="bidi funk" src="http://status.net/wiki/images/0/02/Bidi-wrong-right.png" alt="" width="399" height="391" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/01/13/rtl-language-requirements-for-statusnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StatusNet queue refactoring landed</title>
		<link>http://leuksman.com/log/2010/01/12/statusnet-queue-refactoring-landed/</link>
		<comments>http://leuksman.com/log/2010/01/12/statusnet-queue-refactoring-landed/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 05:10:12 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=689</guid>
		<description><![CDATA[Woohoo! After a couple months off and on adjusting the architecture to  something that seems to meet our needs, I&#8217;ve merged my refactoring of  StatusNet&#8217;s background queue processing to 0.9.x.
Some of my design notes are up on the wiki, with a couple updates based  on tweaks I made from my original plans.
Key [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://status.net/wiki/Daemon_redesign#Statistics_and_logging"><img class="alignright size-full wp-image-690" title="queues" src="http://leuksman.com/log/wp-content/uploads/2010/01/q.png" alt="" width="205" height="240" /></a>Woohoo! After a couple months off and on adjusting the architecture to  something that seems to meet our needs, I&#8217;ve merged my refactoring of  StatusNet&#8217;s background queue processing to 0.9.x.</p>
<p>Some of my <a href="http://status.net/wiki/Daemon_redesign">design notes are up on the wiki</a>, with a couple updates based  on tweaks I made from my original plans.</p>
<p>Key items from the <a href="http://www.gitorious.org/statusnet/mainline/commit/ec145b73fc91dd54695dd374c8a71a11e233b8c0">commit summary</a>:</p>
<p><strong>Major refactoring of queue handlers to support running multiple sites in one daemon. </strong></p>
<p><strong>Key changes: </strong></p>
<ul>
<li>Initialization code moved from common.php to StatusNet class; can now switch configurations during runtime.</li>
<li>As a consequence, configuration files must now be idempotent&#8230; Be careful with constant, function or class definitions.</li>
<li>Control structure for daemons/QueueManager/QueueHandler has been refactored; the run loop is now managed by IoMaster run via scripts/queuedaemon.php IoManager subclasses are woken to handle socket input or polling, and may cover multiple sites.</li>
<li>Plugins can implement notice queue handlers more easily by registering a QueueHandler class; no more need to add a daemon.</li>
</ul>
<p>The new QueueDaemon runs from scripts/queuedaemon.php:</p>
<ul>
<li>This replaces most of the old *handler.php scripts; they&#8217;ve been refactored to the bare handler classes.</li>
<li>Spawns multiple child processes to spread load; defaults to CPU count on Linux and Mac OS X systems, or override with &#8211;threads=N</li>
<li>When multithreaded, child processes are automatically respawned on failure.</li>
<li>Threads gracefully shut down and restart when passing a soft memory limit (defaults to 90% of memory_limit), limiting damage from memory leaks.</li>
<li>Support for UDP-based monitoring: <a href="http://www.gitorious.org/snqmon">http://www.gitorious.org/snqmon</a></li>
</ul>
<p>Rough control flow diagram:</p>
<table>
<tbody>
<tr>
<td>QueueDaemon -&gt;</td>
<td>IoMaster -&gt;</td>
<td>IoManager</td>
</tr>
<tr>
<td colspan="2"></td>
<td>QueueManager [listen or poll] -&gt;  QueueHandler</td>
</tr>
<tr>
<td colspan="2"></td>
<td>XmppManager [ping&amp;  keepalive]</td>
</tr>
<tr>
<td colspan="2"></td>
<td>XmppConfirmManager [poll updates]</td>
</tr>
</tbody>
</table>
<p><strong>Todo: </strong></p>
<ul>
<li>Respawning features not currently available running single-threaded.</li>
<li>When running single-site, configuration changes aren&#8217;t picked up.</li>
<li>New sites or config changes affecting queue subscriptions are not yet handled without a daemon restart.</li>
<li>SNMP monitoring output to integrate with general tools (nagios, ganglia)</li>
<li>Convert XMPP confirmation message sends to use stomp queue instead of polling</li>
<li>Convert xmppdaemon.php to IoManager?</li>
<li>Convert Twitter status, friends import polling daemons to IoManager</li>
<li>Clean up some error reporting and failure modes</li>
<li>May need to adjust queue priorities for best perf in backlog/flood cases</li>
</ul>
<p>Detailed code history available in my <a href="http://www.gitorious.org/~brion/statusnet/brion-fixes/commits/daemon-work">daemon-work branch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2010/01/12/statusnet-queue-refactoring-landed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time zones: do we really need them?</title>
		<link>http://leuksman.com/log/2009/12/29/time-zones-do-we-really-need-them/</link>
		<comments>http://leuksman.com/log/2009/12/29/time-zones-do-we-really-need-them/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 23:34:51 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=683</guid>
		<description><![CDATA[While looking at StatusNet&#8217;s preferences dialog, I noticed we have a fairly generic but  unfriendly timezone selector, done as a drop-down box with a raw list of  zone names &#8212; this makes you find and select something like  &#8220;America/Los_Angeles&#8221; or &#8220;Asia/Tokyo&#8221;:

Not only is the list very long and confusingly sorted, but the [...]]]></description>
			<content:encoded><![CDATA[<p>While looking at StatusNet&#8217;s <a href="http://identi.ca/settings/profile">preferences dialog</a>, I noticed we have a fairly generic but  unfriendly timezone selector, done as a drop-down box with a raw list of  zone names &#8212; this makes you find and select something like  &#8220;America/Los_Angeles&#8221; or &#8220;Asia/Tokyo&#8221;:</p>
<p><a href="http://leuksman.com/log/wp-content/uploads/2009/12/timezone-whoa.png"><img class="alignnone size-medium wp-image-685" title="timezone-whoa" src="http://leuksman.com/log/wp-content/uploads/2009/12/timezone-whoa-188x300.png" alt="" width="188" height="300" /></a></p>
<p>Not only is the list very long and confusingly sorted, but the names are  all either English or acronyms, making it hard to internationalize.</p>
<p>It occurs to me that we very rarely actually output formatted dates in  the web interface anyway&#8230; most of the time we output relative times  like &#8220;a few seconds ago&#8221; or &#8220;3 months ago&#8221;.</p>
<p>In fact, about the only place I can see that we&#8217;re outputting a fully  formatted date is on an <a href="http://identi.ca/notice/15645070">individual notice like this</a>:</p>
<p>&#8220;Brion Vibber (brionv) &#8217;s status on Friday, 27-Nov-09 19:19:11 UTC&#8221;<br />
&#8220;Brion Vibber (brionv) &#8217;s status on Friday, 27-Nov-09 11:19:11 PST&#8221;<br />
etc</p>
<p>though we also have tooltips on the approximation eg &#8220;about a month  ago&#8221;: &#8220;2009-11-27T11:19:11-08:00&#8243;</p>
<p>My own inclination would be to drop the timezone preferences entirely;  in the rare cases where we output a formatted local date we can let  client-side JavaScript do the actual date formatting with the client  system&#8217;s actual time zone and language settings, with a UTC/GMT fallback  for clients with JS disabled.</p>
<p>This drops an unnecessary and hard-to-select option field from  preferences and site administration panels, and avoids inconsistencies  when you travel or move and forget to update the timezone.</p>
<p>Any objections or suggestions for further refinement?</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2009/12/29/time-zones-do-we-really-need-them/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Welcome to the lower middle class?</title>
		<link>http://leuksman.com/log/2009/12/24/welcome-to-the-lower-middle-class/</link>
		<comments>http://leuksman.com/log/2009/12/24/welcome-to-the-lower-middle-class/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 01:53:06 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>
		<category><![CDATA[whinging]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=679</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://identi.ca/notice/17427319"><img class="size-full wp-image-680 alignnone" title="Hehe... I'm not actually in a trailer park... accurate geonames for inaccurate locations are fun. :D (A few seconds ago from web at Rail-A-Way Trailer Park, Browning, California, US)" src="http://leuksman.com/log/wp-content/uploads/2009/12/trailer.png" alt="Hehe... I'm not actually in a trailer park... accurate geonames for inaccurate locations are fun. :D [A few seconds ago from web at Rail-A-Way Trailer Park, Browning, California, US ]" width="572" height="119" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2009/12/24/welcome-to-the-lower-middle-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Location fuzzing in StatusNet</title>
		<link>http://leuksman.com/log/2009/12/19/location-fuzzing-in-statusnet/</link>
		<comments>http://leuksman.com/log/2009/12/19/location-fuzzing-in-statusnet/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 20:25:56 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=674</guid>
		<description><![CDATA[I had a chat today w/ Craig Andrews &#38; Chris Vollick about StatusNet&#8217;s geolocation support and how we might be able to better present how location info will be used, to avoid freaking people out with unexpected maps to their homes.  
Some notes and this mockup for expanded location setup in preferences are on [...]]]></description>
			<content:encoded><![CDATA[<p>I had a chat today w/ Craig Andrews &amp; Chris Vollick about StatusNet&#8217;s geolocation support and how we might be able to better present how location info will be used, to avoid freaking people out with unexpected maps to their homes. <img src='http://leuksman.com/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://status.net/wiki/Location_fuzzing">Some notes and this mockup</a> for expanded location setup in preferences are on the wiki.</p>
<p><a href="http://status.net/wiki/Location_fuzzing"><img class="alignnone" title="Map options mockup" src="http://status.net/wiki/images/5/57/Map-options-mockup.png" alt="" width="397" height="251" /></a></p>
<p>The main points are:</p>
<ul>
<li>provide context for the browser&#8217;s location lookup opt-in (don&#8217;t trigger it until you&#8217;re poking at your location options)</li>
<li>show a sample map in the prefs so you know what other people will see</li>
<li>provide a one-click way to disable browser location lookups entirely</li>
<li>provide a one-click way to reduce the accuracy to city-level, probably by default</li>
</ul>
<p>Any thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2009/12/19/location-fuzzing-in-statusnet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 issues in StatusNet 0.9</title>
		<link>http://leuksman.com/log/2009/12/16/php-5-3-issues-in-statusnet-0-9/</link>
		<comments>http://leuksman.com/log/2009/12/16/php-5-3-issues-in-statusnet-0-9/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 18:32:09 +0000</pubDate>
		<dc:creator>brion</dc:creator>
				<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[devel]]></category>

		<guid isPermaLink="false">http://leuksman.com/log/?p=671</guid>
		<description><![CDATA[I did a little testing on the plane yesterday to see what PHP 5.3 issues are still remaining in StatusNet 0.9; most of the problems are with upstream libraries, but they break a number of things.
]]></description>
			<content:encoded><![CDATA[<p>I did a little testing on the plane yesterday to see what <a href="http://status.net/wiki/PHP_5.3_issues">PHP 5.3 issues are still remaining</a> in StatusNet 0.9; most of the problems are with upstream libraries, but they break a number of things.</p>
]]></content:encoded>
			<wfw:commentRss>http://leuksman.com/log/2009/12/16/php-5-3-issues-in-statusnet-0-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
