<?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>M@Blog &#187; Linuxy</title>
	<atom:link href="http://mattwork.potsdam.edu/blog/category/linuxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattwork.potsdam.edu/blog</link>
	<description></description>
	<lastBuildDate>Wed, 18 Nov 2009 23:09:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Droid Does, Indeed</title>
		<link>http://mattwork.potsdam.edu/blog/2009/11/11/droid-does-indeed/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/11/11/droid-does-indeed/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 11:47:38 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Products]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=593</guid>
		<description><![CDATA[I really expected the HTC Dream (T-Mobile G1) to seriously dent the mobile device world. I had been using the Android SDK for a bit, but didn&#8217;t have hardware to test on, so I bought one. Great keyboard. Decent UI. Tiny screen. Slow processor. Lousy device support. Horrible network.
A little later, I really expected the [...]]]></description>
			<content:encoded><![CDATA[<p>I really expected the HTC Dream (T-Mobile G1) to seriously dent the mobile device world. I had been using the Android SDK for a bit, but didn&#8217;t have hardware to test on, so I bought one. Great keyboard. Decent UI. Tiny screen. Slow processor. Lousy device support. Horrible network.</p>
<p>A little later, I really expected the Palm Pre to be the nirvana of compact, hyper-connected mobile devices. It wasn&#8217;t <a href="http://www.apple.com/">pretentious</a>. It had a f%$#!%&amp; keyboard. It was ahead of the curve in a number of features. But it wasn&#8217;t <em>substantially</em> different. Palm made the concious decision to keep the interface very similar to the old Palm OS, and let&#8217;s face it &#8211; user interfaces have evolved since then. But I got one. I like it. It&#8217;s a nice toy. If you want a compact, full-features smart phone, it&#8217;s still your best bet.</p>
<p>Motorola unveiled the Sholes over the summer. Beefy processor. Best-of-breed screen. Ridiculous connectivity solutions. A f%$#!%&amp; keyboard. And CDMA (like the pre) so I don&#8217;t have to use the Ancient Telegram &amp; Trash network. 5MP camera w/ LED flash. Ran Android (1.6 at the time). Super cool. At that point, they were still shopping for a vendor. I was cautiously optimistic it wouldn&#8217;t be a metro-only network like T-Mobile or Sprint.</p>
<p>Then came the onslaught of <a href="http://droiddoes.com/">Droid Does</a> during the baseball post-season. Speculation ran wild as to which phone it was, beneath the hype. <a href="http://www.boygeniusreport.com/">BGR</a> scooped it and pointed it out as a Sholes running Android 2.0. Thursday last I received mine.</p>
<p>Metal. Everywhere.</p>
<p>Ridiculously clear screen with outstanding pixel density.</p>
<p>Incredibly fast processor.</p>
<p>A f%$#!%&amp; keyboard.</p>
<p>Seamless integration with all of the stuff I use (e-mail, calendar, contacts, etc. etc.).</p>
<p>Transparent movement between WIFI and the Verizon 3G network.</p>
<p>Incredibly fast processor.</p>
<p>Deep interface built atop a fully-accessible Linux system.</p>
<p>Scads of customizability.</p>
<p>Surprisingly good camera with shockingly bright flash.</p>
<p>Oh, and an incredibly fast processor.</p>
<p>If the pricetag is $100 too high for you, Verizon is also offering an HTC-based version called the Eris with no keyboard, more plastic, and a mid-level processor, with the same interface and general feature-set.</p>
<p>Oh yeah, and when you send e-mail, it&#8217;s not tagged &#8220;Sent from my &lt;BlackBerry|iPhone|Other Pretentious Device&gt;&#8221;.</p>
<p>But, since most people seem to enjoy those things: This post authored using a WordPress app from my Droid.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/11/11/droid-does-indeed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More About Endocrys</title>
		<link>http://mattwork.potsdam.edu/blog/2009/10/30/more-about-endocrys/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/10/30/more-about-endocrys/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 02:12:22 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=584</guid>
		<description><![CDATA[I previously mentioned that I&#8217;ve re-acquired rights to Endocrys, and that I was excited about it. My copious free time has been spent, of late, ripping it apart and making it cleaner and applying the lessons learned over 7 years of maintaining a sizable (458 system (peak)) Endocrys network.
Endocrys has two primary modular components: Autocrys [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://mattwork.potsdam.edu/blog/2009/10/27/introducing-endocrys/">previously mentioned</a> that I&#8217;ve re-acquired rights to Endocrys, and that I was excited about it. My copious free time has been spent, of late, ripping it apart and making it cleaner and applying the lessons learned over 7 years of maintaining a sizable (458 system (peak)) Endocrys network.</p>
<p>Endocrys has two primary modular components: Autocrys and Paracrys.</p>
<p><strong>Autocrys</strong> is an extensible communication protocol atop XMPP. It governs the syntax of commands or queries sent to systems or groups, the responses of systems to those queries, how to manage their presence, and how to react to presence changes in others.</p>
<p><strong>Paracrys</strong> is a database-driven deployment and configuration system. Paracrys allows module code and configuration data to be stored centrally and deployed to Endocrys nodes on-demand. Paracrys fully supports versioning, thus allowing changes to be rolled-back in the case of a major oopsie. How small can a Paracrys module be? Here&#8217;s an example that implements a command called &#8217;shell&#8217; that allows you to do, essentially, whatever you want on an Endocrys client:</p>
<pre>BEGIN { $Endo::MODS{SHELL}++; $Endo::CMDS{SHELL} = \&amp;shell; }
END { delete $Endo::MODS{SHELL}; delete $Endo::CMDS{SHELL}; }

sub shell {
 return `@_`;
}</pre>
<p>Drop that puppy into the Paracrys MODULES table with some other data, issue a mass &#8220;fetch module SHELL; refresh;&#8221; command, and bingo, all of your systems now let you do very bad things. It&#8217;s that easy to create a command to do something&#8230; Hopefully something useful.</p>
<p>Of course you should note that there is no access control in the above code&#8230; How do we prevent Bad People from using our horrendously very bad shell command? That used to be managed by the Communication Masters using another database called EndoACL, but has been folded into Paracrys&#8217; duties and drastically simplified. Each Endocrys client, when receiving the shell command, will now ask Paracrys if the user who sent it is authorized to issue that command. Previously, the clients never even received commands from users not authorized to send them, at great expense.</p>
<p>One of the major goals of the project originally was to have absolutely minimal dependencies on third-party code, so I reinvented the wheel in numerous places. Now that it&#8217;s mine again, those requirements are vapor and I&#8217;m ripping out large swaths of my code, and exchanging it for API calls into other code that is the de facto standard to do whatever. For example, I wrote a function that copies a file from one location to another. Ew. The <a href="http://search.cpan.org/perldoc?File::Copy">File::Copy</a> module is the Perl Way to do that, so that&#8217;s how we do it now. Less code I have to maintain, and less code you have to read to understand Endocrys.</p>
<p>Another major goal of the original project was absolute redundancy on all levels. With a requirement like that, I over-engineered what were called the Communication Masters (CMs) so that they heart-beated each other, transferred each other&#8217;s sessions, held elections to decide who was authoritative for which IP ranges, dealt with segmentation and partitioning, etc. All of this at the cost of highly-customized hybrid XMPP/SQL servers that weren&#8217;t readily upgradeable. Wednesday night I spent a lot of time diagramming, and tonight solidified the spec to separate the XMPP server from the SQL database, and rely on established high-availability tools like <a href="http://siag.nu/pen/">pen</a> or an SLB appliance to ensure connectivity to a farm of XMPP servers if needed. Additionally, this separation has allowed me to use MySQL clusters for the Paracrys bits, which adds scary levels of redundancy to those very critical bits.</p>
<p>Lastly for this post, the entire ithread Endocrys implementation has been ripped out and replaced with <a href="http://search.cpan.org/perldoc?EV">EV</a> and <a href="http://search.cpan.org/perldoc?AnyEvent">AnyEvent</a>, and the <a href="http://search.cpan.org/perldoc?Net::XMPP">Net::XMPP</a> code has been replaced with <a href="http://search.cpan.org/perldoc?AnyEvent::XMPP">AnyEvent::XMPP</a> for one cohesive event loop that runs very very fast. Originally I envisioned an Endocrys client maintaining dozens of XMPP sessions while handling dozens of system events and receiving dozens of commands, so I stuck everything in threads, and allowed it to scream along on SMP boxes. While this works just fine, there is a LOT of extra complexity involved with sharing variables across threads, dealing with races, etc. and the benefits are dubious when compared against a good, strong, <a href="http://search.cpan.org/perldoc?EV">event-loop system</a>. I&#8217;m not quite done yet, but the net loss should be about 30% of the main code modules, with reduced complexity for all sub-modules as well.</p>
<p>I don&#8217;t have an ETA as to when the code will be generally available, but I&#8217;ve had some pings from some bright people interested in hammering the retooled version in non-critical environments, so hopefully it will be this year.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/10/30/more-about-endocrys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Endocrys</title>
		<link>http://mattwork.potsdam.edu/blog/2009/10/27/introducing-endocrys/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/10/27/introducing-endocrys/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 22:52:43 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=581</guid>
		<description><![CDATA[Endocrys [en doe kriss] (was Endocryn until a TradeMark popped up) is a distributed, encrypted, modular, real-time, hot-upgradable, self-healing system geared at autonomous communication between distributed systems. It was developed for a client in 2002 and 2003, and they&#8217;ve decided to let the 10-year exclusivity lapse early.
This is one of my favorite products, and I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Endocrys [en doe kriss] (was Endocryn until a TradeMark popped up) is a distributed, encrypted, modular, real-time, hot-upgradable, self-healing system geared at autonomous communication between distributed systems. It was developed for a client in 2002 and 2003, and they&#8217;ve decided to let the 10-year exclusivity lapse early.</p>
<p>This is one of my favorite products, and I&#8217;m more than a little excited to get it back and get it out. It&#8217;s been battle-tested for many years, and I&#8217;m very proud of it. I&#8217;m working on getting the code cleaned up and abstracted before releasing it under the GPLv2. Below are edited points from slides describing Endocrys and why you might be interested in it.</p>
<h2>The Problems</h2>
<p>Dozens&#8230; hundreds&#8230; of systems, physical and virtual, all going about their business. Then something happens: maybe a disk drive failed, maybe a process died, maybe someone ordered a &#8216;reboot&#8217; or &#8216;halt&#8217;. Those systems don&#8217;t have a way of communicating that externally. There is no &#8220;Hey, I&#8217;m rebooting, BRB&#8221; in the server world.</p>
<p>Dozens&#8230; hundreds&#8230; of systems, physical and virtual, all going about their business. Then you have a question: How many of them have Western Digital harddrives listed in a recent recall? How many of them are running &lt;2GB of RAM? How many of them are running a certain version of some software listed in a security advisory? There&#8217;s no way to ask that question to the farm. There is no &#8220;Dear Lazyweb, answer this question for me&#8221; in the server world.</p>
<h2>The Purpose</h2>
<p>At its most basic level, Endocrys is a conduit between all of the systems and you. Think of it like a gigantic Instant Messaging buddy list, where all of your buddies are systems. When they&#8217;re online, they are in the list and can set their status messages, send you messages, send each other messages, receive messages, etc. Endocrys leverages the eXtensible Messaging and Presence Protocol (XMPP) to tie this framework into existing clients, transports and APIs, enabling a near-infinite number of possible applications or functions you can deploy.</p>
<h2>The Technology</h2>
<p>Endocrys is built as a framework &#8211; an abstract set of rules that can be extended at any time by writing little modules. These modules can be applied across the Endrocrys network instantly, without any downtime.</p>
<p>By leveraging XMPP, the Endocrys network is highly-redundant with no single fail points. Any number of &#8220;Communication Masters&#8221; (XMPP servers) are online, but only one is needed to keep communication flowing. All network communication is encrypted and signed. Partitioning and segmentation is handled rationally.</p>
<p>Communication is very similar to Instant Messaging, there is relatively no latency, and XMPP assures delivery even to systems offline when the message was sent.</p>
<p>Monitoring and control systems can participate on Endocrys, automating the remediation of problems remotely and automatically.</p>
<h2>The Protocol</h2>
<p>XMPP sits atop TCP, and atop that sits the Endocrys Communication Protocol aka Autocrys. ECP is a fully-authenticated, fully-controlled, skeptical protocol that serves both for sending structured announcements as well as sending and processing commands. The entire ECP specification is listed in AUTOCRYS.TXT. Endocrys agents can be written in any programming language, attached to any other framework, at any OSI level, as long as they can speak XMPP and implement ECP appropriately.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/10/27/introducing-endocrys/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Expansive Consolidation: Saga 3</title>
		<link>http://mattwork.potsdam.edu/blog/2009/10/23/expansive-consolidation-saga-3/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/10/23/expansive-consolidation-saga-3/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 22:02:26 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=567</guid>
		<description><![CDATA[As discussed previously, I&#8217;m in the midst of a rather involved and highly-delicate &#8220;case mod&#8221; involving  expensive wooden furniture and nearly 350degrees of thermal load, in my copious free time.
The first diagram below (left) shows the near-final design diagram, and I&#8217;ve confirmed that everything fits. Everything except the rear exhaust fan block. There will [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://mattwork.potsdam.edu/blog/2009/10/16/expansive-consolidation-sagas-1-and-2/">discussed previously</a>, I&#8217;m in the midst of a rather involved and highly-delicate &#8220;case mod&#8221; involving  expensive wooden furniture and nearly 350degrees of thermal load, in my copious free time.</p>
<p>The <a href="http://mattwork.potsdam.edu/blog/wp-content/uploads/2009/10/etfront.png">first diagram below</a> (left) shows the near-final design diagram, and I&#8217;ve confirmed that everything fits. Everything except the rear exhaust fan block. There will have to be a wee bit of &#8230; &#8220;furniture modification&#8221; as the slot for cable ingress is too small. A liquid cooling system was added mainly to keep the sound level down. The pump is quieter than most fans, and the large CPU heatsink and exhaust fan pictured were able to be replaced with a small copper block and some tubes.</p>
<p>The<a href="http://mattwork.potsdam.edu/blog/wp-content/uploads/2009/10/etcase.png"> second diagram below</a> (right) outlines the machining specification for the replacement front door panel. Originally it was  high-end non-thermal glass (to allow remote control IR to pass through), but had to be replaced with something I could cut. After a bunch of trial and error, I settled on  1/8&#8243; acrylic. I&#8217;m still working on this piece- I&#8217;ve gone through a bunch of scrap trying to get the cuts and breaks right, and that is holding up the final tweaking (and pictures!), mostly.</p>
<p>The liquid cooling system (pump and exhaust fans) has a total noise of 11dB, all of which are in the rear of the cabinet. The 120MM intake fan is almost completely silent ~5dB, but inward-facing so it doesn&#8217;t expel much noise at all (&lt;1db immediately outside the cabinet). The noise measure from The Comfiest Couch in the world with the entire system runnng is 5 dB &#8211; quiet enough to hear the harddrives prattling about, and substantially quieter (5-6 times) than the air-cooled equivalent.</p>

<a href='http://mattwork.potsdam.edu/blog/2009/10/23/expansive-consolidation-saga-3/etfront/' title='Entertainment Center Case, Front View'><img width="150" height="150" src="http://mattwork.potsdam.edu/blog/wp-content/uploads/2009/10/etfront-150x150.png" class="attachment-thumbnail" alt="" title="Entertainment Center Case, Front View" /></a>
<a href='http://mattwork.potsdam.edu/blog/2009/10/23/expansive-consolidation-saga-3/etcase/' title='Entertainment Center, Front Door Glass Replacement'><img width="150" height="150" src="http://mattwork.potsdam.edu/blog/wp-content/uploads/2009/10/etcase-150x150.png" class="attachment-thumbnail" alt="" title="Entertainment Center, Front Door Glass Replacement" /></a>

]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/10/23/expansive-consolidation-saga-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expansive Consolidation: Sagas 1 and 2</title>
		<link>http://mattwork.potsdam.edu/blog/2009/10/16/expansive-consolidation-sagas-1-and-2/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/10/16/expansive-consolidation-sagas-1-and-2/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 22:38:22 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=558</guid>
		<description><![CDATA[Saga 1: The Cascading Power of New Things
A while back, I got a new &#8220;TV&#8221;: An LG LH90. This TV, unlike my old TV (a Sony Wega that weighed 275lbs), could actually be placed atop furniture (as opposed to a steel-reinforced, purpose-built &#8220;Wega Stand&#8221;). Through the miracle of 4 HDMI ports on the TV, the [...]]]></description>
			<content:encoded><![CDATA[<h2>Saga 1: The Cascading Power of New Things</h2>
<p>A while back, I got a new &#8220;TV&#8221;: An <a href="http://www.lge.com/products/model/detail/lh90%20series.jhtml">LG</a> LH90. This TV, unlike my old TV (a Sony Wega that weighed 275lbs), could actually be placed atop <em>furniture</em> (as opposed to a steel-reinforced, purpose-built &#8220;Wega Stand&#8221;). Through the miracle of 4 HDMI ports on the TV, the cable box, Playstation 3 and my primary home PC can all be slaved  to a single gigantic screen: The TV also has a fiberoptic audio output which went smoothly into my old-yet-still-amazing surround-sound receiver, allowing me to use just the HDMI between devices for all video <em>and</em> audio. Consolidation nirvana!! But there was a problem:</p>
<p>My TV could be remote controlled from The Comfiest Couch In The World.</p>
<p>My PS3 could be remote controlled from The Comfiest Couch In The World.</p>
<p>My cable box could be remote controlled from The Comfiest Couch In The World.</p>
<p>My PC &#8230; couldn&#8217;t.</p>
<p>*twitch* *twitch* *sob* I had to <em>get up</em> and &#8230; *twitch* push a button.</p>
<p>So, I set upon the Intertubes with the goal of fixing that. Unfortunately, as forays into the morass of technology acquisition seem to go for me, I was sidetracked by a dangerous thing: <em>potential.</em></p>
<h2>Saga 2: Patiently Purveying Potential Possibilities&#8230; Primarily</h2>
<p>While I should have been sufficiently pleased with acquiring a <a href="http://www.thermaltakeusa.com/">Thermaltake</a> <a href="http://www.thermaltakeusa.com/Product.aspx?C=1156&amp;ID=1485">HTPC remote system</a>, I kept listing restlessly at night, thinking of the other magical things I saw on the Interweb&#8230; Thinking of what I <em>could</em> do. After all, wouldn&#8217;t it be <em>so cool</em> if I built my PC <em>into</em> the <em>furniture</em>? That little cubby on the right was just begging to be modded- Begging to serve a higher purpose than banal storage.</p>
<p>But a mod of <em>wood</em>? Wood is a poor conductor of heat, and an amazing insulator: That would be a thermodynamic nightmare! And that point was precisely why I had to do it: I found a worthy challenge.</p>
<h3>Specification</h3>
<ul>
<li>Must not destroy, scratch or poke holes in the pricey (and pretty) furniture</li>
<li>Must properly cool my 6-core system, and oversized graphics cards</li>
<li>Must not be externally louder than current design (10-20dB)</li>
<li>Must be completely controllable from The Comfiest Couch In The World</li>
<li>Must be worthy</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/10/16/expansive-consolidation-sagas-1-and-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Can You Have Too Many Roombas?</title>
		<link>http://mattwork.potsdam.edu/blog/2009/10/08/can-you-have-too-many-roombas/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/10/08/can-you-have-too-many-roombas/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 22:45:00 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Roomba]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=553</guid>
		<description><![CDATA[I have four Roombas of three different models (I blame Steve for telling me about &#8220;deals&#8221;). I think I may have too many. Regardless, the one thing they all have in common is a hacked together BlueTooth connection so I can run various software on them remotely. While I haven&#8217;t really talked a lot about [...]]]></description>
			<content:encoded><![CDATA[<p>I have four Roombas of three different models (I blame Steve for telling me about &#8220;deals&#8221;). I think I may have too many. Regardless, the one thing they all have in common is a hacked together BlueTooth connection so I can run various software on them remotely. While I haven&#8217;t really talked a lot about those &#8220;various softwares&#8221;, I&#8217;m really excited about a project I&#8217;m working on now, working title of RooCluster.</p>
<p>RooCluster is a command-and-control application designed for the special needs of  multiple robots operating in the same space, or over large multi-room spaces. Each Roomba is being fitted with an RFID tag, which, in coordiation with some more wireless access points, allows me to triangulate where a Roomba is and its travel vector (sometimes, math is cool). This information can help RooCluster avoid nasty Roomba-on-Roomba collisions, and also presents the possibility of meta-virtual walls.</p>
<p>If you have a Roomba, you probably have a virtual wall &#8211; the little pylon that sends out an infrared beam that the Roombas treat just like a wall. With some work, RooCluster should be able to honor coordinate-based lines (which could, in turn, form other shapes) and effectively &#8220;wall-off&#8221; areas without needing a physical barrier, or a battery-sucking virtual wall. You can also overlay the position and vector data onto floorplans, and see exactly where the Roombas are, and where they&#8217;re going.</p>
<p>Of course, you can also use it to make your Roombas dance with each other.</p>
<p>Or joust.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/10/08/can-you-have-too-many-roombas/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Disposable Appliance Computing</title>
		<link>http://mattwork.potsdam.edu/blog/2009/09/24/disposable-appliance-computing/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/09/24/disposable-appliance-computing/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:54:45 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=530</guid>
		<description><![CDATA[[NOTE: This essay was commissioned by a client in February 2007. It's the first in a series of old-yet-relevant position-papers whose exclusivity has expired, that I'm editing and posting]
The hosted systems industry has turned another critical point. Several years ago we eschewed large mainframe systems in exchange for commodity servers that could divide load and [...]]]></description>
			<content:encoded><![CDATA[<p>[<strong>NOTE:</strong> This essay was commissioned by a client in February 2007. It's the first in a series of old-yet-relevant position-papers whose exclusivity has expired, that I'm editing and posting]</p>
<p>The hosted systems industry has turned another critical point. Several years ago we eschewed large mainframe systems in exchange for commodity servers that could divide load and work together to provide services without single-vendor lock-in and without a single piece of &#8220;iron&#8221; waiting to fail. The computing power of a $2,000,000 mainframe was dwarfed by the implementation of $80,000 in commodity hardware. With virtualization coming-of-age- with Intel and AMD putting hooks into their processors and chipsets to allow virtualization to be fully realized and not just a software-only hack- we&#8217;ve seen those same commodity systems hosting dozens of virtual systems reliably and at near-metal efficiency. The cost per virtual system is a number <em>rapidly approaching zero</em>.</p>
<p>New offerings from Sun, IBM and HP/Compaq are emphasizing something that &#8220;the server guys&#8221; haven&#8217;t needed to care much about: infrastructure. Historically, your network engineers and analysts worried about interconnection, route redundancy, and ensuring the bits could flow where they needed, reliably and sufficiently; and your system engineers worried about everything up to the point the bits hit &#8220;the network&#8221;. Moving forward, that is almost a debilitating dichotomy. Traditionally, in the post-mainframe era, a physical system did one or two things and its exclusion from the network or its under-performance on the network was a minor issue. With a physical system possibly hosting dozens of virtual systems- all with unique networking requirements, cross-talking requirements, and of course: networked storage requirements- your system engineers must be well-versed in network engineering. &#8220;<a href="http://en.wikipedia.org/wiki/John_Gage">The Network Is The Computer</a>&#8221; is not just a Sun tag-line, or a lame cliche&#8217;. We&#8217;re now fully realizing the potency of that statement. Every system offering from the Big Three contains significant &#8220;infrastructure&#8221; features: Network features.</p>
<p>By pushing more and more network features into server systems- IBM servers with Cisco &#8220;swrouters&#8221; built-in, for example &#8211; the server itself has become more important and less relevant at the same time. Keeping it up and running <em>well</em> will require a new kind of system engineer because &#8220;the box&#8221; is now more complex: But at the same time, collections of &#8220;boxes&#8221; should be able to self-heal and adapt to the failures of others. Each system has now become disposable.</p>
<p>A large swath of the architectural literati are already deploying quantities of self-healing farms that take over the work &#8211; the very virtual machines &#8211; of failed or failing physical systems. Virtualization on its own wasn&#8217;t a game-changer. Virtualization with processor support and recognition sparked real potential. Virtualization on top of &#8220;infrastructure&#8221;-aware (e.g. heavily networked) physical systems has dramatically shifted the value of hybrid &#8220;networked systems engineers&#8221;, raised the bar for the &#8220;server guys&#8221; to get up to speed on the real internals of networking, and has provided the unprecedented opportunity to deploy redundantly resilient systems that can in-<em>practice </em>achieve five-to-seven &#8220;nines&#8221; of reliability.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/09/24/disposable-appliance-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FOSS&#8217;s Microsoft Hatred &#8220;a Disease&#8221;</title>
		<link>http://mattwork.potsdam.edu/blog/2009/07/27/fosss-microsoft-hatred-a-disease/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/07/27/fosss-microsoft-hatred-a-disease/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 13:11:32 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=489</guid>
		<description><![CDATA[Purloined wholesale from SlashDot, and reposted. The hypocrisy of a vocal minority of FOSS-purists has been overwhelming. As Linus accurately points out, we&#8217;re all in it for selfish reasons. No one likes working on the boring bits, and we all contribute our best code to the things we care about at the moment.
&#8220;In the aftermath [...]]]></description>
			<content:encoded><![CDATA[<p>Purloined wholesale from <a href="http://linux.slashdot.org/story/09/07/25/1757253/Linus-Calls-Microsoft-Hatred-a-Disease">SlashDo</a>t, and reposted. The hypocrisy of a vocal minority of FOSS-purists has been overwhelming. As Linus accurately points out, we&#8217;re all in it for selfish reasons. No one likes working on the boring bits, and we all contribute our best code to the things we care about at the moment.</p>
<blockquote><p><em>&#8220;In the aftermath of <a href="http://news.slashdot.org/story/09/07/20/1643251">Microsoft&#8217;s recent decision to contribute 20,000 lines of device driver code to the Linux community</a>, Christopher Smart of Linux Magazine talked to Linus Torvalds and asked if the code was something he would be happy to include, even though it&#8217;s from Microsoft. &#8216;Oh, I&#8217;m a big believer in &#8220;technology over politics.&#8221; I don&#8217;t care who it comes from, as long as there are solid reasons for the code, and as long as we don&#8217;t have to worry about licensing etc. issues,&#8217; says Torvalds. &#8216;I may make jokes about Microsoft at times, but at the same time, <a href="http://www.linux-mag.com/cache/7439/1.html">I think the Microsoft hatred is a disease</a>. I believe in open development, and that very much involves not just making the source open, but also not shutting other people and companies out.&#8217; Smart asked Torvalds if Microsoft was contributing the code to benefit the Linux community or Microsoft. &#8216;I agree that it&#8217;s driven by selfish reasons, but that&#8217;s how all open source code gets written! We all &#8220;scratch our own itches.&#8221; It&#8217;s why I started Linux, it&#8217;s why I started git, and it&#8217;s why I am still involved. It&#8217;s the reason for everybody to end up in open source, to some degree,&#8217; says Torvalds. &#8216;So complaining about the fact that Microsoft picked a selfish area to work on is just silly. Of course they picked an area that helps them. That&#8217;s the point of open source — the ability to make the code better for your particular needs, whoever the &#8220;your&#8221; in question happens to be.&#8217;&#8221;</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/07/27/fosss-microsoft-hatred-a-disease/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Secure Programming&#8221;</title>
		<link>http://mattwork.potsdam.edu/blog/2009/05/19/secure-programming/</link>
		<comments>http://mattwork.potsdam.edu/blog/2009/05/19/secure-programming/#comments</comments>
		<pubDate>Tue, 19 May 2009 04:57:45 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=454</guid>
		<description><![CDATA[Earlier this year I developed a two-day seminar for a client on &#8220;secure programming&#8221; techniques. The intended audience was automation programmers, but at the last minute, after seeing the &#8220;syllabus&#8221;, they decided to include their application programmers. The result was a flurry of re-working to accommodate the Java crowd in addition to the Perl/PHP/Python crowd. [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year I developed a two-day seminar for a client on &#8220;secure programming&#8221; techniques. The intended audience was automation programmers, but at the last minute, after seeing the &#8220;syllabus&#8221;, they decided to include their application programmers. The result was a flurry of re-working to accommodate the Java crowd in addition to the Perl/PHP/Python crowd. In the end, the bulk of the message was the same. While I can&#8217;t republish my stack for trade-secret reasons, I can dump the agnostic bits (mostly my slide notes) here. The code examples will be in human-readable Perl or pseudo-code, but will work in any language.</p>
<h2>Users Are Un[trust]worthy</h2>
<p>The first, and most important point, is that you can never trust user-supplied data. Ever. Just because your whiz-bang drop-down box only shows the user four options, doesn&#8217;t mean they can&#8217;t end up sending `rm -Rf /`. This is the <strong>single largest threat</strong> against an in-house application. User-supplied data must always always be vetted, sanitized and treated as if it could take over the world. A lot of programmers use rapid-application-development tools to create interfaces. These tools are a boon for creating slick interfaces, but generally a complete bust at data integrity enforcement. You tell it &#8220;make this a date field&#8221;, and it does&#8230; But anyone with a quick script can insert 40MB of garbage data, which will at best crash your application, and at worst, overflow a buffer that had improper bounds (see next point) and allow &#8220;remote execution of arbitrary code&#8221; (READ: You&#8217;re fucked).</p>
<p>So how do you fix this? Regardless of the languages you program in, they probably have a <a href="http://store.xkcd.com/xkcd/#RegularExpressionsShirt">regular expressions</a> (regexp) library. Many popular languages even have &#8220;Perl-Compatible Regular Expressions&#8221; (PCRE), as there is no better language for data process than Perl, and its regexp syntax is well-defined (albeit with a moderate learning-curve). Regexps are the easiest way to enforce your intentions with data.</p>
<pre>unless($userdate =~ m#^\d\d\d\d/\d\d/\d\d$#) { Freak_Out(); }</pre>
<p>That&#8217;s a one-liner that says, exactly,&#8221;unless the data in the variable $userdate begins with four-digits, followed by a fore-slash, followed by two-digits, followed by a fore-slash, followed by two-digits, and that&#8217;s it &#8211; Freak Out&#8221;. (m &#8211; we&#8217;re matching, # &#8211; start the regexp, ^ &#8211; match at the begining of the data, \d &#8211; a digit (0-9), $ &#8211; match the end of the data, # &#8211; end the regexp).</p>
<p>You could easily write a function to do this for you:</p>
<pre>sub Is_Date {
  my $userdate;
  if($userdate =~ m#^\d\d\d\d/\d\d/\d\d$#) { return 1; }
  else { return 0; }
}</pre>
<p>Then just call</p>
<pre>unless(Is_Date($usercrap)) { Freak_Out(); }</pre>
<p>every time you need to check that you&#8217;ve REALLY got a date. Not hard. The user could still be entering the data wrong, but that&#8217;s not the secure programmer&#8217;s job. <img src='http://mattwork.potsdam.edu/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It is imperative that your application go out of its way to recognize crap as soon as it can. Don&#8217;t pass a variable containing unchecked user-supplied data to a dozen  or so functions before checking it. Accept it, and check it immediately. SQL injection attacks are another whole can of worms that can take advantage of improper sanitization, and frequently get executed in strange places. Sanitize early.</p>
<p>I know you guys aren&#8217;t writing AJAX stuff, but I&#8217;d be derelict if I didn&#8217;t hammer this out anyhow: If you trust JavaScript or any other client or browser -executed code to do your security bits for you, you are not only a moron, but should be made to wear a Scarlet Zero for the next few years. Zero for &#8220;0wn3d&#8221;. Just because you write JavaScript, doesn&#8217;t mean that&#8217;s how the browser will execute it. ANYONE can rewrite your JavaScript to do whatever they want. The above IsDate function, if implemented in client-side JavaScript can easily simply &#8220;return 1&#8243; regardless of what&#8217;s passed. <strong>You must never trust client-supplied data</strong> regardless of whether you believe it was vetted client-side. It <em><strong>must</strong></em> be vetted server-side. Must. Must. Must. If, for user convenience, you want to implement something to trap errors quickly client-side, that&#8217;s groovy, but in no way does it excuse you from vetting the content once submitted to your application.</p>
<p>I can&#8217;t say this enough. It seems like common-sense, and a lot of you are nodding at me right now, but a month on you&#8217;re going to write a quick webform with radio-button selection, and someone in Bejing is going to own your database server because they submitted `echo root:fXAWEOo7DsNSM:0:0:0:0::: &gt; /etc/shadow` to the &#8220;What&#8217;s your favorite fruit?&#8221; question. [PAUSE] It&#8217;s funny right now, it&#8217;s not funny when you&#8217;re facing a DoD inquiry.</p>
<h2>Data Sizes Are Critical (AKA Know Your Data)</h2>
<p>The second most important thing I can convey to you is the concept of sanitizing types. Those of us in the room that are automation programmers and write in the P-languages don&#8217;t have to give a shit about this, but those of you using Java, C or anything that comes out of Redmond, WA need to listen up: If you&#8217;re blindly stuffing data into a restricted type, you better be damn certain it&#8217;s the right size. Last year one of your competitors had a nice lad write an internal automation system that took data from a database and did things with it. Anyone know how large a MySQL blob-type is? 64k bytes. Anyone know how large a Microsoft Visual BASIC date-type is? 8 bytes. Thankfully, he wasn&#8217;t writing a user-facing application. [PAUSE] Last I heard, he was writing TARP-laundering algorithms for AIG.</p>
<p>Everytime you hear about a &#8220;buffer-overflow&#8221; attack, this is because some moron didn&#8217;t check data before stuffing it into memory. The lower-level you code, the more important this is. The example I gave about the VB app only cost the contractor a few dozen-thousand dollars and a loss-of-face from their client because VB just panics and dies when you do that. If you&#8217;re coding in C and not running on a very secure linux box with a memory-jockeying system, you may well have just overwritten your security code with:</p>
<pre>blahblaWastingSpaceUntilYourDataTypeIsOverblahblahblahCall Function DoSomethingBad</pre>
<p>Yeah, that&#8217;s what a buffer-overflow looks like. Know your data, and when in doubt <em>cast</em>. A lot of instructors shy away from casting. It slows things down, it causes a lot of compile-time checks that frequently create errors or warnings in otherwise clean code. Casting is the absolute best way to make sure you&#8217;re not blowing out a primitive type. Of course, if you&#8217;re writing into a char-array, that&#8217;s not going to help you, but that&#8217;s your problem. <img src='http://mattwork.potsdam.edu/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Lazy Handles</h2>
<p>You guys know all about access permissions, so I&#8217;m going to skip over a bunch of stuff. One thing I&#8217;ve seen here and elsewhere, is opening handles &#8211; network sockets, database handles, file handles, directory handles, etc. &#8211; as users with way more permission than necessary. Sure, it&#8217;s easier for you, but what happens when your code gets hosed and someone from Bulgaria managed to inject themselves in before you&#8217;ve let go of that handle? Explaining to your boss that you opened the files as root &#8220;because it was easier&#8221; isn&#8217;t going to fly. Your application needs to run restricted, which you already know, and you absolutely cannot wantonly elevate handles without damn good reason. I can&#8217;t count the number of applications I&#8217;ve seen &#8211; Hell, applications I&#8217;ve <em>written</em> &#8211; that immediately connect to a resource as God himself to do some stuff that&#8217;s pretty primitive &#8211; and maybe, MAYBE one operation in fifty that actually needed that access. Which leads to the next problem here&#8230;</p>
<p>Keeping handles open longer than necessary, or in anticipation of future operations. If your application does six operations on a resource and only one needs the assistance of Angels, then that&#8217;s the only operation that gets the Silver Trumpets &#8211; the rest can stew along the rest of us. I don&#8217;t care if you&#8217;re doing all six of those operations at once: you run the primitives as a primitive user, and then either change-user or fork or whatever you need to do as the elevated user for that one operation. Yeah, I groan about it too. But that&#8217;s it. Every moment your application has an elevated resource connection, is a moment that someone is going to get their</p>
<pre>INSERT INTO USERS user='yakov',password='smirnov'; GRANT ALL FOR ALL TO USER identified by 'yakov';</pre>
<p>into your data. It&#8217;ll take your auditors a fiscal quarter before they find that account.</p>
<p>With the exception of operating-system handles, you can almost always switch out, rebind, setuid, or the like, without making a new connection.</p>
<h2>1176da21241f79203fbd93e367f35142</h2>
<p>Yeah, encrypt <em>everything</em>. I know you guys are using SSL for nearly all resource connections, which is ridiculously important. Even the server-to-server stuff that we used to shrug off and say &#8220;yeah, well it&#8217;s on a switched network, and in the same room&#8221; has <em>got</em> to be encrypted on the wire. There are too many techniques and tools out there to get in the middle of those streams, and we all know how reliable network administrators are at picking up that stuff. [PAUSE]</p>
<p>Even within your application, if you&#8217;re writting out temp data, encrypt it from possibly prying eyes and processes. If you&#8217;ve got in-memory data that&#8217;ll be sitting around for some time, and might be a candidate for swapping, encrypt it in memory. How many of you have ever even considered encrypting live data? If that data gets stale, and the operating system decides to swap out some pages, that stuff is possibly going to be visible unless your infrastructure takes into account encrypted swap and the like. In lots of languages, encryption and decryption of relatively small amounts of data (&lt; available RAM) is pretty simple. I&#8217;m not advocating it for everything, but there&#8217;s not much harm in:</p>
<pre>$data=encrypt($data);
{ #Long
  #Running
} #Block.
$data=decrypt($data);</pre>
<p>If something weird happens, and some or all of $data is swapped out because it&#8217;s not being used, it&#8217;s useless to an attacker.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2009/05/19/secure-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Cowbell You Requested</title>
		<link>http://mattwork.potsdam.edu/blog/2008/06/20/the-cowbell-you-requested/</link>
		<comments>http://mattwork.potsdam.edu/blog/2008/06/20/the-cowbell-you-requested/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 18:49:45 +0000</pubDate>
		<dc:creator>M</dc:creator>
				<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Products]]></category>

		<guid isPermaLink="false">http://mattwork.potsdam.edu/blog/?p=193</guid>
		<description><![CDATA[RedHat released a version of their RHN product (dubbed SpaceWalk) open-source. Fedora, of course, quickly had their own site up about it.
I&#8217;m glad Levanta already died, because this would&#8217;ve destroyed them. RedHat is wise in its timing, as I know Novell is gearing up to really take on this market segment, as was evident by [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.levanta.com/">RedHat</a> released a version of their <a href="http://rhn.redhat.com/">RHN</a> product (dubbed <a href="http://www.redhat.com/spacewalk/">SpaceWalk</a>) open-source. Fedora, of course, quickly had their <a href="https://fedorahosted.org/spacewalk">own site up</a> about it.</p>
<p>I&#8217;m glad <a href="http://mattwork.potsdam.edu/blog/2008/04/22/levanta-intrepid/">Levanta already died</a>, because this would&#8217;ve destroyed them. RedHat is wise in its timing, as I know Novell is gearing up to really take on this market segment, as was evident by their recent acquisition of PlateSpin.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattwork.potsdam.edu/blog/2008/06/20/the-cowbell-you-requested/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
