<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Standing On The Brink</title>
	
	<link>http://www.standingonthebrink.com</link>
	<description>Cory von Wallenstein's Blog</description>
	<pubDate>Sat, 31 Jan 2009 22:47:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/StandingOnTheBrink" type="application/rss+xml" /><item>
		<title>Adventures in Video Production</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/RkLW0G1A29Y/</link>
		<comments>http://www.standingonthebrink.com/index.php/adventures-in-video-production/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 22:47:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[In The Field]]></category>

		<category><![CDATA[audio quality]]></category>

		<category><![CDATA[video production]]></category>

		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/?p=225</guid>
		<description><![CDATA[We&#8217;ve been having quite a bit of fun recently putting together videos at the office. We&#8217;ve got some decent equipment, but one thing has been bugging me for quite some time&#8230; the quality of our audio.
Here&#8217;s an example shot with a Logitech QuickCam Pro 9000 webcam using the built-in microphone, standing roughly six feet away [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been having quite a bit of fun recently putting together videos at the office. We&#8217;ve got some decent equipment, but one thing has been bugging me for quite some time&#8230; the quality of our audio.</p>
<p>Here&#8217;s an example shot with a <a href="http://www.logitech.com/index.cfm/webcam_communications/webcams/devices/3056&#038;cl=us,en">Logitech QuickCam Pro 9000</a> webcam using the built-in microphone, standing roughly six feet away from the camera:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/5An15qKcJcM&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/5An15qKcJcM&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>It&#8217;s OK, but not the greatest. Here&#8217;s the same Logitech webcam, but this time sitting in front of the camera, roughly two feet away, with the direction of speaking always toward the camera (and thus, the  built-in microphone):</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/G5sGXZNM9u0&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/G5sGXZNM9u0&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>MUCH better! But we still want to be able to do recordings at the whiteboard, walking around, etc.</p>
<p>Here&#8217;s an example using the mic built-in with one of our camcorders (an <a href="http://www.bestbuy.com/site/olspage.jsp?skuId=8940015&#038;type=product&#038;id=1215217076309">Insignia HD Flash</a> camcorder, which provides amazing video quality for the money):</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/ZHQiJ5Yqgpw&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZHQiJ5Yqgpw&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>What&#8217;s the ultimate solution? Well, a high-quality lavalier microphone, of course! And we have one&#8230; it&#8217;s the <a href="http://www.amazon.com/AUDIO-TECHNICA-ATR-35S-Audio-Technica-Microphone/dp/B00006I51V/ref=sr_1_3?ie=UTF8&#038;qid=1233440818&#038;sr=8-3">Audio-Technica ATR-35S</a>. </p>
<p>So, why then, on our latest (and also most popular) videos, do we still have not the greatest sound in the world?</p>
<p>Insignia camcorder with built-in mic, but noisy environment in the middle of office, with lots of moving around by the speaker (relative to the mic):</p>
<p><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/HJtxFeNKoQU&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HJtxFeNKoQU&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p>Same Insignia camcorder and built-in mic, but quieter area with more control of what&#8217;s going on:</p>
<p><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/DvBf9Sz81a4&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DvBf9Sz81a4&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p>Same Insignia camcorder and built-in mic, but a better job of noise reduction in post-production:</p>
<p><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/GoES5kVSCCI&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GoES5kVSCCI&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p>So, I ask again, if we have the lavalier microphone, why haven&#8217;t we been using it? The answer is &#8230; we don&#8217;t have any place convenient to plug in the lavalier microphone when using our camcorders.</p>
<p>The camcorders themselves unfortunately do not have external microphone inputs.</p>
<p>We&#8217;ve tried using the microphone inputs for some laptops and desktops we had handy (and synching the audio and video in post-production), but the poor quality sound cards built-in clearly had some grounding issues, because a hefty hum could be heard (and often overheard) in the background. Plus, this often meant a long cable from the lavalier microphone to the computer, which was likely to be tripped over. No good.</p>
<p>But as of today, that changes. I just picked up a <a href="http://tinyurl.com/5tbuxp">Sony ICD-UX70</a> digital voice recorder for the video production team, with built-in stereo microphones, an external microphone jack, and MP3 encoding of audio files. Now, we can throw this in the shirt pocket for whoever is speaking on video (when we&#8217;re in a rush), or for the best quality, just have the actress or actor hold it/put it in a pocket and wire up the lavalier microphone to walk around freely.</p>
<p>We&#8217;re shooting some video this week&#8230; I&#8217;ll let you know how it works out (hopefully you&#8217;ll be able to hear the difference for yourself!).</p>
<p>Here&#8217;s to good quality audio.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/adventures-in-video-production/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/adventures-in-video-production/</feedburner:origLink></item>
		<item>
		<title>IPv6, IPv4, and ARP on Xen for VPS</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/n2YRZlxu1-A/</link>
		<comments>http://www.standingonthebrink.com/index.php/ipv6-ipv4-and-arp-on-xen-for-vps/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:03:37 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[In The Field]]></category>

		<category><![CDATA[ip6tables]]></category>

		<category><![CDATA[ipv6]]></category>

		<category><![CDATA[virtual private server]]></category>

		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/?p=172</guid>
		<description><![CDATA[A little background is in order. Recently, my team released the DynDNS Spring ServerSM VPS platform based on Xen, with one of the main features being dual-stack IPv4 and IPv6 connectivity out-of-the-box. For networking the virtual servers, we&#8217;ve chosen a bridging approach, which makes it pretty easy to get IPv4 and IPv6 working; as long [...]]]></description>
			<content:encoded><![CDATA[<p>A little background is in order. Recently, my team released the <strong>DynDNS Spring Server</strong><sup>SM</sup> <strong>VPS</strong> platform based on Xen, with one of the main features being <strong>dual-stack IPv4 and IPv6</strong> connectivity out-of-the-box. For networking the virtual servers, we&#8217;ve chosen a bridging approach, which makes it pretty easy to get IPv4 and IPv6 working; as long as all OSes involved support IPv6, it kind of &#8220;just works.&#8221;</p>
<p>What&#8217;s not so easy is trying to secure and lock down the individual virtual servers so they cannot interfere with one another&#8217;s network connection. The efforts spent on IPv6 also exposed some issues for IPv4 and ARP that could arise when used in a VPS environment.</p>
<p><strong>Note: </strong>We&#8217;re going to get down and dirty into the technical nitty gritty, and it&#8217;s beyond the scope of this post to bring all of my readers up to speed. The faint of heart may wish to turn back now.</p>
<h3>Problem Cases for IPv6</h3>
<p>Two main network spoofing cases come to mind that need to be protected against for running IPv6 on Xen in a virtual private server environment:</p>
<p>1) A user <strong>changing the IPv6 address</strong> of their network interface to an IPv6 address<strong> we haven&#8217;t authorized them to use</strong>, or adding/aliasing additional IPv6 addresses to their network interface that they did not pay for.</p>
<p>2) A user <strong>changing/adding/aliasing an IPv6 address that&#8217;s in use by another customer</strong>, which can wreak all sorts of routing havoc, interfering with the ability for our customers to reliably communicate with others on the Internet.</p>
<p>Perhaps Luke Crawford put it best with his response to my question, &#8220;Have people already solved and dealt with IPv6 in Xen successfully (i.e., is it a non-issue at this point)? If not, I&#8217;d be happy to submit the changes and a guide to making it work and work well.&#8221; on the Xen developers email list:</p>
<blockquote><p>Guides would be awesome. Also, if you made anti-spoof work for IPv6, that would also be awesome. I&#8217;ve had IPv6 going for a while with no problems (though the xen antispoof rules only work with IPv4), but I didn&#8217;t even need to enable IPv6 in the Dom0; it&#8217;s a layer 2 bridge, so it just works. In fact, stateless autoconfiguration even worked. I asked for an IPv6 allocation from my provider and my customers noticed it was working before I got around to doing any setup at all.</p></blockquote>
<h3>Problem Cases for IPv4 and ARP</h3>
<p>When we initially went down the IPv6 road, we started paying closer attention to what was already implemented for IPv4 protection to get an idea for where to begin. In doing so, we found a couple of scenarios where the existing anti-spoof protection leaves Xen a bit too exposed for using as a VPS platform:</p>
<p>1) If a user <strong>aliases an IPv4 gateway IP address</strong> for the same subnet that user is on, <strong><span style="color: #ff0000;">all network connectivity can go down for that subnet</span></strong>. As an example, if your IP address is 1.2.3.5/24 and your gateway is at 1.2.3.1, and you run &#8220;ifconfig 1.2.3.1&#8243; to alias the gateway IP address on your default network interface, you will now respond to ARP requests trying to find the gateway with your MAC address&#8230; meaning no other users on that subnet can reliably talk to the gateway&#8230; meaning their network connectivity is pretty much useless.</p>
<p>2) If a user <strong>aliases an IPv4 address that is already in use by another user</strong>, <strong><span style="color: #ff0000;">all network connectivity can go down for that other user</span></strong>, for the same reasons it goes down when aliasing the gateway IP address (i.e., you&#8217;ll be responding to ARP requests for their IP address).</p>
<p>3) Users can deliberately perform <strong>ARP poisoning attacks</strong>, by sending arbitrary ARP replies on the subnet, which can <strong><span style="color: #ff0000;">interfere with authorized communication</span></strong> for the same reasons as 1 and 2 above.</p>
<p>4) Users can <strong>see the network traffic for other domUs</strong> on the same dom0 by putting their interfaces into promiscuous mode (i.e., packet sniffing). </p>
<p>My intent here is not to knock the Xen development community; they&#8217;ve put together a fantastic platform, and no one expects our business requirements for using Xen to host virtual private servers to be inline with their development requirements. I&#8217;m not even certain that we&#8217;ve squashed the issues entirely, but we have at least squashed the pressing issues for IPv6, IPv4, and ARP outlined above.</p>
<p>Now that we have it working in the field, I&#8217;d like to share the handful of changes with the community so they can benefit, and perhaps suggest better/more complete/more succinct ways of doing it. The solution we implemented was modeled after the current IPv4 anti-spoof protection.</p>
<p>I will start off with an overview of the current IPv4 anti-spoofing approach used by Xen, followed by the specific commands used to alter the behavior for what we needed for reliable and secure communication, concluded by the actual changes we made to the Xen networking scripts to enable this behavior modification.</p>
<h3>Current IPv4 Anti-spoofing Protection for Xen</h3>
<p>The current IPv4 anti-spoof protection scheme relies on iptables, in particular the FORWARD chain that each packet destined for a virtual server hits on its way in or out. Rules get added each time a virtual network interface comes up, and removed when the interface does down. </p>
<p>For the sake of the remaining discussion, where I&#8217;ll be walking through some command examples, we&#8217;ll assume:</p>
<ul>
<li><strong>peth0</strong> is the physical network interface that the bridge connects to</li>
<li><strong>vif1.0 </strong>will be a virtual network interface connected to a domU, and the domU sees that device as eth0</li>
<li>The domU is &#8220;allowed&#8221; to use IPv4 address <strong>216.146.46.43/24</strong>, with a gateway IP of <strong>216.146.46.1</strong> for IPv4. </li>
<li>The domU is &#8220;allowed&#8221; to use IPv6 address <strong>2607:f590:0:ffff::60/64</strong>, with a gateway IP of <strong>2607:f590:0:ffff::1</strong> for IPv6.</li>
<li>The MAC address of the virtual network interfaced vif1.0 is <strong>00:16:3E:38:B4:AC</strong>.</li>
<li>The domU hostname is <strong>www.standingonthebrink.com</strong>.</li>
</ul>
<p>Yes, you guessed it&#8230; all of the settings above are the real-world settings for the<strong> <a title="DynDNS Spring Server Xen VPS" href="http://www.dyndns.com/services/springserver/">Xen VPS</a></strong> that is hosting this blog (with the exception of the virtual network interface name of vif1.0, which will change over time as the VPS is powered off and on).</p>
<p>In a nutshell, when you enable anti-spoofing as a parameter in the network-bridge script, the following iptables commands are issued when the bridge comes online:</p>
<pre>  # Default policy for packets in the FORWARD chain is DROP.
  iptables -P FORWARD DROP

  # Flush all existing rules in the FORWARD chain.
  iptables -F FORWARD  

  # Accept packets that are entering the bridge from the physical
  #   network interface peth0.
  iptables -A FORWARD -m physdev --physdev-in peth0 -j ACCEPT</pre>
<p>Now, when each domU virtual network interface comes online, the following iptables command is run for each IP address that the domU is allowed to use, as specified in the www.standingonthebrink.com.cfg file found in /etc/xen/:</p>
<pre>  # Accept packets coming into the bridge from the domU if its
  #   source IP address is authorized.
  iptables -A FORWARD -m physdev --physdev-in vif1.0 \
    --source 216.146.46.43 -j ACCEPT</pre>
<p>When the domU&#8217;s virtual network interface goes offline, the same command is run except the -A is changed to -D to delete the rule.</p>
<h3>Into the Bridge? Out of the Bridge? What&#8217;s the Difference?</h3>
<p>It&#8217;s important to point out the difference between &#8220;into&#8221; and &#8220;out of&#8221; the bridge. For the purpose of thinking about rules governing the packets that are allowed to traverse the bridge, it can be helpful to think of the bridge as a little switch connecting the physical network interface of the server to the virtual network interface of the dom0 as well as all of the virtual network interfaces for each of the domUs. The rules we write in the FORWARD chain will tell the bridge what packets to allow to enter and/or leave the bridge.</p>
<p style="text-align: center; "><img class="size-medium wp-image-189 aligncenter" title="Network Bridge Diagram" src="http://www.standingonthebrink.com/wp-content/uploads/2008/10/network_bridge_diagram.png" alt="Network Bridge Diagram" /></p>
<p>All of the rules we&#8217;ll write are from the perspective of the network bridge. Perhaps a couple examples will help convey the concept:</p>
<ul>
<li>A packet coming <strong>from the Internet</strong> destined for the <strong>first domU</strong> -&gt; Comes <strong>IN peth0</strong> and goes <strong>OUT vif1.0</strong>.</li>
<li>A packet coming <strong>from the first domU</strong> destined for the <strong>second domU</strong> -&gt; Comes <strong>IN vif1.0</strong> and goes <strong>OUT vif2.0</strong>.</li>
<li>A packet sent from the <strong>first domU</strong> to somewhere on the <strong>Internet</strong> -&gt; Comes <strong>IN vif1.0</strong> and goes <strong>OUT peth0</strong>.</li>
</ul>
<div>With this knowledge, let&#8217;s revisit the last rule we looked at that is currently being used to prevent IPv4 address spoofing:</div>
<div>
<pre>  # Accept packets coming into the bridge from the domU if its
  #  source IP address is authorized.
  iptables -A FORWARD -m physdev --physdev-in vif1.0 \
    --source 216.146.46.43 -j ACCEPT</pre>
<p>This rule says a packet coming from the first domU (indicated by the &#8220;physdev-in vif1.0&#8243;) with a source IPv4 address of 216.146.46.43 and a destination of anywhere will be allowed into the bridge. If the domU tries to use a source IP address of anything else, the packet won&#8217;t be allowed into the bridge, and thus the user won&#8217;t gain the use of an unauthorized IP address.</p></div>
<h3>Proposed Solution for ARP Poisoning Protection for Xen</h3>
<p>Quite simply, we use <a href="http://linux.die.net/man/8/arptables">arptables</a> in a similar manner to using iptables. It can be a little tricky getting the rules right for what valid ARP traffic should be allowed, but with quite a bit of trial-and-error, we think we have it.</p>
<p>When the bridge comes online, we do:</p>
<pre>  # Default policy for packets in the FORWARD chain is DROP.
  arptables -P FORWARD DROP

  # Flush all existing rules in the FORWARD chain.
  arptables -F FORWARD</pre>
<p>When each virtual network interface comes online, we do:</p>
<pre>  # Accept ARP requests coming from the domU into the bridge.
  arptables -A FORWARD --opcode Request --in-interface vif1.0 -j ACCEPT

  # Accept ARP requests coming out of the bridge into the domU.
  arptables -A FORWARD --opcode Request --out-interface vif1.0 -j ACCEPT

  # Accept ARP replies coming out of the bridge from the physical
  #  network into the domU.
  arptables -A FORWARD --opcode Reply --out-interface vif1.0 \
    --in-interface peth0 -j ACCEPT</pre>
<p>In addition to the above rules that get added when the virtual network interface comes online, we do the following for each valid IPv4 address:</p>
<pre>  # Accept ARP replies coming from the domU into the bridge if they
  #  provide a valid and authorized IP address to MAC address pair.
  arptables -A FORWARD --opcode Reply --in-interface vif1.0 \
    --source-ip 216.146.46.43 --source-mac 00:16:3E:38:B4:AC -j ACCEPT</pre>
<p>It&#8217;s this last rule that prevents the ARP poisoning attacks and the havoc wreaking by aliasing gateway IP addresses. If invalid ARP replies are denied, as far as I can tell, no harm can be done. When the virtual network interface goes offline, the same commands are run with -D instead of -A to delete the rules.</p>
<h3>Proposed Solution for Preventing IPv4 Packet Sniffing</h3>
<p>As mentioned earlier, the current IPv4 rules that prevent anti-spoofing are:</p>
<pre>  # Accept packets that are entering the bridge from the
  #  physical network interface peth0.    
  iptables -A FORWARD -m physdev --physdev-in peth0 -j ACCEPT

  # Accept packets coming into the bridge from the domU if its
  #  source IP address is authorized.
  iptables -A FORWARD -m physdev --physdev-in vif1.0 \
    --source 216.146.46.43 -j ACCEPT</pre>
<p>These work great for preventing a user from using an unauthorized IPv4 address, but the rule for incoming traffic from peth0 is not sufficiently explicit, in my opinion. It allows users to see the network traffic of other users on the same dom0. By tightening up the rules a bit, we can prevent this.</p>
<p>The proposed rules are as follows, for the bridge coming online:</p>
<pre>  # Default policy for packets in the FORWARD chain is DROP.
  iptables -P FORWARD DROP

  # Flush all existing rules in the FORWARD chain.
  iptables -F FORWARD</pre>
<p>For each valid IPv4 address as each virtual network interface comes online:</p>
<pre>  # Accept packets leaving the bridge going to the domU only if
  #  the destination IP for that packet matches an authorized IPv4
  #  address for that domU.
  iptables -A FORWARD -m physdev --physdev-out vif1.0 \
    --destination 216.146.46.43 -j ACCEPT

  # Accept packets coming into the bridge leaving the physical
  #  network interface peth0 only if the source IP for that packet
  #  matches an authorized IPv4 address for that domU.  
  iptables -A FORWARD -m physdev --physdev-in vif1.0 \
    --physdev-out peth0 --source 216.146.46.43 -j ACCEPT</pre>
<h3>Proposed Solution for IPv6 Anti-spoofing Protection for Xen</h3>
<p>Quite simply, we use <a href="http://linux.die.net/man/8/ip6tables">ip6tables</a> with the exact same rule structure as shown above for IPv4. For the bridge coming online:</p>
<pre>  # Default policy for packets in the FORWARD chain is DROP.
  ip6tables -P FORWARD DROP

  # Flush all existing rules in the FORWARD chain.
  ip6tables -F FORWARD</pre>
<p>For each valid IPv6 address as each virtual network interface comes online:</p>
<pre>  # Accept packets leaving the bridge going to the domU only if
  #  the destination IP for that packet matches an authorized IPv6
  #  address for that domU.
  ip6tables -A FORWARD -m physdev --physdev-out vif1.0 \
    --destination 2607:f590:0:ffff::60 -j ACCEPT

  # Accept packets coming into the bridge leaving the physical
  #  network interface peth0 only if the source IP for that packet
  #  matches an authorized IPv6 address for that domU.  
  ip6tables -A FORWARD -m physdev --physdev-in vif1.0 \
    --physdev-out peth0 --source 2607:f590:0:ffff::60 -j ACCEPT</pre>
<p>Simple, eh?</p>
<h3>Modifications to Xen Network Scripts</h3>
<p>So, the above outlined the original IPv4 anti-spoofing approach, and used that as a guideline to IPv6 anti-spoofing, as well as protecting against ARP poisoning attacks. Now, here are the changes to make to actually get this new behavior.</p>
<p>It&#8217;s worth noting that these changes were done in a manner to minimize impact to the existing networking scripts (i.e., no refactoring was done). This was done in case these changes never made it out to the community, we still need them in place to effectively use Xen for VPS hosting, and we would have to merge in community changes alongside our changes with each new community release. Thus, there&#8217;s a lot of duplicated code. Should these changes make it into Xen, I would recommend refactoring to remove this duplication!</p>
<p>It&#8217;s worth noting also that a method was needed for storing the IPv6 address for a domU. This was done by adding the address to the www.standingonthebrink.com.cfg file under /etc/xen/ in the following format:</p>
<pre>  #ipv6=2607:F590:0000:FFFF:0000:0000:0000:0060</pre>
<p>The modifications to the Xen networking scripts include the ability to read this into the xenstore for usage.</p>
<p>Without further ado, the network script diffs, which were performed against <a href="http://xenbits.xensource.com/xen-unstable.hg">xen-unstable</a> on October 8, 2008:</p>
<ul>
<li><a href="http://www.standingonthebrink.com/wp-content/uploads/2008/10/vif-commonsh.diff">vif-common.sh.diff</a></li>
<li><a href="http://www.standingonthebrink.com/wp-content/uploads/2008/10/vif-bridge.diff">vif-bridge.diff</a></li>
<li><a href="http://www.standingonthebrink.com/wp-content/uploads/2008/10/network-bridge.diff">network-bridge.diff</a></li>
</ul>
<p>I would also like to acknowledge the DynDNS team for helping to test and put together these modifications, and in particular Pierre Beaumier and Matthew Horsfall from Dynamic Network Services Inc., who discovered the vulnerabilities and greatly helped in putting a solution together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/ipv6-ipv4-and-arp-on-xen-for-vps/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/ipv6-ipv4-and-arp-on-xen-for-vps/</feedburner:origLink></item>
		<item>
		<title>Demo Videos for VPS Serial Console</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/QhFZjikvj2c/</link>
		<comments>http://www.standingonthebrink.com/index.php/demo-videos-for-vps-serial-console/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 15:25:39 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Demo]]></category>

		<category><![CDATA[serial console]]></category>

		<category><![CDATA[spring server vps]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/?p=153</guid>
		<description><![CDATA[The last time I put together a demo video, I submitted it for review by the folks on Business of Software forum on the Joel on Software web site.
Some of their feedback included:

Audio required post processing, since background noise interfered with the spoken voice.
Video was too long, and less than 3 minutes in length would [...]]]></description>
			<content:encoded><![CDATA[<p>The last time I put together a demo video, I submitted it for review by the folks on <a href="http://discuss.joelonsoftware.com/?biz">Business of Software</a> forum on the Joel on Software web site.</p>
<p>Some of their feedback included:</p>
<ul>
<li>Audio required post processing, since background noise interfered with the spoken voice.</li>
<li>Video was too long, and less than 3 minutes in length would be best.</li>
<li>Transitions from one screen to the next were abrupt and obtrusive.</li>
<li>The last slide showing the URL for more info disappeared too quickly.</li>
<li>Wear a plain-colored dress shirt instead of a striped dress shirt, which will help video compression.</li>
</ul>
<p>With their feedback in mind, I set about creating demo videos showing a nifty feature of the Spring Server platform: If you lose network connectivity to your <strong>virtual private server</strong>, you can log in to <strong>springconsole.com</strong> with any SSH client, and get an out of band console connection to your server to fix the network problem. Essentially <strong>serial console access to a VPS</strong> with an SSH client.</p>
<p>Originally, I prepared a single demo video, but after review with some in-house folks, came to the conclusion that this would not be a &#8220;one size fits all&#8221; situation. Some people knew what serial console was and how it could be used, and just wanted to learn how to use it here. Others would have no idea what I was talking about.</p>
<p>Accordingly, two videos were put together. The first is a &#8220;I&#8217;ll show you on the whiteboard&#8221; informal introduction to what serial console is and what it&#8217;s used for. The second is &#8220;I&#8217;ll show you on my laptop&#8221; informal demo on actually using it.</p>
<h2>Whiteboard Intro: What is Spring Console?</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="410" height="341" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#FFFFFF" /><param name="src" value="http://www.veoh.com/veohplayer.swf?permalinkId=v16074727EEKanCK3&amp;id=7689660&amp;player=videodetailsembedded&amp;videoAutoPlay=0" /><embed type="application/x-shockwave-flash" width="410" height="341" src="http://www.veoh.com/veohplayer.swf?permalinkId=v16074727EEKanCK3&amp;id=7689660&amp;player=videodetailsembedded&amp;videoAutoPlay=0" bgcolor="#FFFFFF"></embed></object></p>
<h2>VPS Serial Console Demo</h2>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="410" height="341" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#FFFFFF" /><param name="src" value="http://www.veoh.com/veohplayer.swf?permalinkId=v16074742p7AMwacF&amp;id=7689660&amp;player=videodetailsembedded&amp;videoAutoPlay=0" /><embed type="application/x-shockwave-flash" width="410" height="341" src="http://www.veoh.com/veohplayer.swf?permalinkId=v16074742p7AMwacF&amp;id=7689660&amp;player=videodetailsembedded&amp;videoAutoPlay=0" bgcolor="#FFFFFF"></embed></object></p>
<p>We&#8217;re going to put these in a DynDNS-branded Flash player and on the DynDNS content delivery network before they go live on our site, but wanted to get some initial feedback from folks here on the blog (even though they&#8217;re just hosted with veoh.com above).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/demo-videos-for-vps-serial-console/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/demo-videos-for-vps-serial-console/</feedburner:origLink></item>
		<item>
		<title>The Cat Is Out of the Bag</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/h8GF1B9d8rs/</link>
		<comments>http://www.standingonthebrink.com/index.php/looks-like-the-cat-is-out-of-the-bag/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 17:15:44 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[dyndns]]></category>

		<category><![CDATA[press release]]></category>

		<category><![CDATA[spring server vps]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/?p=141</guid>
		<description><![CDATA[Well, that is, if the cat is what my team and I have been working on non-stop for months, and the bag is NOT being on CNBC.com&#8230;

]]></description>
			<content:encoded><![CDATA[<p>Well, that is, if the cat is what my team and I have been working on non-stop for months, and the bag is NOT being on CNBC.com&#8230;</p>
<p><a href="http://www.cnbc.com/id/26869787/"><img class="size-medium wp-image-142" title="dyndns_spring_server_vps_press_release" src="http://www.standingonthebrink.com/wp-content/uploads/2008/09/dyndns_spring_server_vps_press_release.gif" alt="Screenshot for DynDNS Spring Server Platform Launch Press Release on CNBC.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/looks-like-the-cat-is-out-of-the-bag/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/looks-like-the-cat-is-out-of-the-bag/</feedburner:origLink></item>
		<item>
		<title>Very exciting stuff in the works…</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/iGT2LuKC-aU/</link>
		<comments>http://www.standingonthebrink.com/index.php/very-exciting-stuff-in-the-works/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 17:43:38 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/?p=97</guid>
		<description><![CDATA[I&#8217;m going to be going radio-silent for a few months while I put my nose to the grindstone on a new project. See you in a few months, hopefully with something pretty big&#8230;
-Cory
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be going radio-silent for a few months while I put my nose to the grindstone on a new project. See you in a few months, hopefully with something pretty big&#8230;</p>
<p>-Cory</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/very-exciting-stuff-in-the-works/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/very-exciting-stuff-in-the-works/</feedburner:origLink></item>
		<item>
		<title>Web Innovators Group 17 in Cambridge</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/T3uD-xqzlJk/</link>
		<comments>http://www.standingonthebrink.com/index.php/web-innovators-group-17-in-cambridge/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 20:06:53 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Startup]]></category>

		<category><![CDATA[networking events]]></category>

		<category><![CDATA[web innovators group]]></category>

		<category><![CDATA[webinno17]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/index.php/web-innovators-group-17-in-cambridge/</guid>
		<description><![CDATA[I got a chance to attend the Web Innovators Group in Cambridge last night, and it was an absolute blast! This was my first time attending, and the experience was very, very different from other events I&#8217;ve attended in the area.
The event starts off with a bit of a networking mixer in the bar area [...]]]></description>
			<content:encoded><![CDATA[<p>I got a chance to attend the <a href="http://www.webinnovatorsgroup.com/">Web Innovators Group</a> in Cambridge last night, and it was an absolute blast! This was my first time attending, and the experience was very, very different from other events I&#8217;ve attended in the area.</p>
<p>The event starts off with a bit of a networking mixer in the bar area of the Royal Sonesta in Cambridge, and then into the ballroom for a set of &#8220;main dish&#8221; and &#8220;side presentations.&#8221;  Main dishers get about 10 minutes to demo their latest and greatest creations (PowerPoint seems to be strictly forbidden&#8230; if you don&#8217;t have something to demo that makes people go &#8220;Oooh!&#8221; and &#8220;Aaah!&#8221;, don&#8217;t present). Side dish folks get a minute-long elevator pitch, directing people to a couple of tables in the back for demos after the presentations are over. After that, it&#8217;s basically just a bunch of techies and investors hanging out for a couple of hours over a couple of drinks&#8230; simply awesome.</p>
<p>There must have been at least 500 folks in attendance&#8230; far larger than any other non-conference event I&#8217;ve been to in the area, but it didn&#8217;t FEEL like a large, impersonal event. It was very open and social.</p>
<p>Probably the biggest shock for me was that I never once ran across a service provider pimping their own services. I&#8217;m sure they were there, but there were so many other folks that I never ran across one. Granted, the service providers are often the folks that end up sponsoring these types of events, and they keep the gears moving, but after you&#8217;ve talked to your nineteenth or twentieth IP attorney, it gets a little tiresome. If I was looking for a new patent attorney, that would be one thing, but I&#8217;ve been <a href="http://www.dornylaw.com/">very happy with Brett</a>.</p>
<p>I once knew a guy who said he would meet a couple of attorneys and accountants at the networking events, and then introduce them to each other with the line &#8220;I think you guys might be a good match!&#8221;, and then he would wait and see how long the &#8220;dueling salesman&#8221; scenario would play out before they figured it out! I doubt it&#8217;s a true story, but it certainly would be interesting to watch. Anywho, I digress&#8230;</p>
<p>The real thing that tipped me off to attending was that Artur Janc was one of the presenters.  Artur and I both went to WPI, and we crossed paths about four times at various events without ever actually &#8220;meeting&#8221;. It was great to spot him (Artur&#8217;s pretty easy to spot in the crowd&#8230; he has the <a href="http://lingro.com/docs/about.html#artur">most bad-ass hair you&#8217;ll ever find on an entrepreneur</a>), and catch up a bit. His new project is absolutely awesome; it&#8217;s called Lingro, and it&#8217;s &#8220;<a href="http://lingro.com/">the coolest dictionary known to hombre!</a>&#8220;.</p>
<p style="text-align: center;"><a href="http://lingro.com" target="_blank"><img class="aligncenter" src="http://www.standingonthebrink.com/wp-content/uploads/2008/04/lingroscreenshot.jpg" border="0" alt="Lingro.com" /></a></p>
<p>It&#8217;s a service that let&#8217;s you visit a web page in any language, and all of the words become &#8220;clickable&#8221; to translate and/or lookup their definitions in a nice, unobtrusive panel on the page. The service is free for general usage, but if you&#8217;re someone who is actively trying to learn a new language, they&#8217;ll be offering an upgraded version of the service that will make life easier for you. Watch out <a href="http://www.rosettastone.com/">Rosetta</a>!</p>
<p>I thoroughly enjoyed all of the main and side dish presenters&#8230; and without further delay, here are my six-word summaries for each dish:</p>
<ul>
<li><a href="http://good2gether.com/">Good2Gether</a> - non-profits meet for-profits for social profit.</li>
<li><a href="http://picme.raizlabs.com/">PicMe Photo Sharing</a> - flying photo stacks sharable with friends.</li>
<li><a href="http://www.jackcards.com/">Jack Cards</a> - e-cards suck; easy hand-written cards rule.</li>
<li><a href="http://www.traackr.com/">Traackr</a> - measure your pimp status online. word.
<ul>
<li>(PS - I miss the days when people used vowels&#8230; I&#8217;m convinced folks are just trying to get a leg-up in Wheel of Fortune down the line)</li>
</ul>
</li>
<li><a href="http://moborazzi.com/">Moborazzi</a> - visual mobile twitter&#8230; visual mobile twitter.</li>
<li><a href="http://www.yamli.com/">Yamli</a> - search in Arabic using English letters.</li>
<li><a href="http://entrecard.com/">Entrecard</a> - blogger networking meets targeted sidebar ads.</li>
<li><a href="http://www.flimp.net/">Flimp</a> - these folks will make a fortune.</li>
<li><a href="http://stylepath.com/">StylePath</a> - hopefully my wife never finds this!
<ul>
<li>Okay that one&#8217;s a joke, but it was my first thought! The real six-word summary is: visual search when words aren&#8217;t enough.</li>
</ul>
</li>
</ul>
<p>Very much looking forward to the next event, currently scheduled for July. I hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/web-innovators-group-17-in-cambridge/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/web-innovators-group-17-in-cambridge/</feedburner:origLink></item>
		<item>
		<title>WebReboot Mention in PC Magazine</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/Oq4tQ8nqOLk/</link>
		<comments>http://www.standingonthebrink.com/index.php/webreboot-mention-in-pc-magazine/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 18:18:21 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[green smb]]></category>

		<category><![CDATA[pc magazine]]></category>

		<category><![CDATA[webreboot]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/index.php/webreboot-mention-in-pc-magazine/</guid>
		<description><![CDATA[As always, I get my news fresh from Ken Jamaca at Silverback Migration Solutions, who let me know that we had a mention in this month&#8217;s PC Magazine!
So, if you see this in your mailbox:

Turn to page 96, and we&#8217;re in the Five Steps to a Greener SMB article.

Click here for the full article text [...]]]></description>
			<content:encoded><![CDATA[<p>As always, I get my news fresh from <a href="http://www.teamsilverback.com">Ken Jamaca at Silverback Migration Solutions</a>, who let me know that we had a mention in this month&#8217;s PC Magazine!</p>
<p>So, if you see this in your mailbox:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.standingonthebrink.com/wp-content/uploads/2008/04/april-2008-pcmagazine.jpg" alt="April 2008 Cover" /></p>
<p>Turn to page 96, and we&#8217;re in the <a href="http://www.pcmag.com/article2/0,2817,2276166,00.asp">Five Steps to a Greener SMB</a> article.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.standingonthebrink.com/wp-content/uploads/2008/04/april-2008-article.jpg" alt="April 2008 Article" /></p>
<p><a href="http://www.pcmag.com/article2/0,2817,2276166,00.asp">Click here</a> for the full article text on PC Magazine&#8217;s web site.</p>
<p>Many thanks to Oliver Rist from PC Magazine for the mention!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/webreboot-mention-in-pc-magazine/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/webreboot-mention-in-pc-magazine/</feedburner:origLink></item>
		<item>
		<title>REST Web Service Code Generation</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/hQmyU7OCFgk/</link>
		<comments>http://www.standingonthebrink.com/index.php/rest-web-service-code-generation/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 14:35:57 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[rest code generation]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/index.php/rest-web-service-code-generation/</guid>
		<description><![CDATA[I&#8217;m really excited about this:
http://code.google.com/p/rest-api-code-gen/
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really excited about this:</p>
<p><a href="http://code.google.com/p/rest-api-code-gen/">http://code.google.com/p/rest-api-code-gen/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/rest-web-service-code-generation/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/rest-web-service-code-generation/</feedburner:origLink></item>
		<item>
		<title>Embedded SOAP Web Services: Where’s the Value?</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/PlHkJMK6Hcw/</link>
		<comments>http://www.standingonthebrink.com/index.php/embedded-soap-web-services-wheres-the-value/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 22:03:19 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[embedded web services]]></category>

		<category><![CDATA[soap vs rest]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/index.php/embedded-soap-web-services-wheres-the-value/</guid>
		<description><![CDATA[ Steve Vinoski sent over the following comment on my previous article:
&#8230; WS-* is *not* preferable to REST. WSDL creates a tight coupling between the client and service which no amount of XML versioning can hope to alleviate. Code generation is brittle, can create unnecessary data definition dependencies, and inhibits extensibility. The industry has by [...]]]></description>
			<content:encoded><![CDATA[<p><strong> <a href="http://steve.vinoski.net/blog/2008/03/21/ws-time-warp/">Steve Vinoski</a> sent over the following comment on my <a href="http://www.standingonthebrink.com/index.php/kick-more-butt-use-less-effort-web-apps-on-web-services-part-1/">previous article</a>:</strong></p>
<blockquote><p>&#8230; WS-* is *not* preferable to REST. WSDL creates a tight coupling between the client and service which no amount of XML versioning can hope to alleviate. Code generation is brittle, can create unnecessary data definition dependencies, and inhibits extensibility. The industry has by and large learned this well over the past few years, which is why I mentioned 2004 in my blog about this. WS-* is practically dead.</p>
<p>WSDL and code generation try to give distributed systems the appearance of being local, ala RPC, only for the purpose of making the developerâ€™s life easier, but in doing they create big problems. Thatâ€™s why I mentioned 1994 and pointed to the â€œNote on Distributed Computingâ€ paper, which covers this quite well.</p>
<p>You might want to read my latest IEEE Internet Computing columns on this topic, as those who donâ€™t know history are doomed to repeat it:</p>
<p>Assuming you apply it correctly, REST is far, far preferable to what youâ€™ve described&#8230;</p></blockquote>
<p><strong>Here are my thoughts&#8230;</strong></p>
<p>Hi Steve,</p>
<p>Thanks for taking the time to write back. I appreciate it. I whole-heartedly agree with each of your points:</p>
<p>WSDL creates tight coupling, and this is bad.</p>
<p>Code generation is brittle, can create unnecessary data definition dependencies, and inhibits extensibility. All bad.</p>
<p>I know you&#8217;ve touched upon how REST is intrinsically more scalable than WS-*. I agree.</p>
<p>I believe my key failing here is that I failed to adequately explain the problem I am trying to solve.</p>
<p>I make embedded systems. More specifically, I make a device that can remotely reboot or power control a server in the same fashion as pressing the reset or power switch on the front of the server&#8217;s chassis. The device, named the <a href="http://www.servprise.com">WebReboot</a>, can also measure the temperature inside a server, and tell you if the server is powered on or off. It&#8217;s core application is the remote recovery of crashed servers.</p>
<p>The interface for the WebReboot is tightly coupled to the hardware. We use a relay to control the power switch or reset switch of a server. We use a thermistor to measure temperature. The hardware has remained relatively unchanged for quite a long time, largely because it is simple, reliable, and cost-effective. Since the hardware has remained relatively unchanged, the interface has remained relatively unchanged. The extent of changes are limited to adding complimentary functionality that does not affect existing functionality (for instance, if I added a humidity sensor). In this scenario, I don&#8217;t think the tight coupling forced upon you by WSDL really makes you any worse off.</p>
<p>Scalability is largely not a concern for this application. In practice, it is not necessary to have many folks or systems trying to reboot a crashed server or retrieve a server&#8217;s temperature simultaneously.</p>
<p>Since my functionality is limited to what&#8217;s implemented in relatively simple physical hardware (e.g., sensors and relays), I&#8217;ve found limited application for complicated data structures and dependencies in controlling this hardware. I&#8217;ve also found limited application for extensibility. I&#8217;ve come up with many hypothetical ways for their application, but I haven&#8217;t found a need to use them. For these reasons, I haven&#8217;t in practice found the generated code for Java, Python, PHP or .NET to be brittle.</p>
<p>The biggest challenge we&#8217;ve had as a small company (&lt; 10 people) competing in a large market (IT hardware) is competing with organizations that have significantly more resources than we do (Servprise was bootstrapped, and several of my competitors are public companies).  One thing I noticed was that my competitors were largely offering stove-pipe solutions that were designed only for human operators to manually use. We decided from the get-go to make ease of integration a key selling point for the solution. This selling point has been the largest contributor to our growth.</p>
<p>There are two main ways our customers integrate our solution:</p>
<p>1) The functionality is made available in a centralized system for ease of access and control (e.g., <a href="http://www.servprise.com/news/2008/1/5/servprise-automates-ten-thousand-servers-in-texas">a control panel at a hosting company</a>).</p>
<p>2) Monitoring solutions, such as <a href="http://www.nagios.org">Nagios</a>, that can tell you whether or not a server has crashed or a server is overheating, take automated recovery steps to either correct the problem or prevent escalation of the problem by sending commands to the WebReboot.</p>
<p>Our customers obtain financial benefits by making the relatively simple hardware functionality of our solution accessible in larger systems such as control panels and monitoring solutions. The problem for me was enabling this integration faster and cheaper than the competition.</p>
<p>Our competition, for the most part, chose the route of either developing and maintaining client libraries to manage communication to and from their embedded systems in Java, PHP, Python, etc., to ease integration for their customers, or left the customer to develop solutions on their own. I did not and still do not have the resources to develop and maintain client libraries for my customers. It&#8217;s code generation that has enabled me to compete on this level.</p>
<p>For my application, as well as numerous other embedded applications where the interface is tightly coupled to physical hardware, where the means of control on the physical world (e.g., physical relays and sensors, embedded systems) remain largely unchanged over time (it&#8217;s very cost-prohibitive to change), where scalability is not a major concern, and where capability and ease of integration are key selling points, WSDL and SOAP may be just what the doctor ordered, even if the only reason is code generation.</p>
<p>Clearly, those that put forth WS-* had much grander ambitions. I firmly believe REST is better suited for obtaining those ambitions. But I also believe this approach has a real future in making it easier and more cost effective for people to bridge the gap between software and the simple embedded hardware that enables control of the physical world.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/embedded-soap-web-services-wheres-the-value/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/embedded-soap-web-services-wheres-the-value/</feedburner:origLink></item>
		<item>
		<title>Kick More Butt, Use Less Effort: Web Apps on Web Services (Part 1)</title>
		<link>http://feedproxy.google.com/~r/StandingOnTheBrink/~3/N0BxqXKRAx8/</link>
		<comments>http://www.standingonthebrink.com/index.php/kick-more-butt-use-less-effort-web-apps-on-web-services-part-1/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 13:57:43 +0000</pubDate>
		<dc:creator>Cory von Wallenstein</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[embedded web services]]></category>

		<category><![CDATA[soap]]></category>

		<category><![CDATA[web applications]]></category>

		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.standingonthebrink.com/index.php/kick-more-butt-use-less-effort-web-apps-on-web-services-part-1/</guid>
		<description><![CDATA[Web services have changed my development world forever. Sounds kind of silly, I know&#8230; but I&#8217;m a true believer.
I still remember developing web applications the old-fashioned way&#8230; you know, some HTML forms posting some data to the server&#8230; doing some server-side magic, and then pushing out a hot &#8216;n fresh new page of HTML, ripe [...]]]></description>
			<content:encoded><![CDATA[<p>Web services have changed my development world forever. Sounds kind of silly, I know&#8230; but I&#8217;m a true believer.</p>
<p>I still remember developing web applications the old-fashioned way&#8230; you know, some HTML forms posting some data to the server&#8230; doing some server-side magic, and then pushing out a hot &#8216;n fresh new page of HTML, ripe for the user&#8217;s viewing pleasure! Here&#8217;s a professional artist&#8217;s depiction of what I&#8217;m talking about:</p>
<p><img src="http://www.standingonthebrink.com/wp-content/uploads/2008/03/new-page.jpg" alt="Old Fashioned Way" /></p>
<p>The user enters their name on a form (&#8221;Bob&#8221;). Clicks submit. The data is POSTed to the server as a name=value pair (&#8221;Name=Bob&#8221;). Your choice from a number of server-side technologies then generates a new page with a response (&#8221;Hi Bob!&#8221;) and sends it to the browser.</p>
<p>It was easy to understand. Quick to implement. Enjoyable to tinker with. It worked, and I made money doing it. At the time, I didn&#8217;t have too much to complain about. You make a form. You post the data. You process the data. You return HTML. Rinse and repeat.</p>
<p>Then came the wave of AJAX. Ho-ly crap.</p>
<p>I remember the first time I saw an AJAX web app. It was Gmail. It was the freakin&#8217; auto-complete fields in Gmail. I couldn&#8217;t believe it. How did it work that fast? It&#8217;s faster than&#8230; my desktop email client! Un-freakin-believable! What sorcery was at work?</p>
<p>Disgustingly simple, and disgustingly effective sorcery. Just a little snippet of client-side code, in the background and without interrupting the user, sent little tidbits of information to the server, and received and processed responses in return. If all you needed were these little tidbits, you didn&#8217;t even have to generate a new page on the server. Just let the client-side code manipulate the page as needed.</p>
<p><img src="http://www.standingonthebrink.com/wp-content/uploads/2008/03/ajax.jpg" alt="Ajax" /></p>
<p>Brilliant. This had HUGE implications for me. I come from an embedded hardware world. A world where you need to squeeze the maximum performance possible out of your hardware to deliver the greatest feature set possible to the customer, without spending too much money on super-fast processors. When it came to web-enabled embedded hardware, this opened up many, many new doors.</p>
<p>I now didn&#8217;t need the embedded processors in our remote reboot hardware to spend all of their time dynamically building HTML. Instead of dynamically building HTML files line-by-line in C, I could serve static HTML and JavaScript files. The static HTML would contain the forms for the user to interact with the system. The JavaScript would just submit the data from the forms, receive the response, and display the response for the user on the same page. I went from having to dynamically process tens of kilobytes to tens of bytes. That&#8217;s three orders of magnitude less data to process.</p>
<p>As a result, the system was much &#8220;snappier&#8221; (as end users often describe), and I had extra processing power to burn for new features. But it didn&#8217;t stop there. See, the operating system we eventually settled on for the WebReboot Enterprise product line was the <a href="http://www.lantronix.com/device-networking/utilities-tools/evolution.html">Evolution OS from Lantronix</a>. They actually had an AJAX interface right out-of-the-box. Worked just like described above. When you were using it, it didn&#8217;t even feel like there was an embedded processor on the serving end. Just what the doctor ordered. But there was more to come&#8230;</p>
<p>About the same time, a bit of buzz was being generated on web services, promising brand new worlds of interoperability, making it easier to get systems to talk to each other. If I can make it easier for people to write software against my remote reboot hardware, that would surely give me a leg up in the marketplace. It wasn&#8217;t the first technology on the block to make such promises, but hey, it&#8217;s worth a look, right?</p>
<p>There were two major camps of web service folks at the time. The REST folks, and the SOAP folks. Without getting too technical, the main differences, as I understood them, were that REST promised a very loose, informal way of exchanging data that was very quick and easy to get up and running, while SOAP promised more rigid, explicit, and formal data exchange that took a little more effort to get started with.</p>
<p>Sticking with my &#8220;What&#8217;s Your Name?&#8221; web application example, someone writing code against a REST web service might access a URI like the following:</p>
<p>http://whatisyourname.com/set-name/Bob</p>
<p>Pretty simple. You just invoked this REST web service, telling the service your name is Bob. In response, the web service could return:</p>
<p>Hi Bob!</p>
<p>That&#8217;s it&#8230; I mean it could be a fully generated HTML page as a response, it could include other stuff, but really, that shows you what I mean by quick and easy. You invoke the web service by including the parameters in the URI, and the response you read back from the request is the result.  You can even manually invoke the web service in your web browser just by plopping that URI in the address bar and seeing the response displayed in the browser&#8230; in fact, I find that to be one of the major appeals of this approach.</p>
<p>The SOAP approach, on the other hand, requires a little more setting up&#8230; see, you&#8217;re actually going to send a request to the web service formatted in XML, and then get a response back in XML.</p>
<p>You might send the following to the web service at the URI http://whatisyourname.com/services/NameService:</p>
<p>&lt;soapenv:Envelope xmlns:soapenv=<span class="code-quote">&#8220;http:<span class="code-comment">//schemas.xmlsoap.org/soap/envelope/&#8221;</span>&gt;<br />
</span>&lt;soapenv:Body&gt;&lt;q0:SetName xmlns:q0=<span class="code-quote">&#8220;http:<span class="code-comment">//whatisyourname.com/schemas/2008/02/04/NameService.xsd&#8221;</span>&gt;</span><br />
&lt;q0:Name&gt;Bob&lt;/q0:Name&gt;<br />
&lt;/q0:SetName&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;</p>
<p>The response would be:</p>
<p>&lt;soapenv:Envelope xmlns:soapenv=<span class="code-quote">&#8220;http:<span class="code-comment">//schemas.xmlsoap.org/soap/envelope/&#8221;</span>&gt;<br />
</span>&lt;soapenv:Body&gt;&lt;q0:SetNameResponse xmlns:q0=<span class="code-quote">&#8220;http:<span class="code-comment">//whatisyourname.com/schemas/2008/02/04/NameService.xsd&#8221;</span>&gt;</span><br />
&lt;q0:Response&gt;Hi Bob!&lt;/q0:Response&gt;<br />
&lt;/q0:SetNameResponse&gt;<br />
&lt;/soapenv:Body&gt;<br />
&lt;/soapenv:Envelope&gt;</p>
<p>Wow. What a difference, huh? Looks like REST is the clear winner. I mean, with REST, I just access the URI containing the parameter, and get the response back with the data. With SOAP, I have to build an XML document with VERY strict formatting requirements, submit it, get an XML document back as the response, parse it, and I have my data.</p>
<p>Well, not for me, and not for what I wanted to accomplish. You see, there&#8217;s a lot more that goes into SOAP web services than REST web services, but you get plenty back. I chose SOAP, and never looked back.</p>
<p>For my SOAP web service, I documented the format of the request and response messages using the Web Service Description Language (WSDL&#8230; just another XML document). Basically, I specified that the request XML should contain a string with the name (&#8221;Bob&#8221;), and the response XML should contain a string with, well, the response (&#8221;Hi Bob!&#8221;).  The WSDL in effect documents the API. It tells you what commands and data you can invoke on the service, and what you&#8217;ll receive in response.</p>
<p>Now here&#8217;s the absolute coolest part (at least in my opinion). Armed with the WSDL document, you can use freely available, open source tools to <strong>automatically generate stub code to send requests to and receive responses from the SOAP web service in just about any modern programming language of your choosing.</strong></p>
<p>For both the client and the server.</p>
<p>The stub code generates and parses all of the XML. As a developer working in the language of your choice, you are completely abstracted from the creation of the code for the sending and receiving of data on the wire (I had a gross omission here&#8230; thanks owed to <a href="http://steve.vinoski.net/blog/2008/03/21/ws-time-warp/">Steve Vinoski</a> for pointing it out).</p>
<p>If I were to write Java client code against this web service, I would use the open source <a href="http://ws.apache.org/axis/java/user-guide.html#WSDL2JavaBuildingStubsSkeletonsAndDataTypesFromWSDL">WSDL2Java utility</a>, and as output I would get super easy to use setName(String name) and getResponse()  Java methods to interact with the service.</p>
<p>I could just as easily write code against the service in <a href="http://pywebsvcs.sourceforge.net/">Python</a>, <a href="http://labs.seapine.com/wiki/index.php/Stub_code">.NET, PHP, Perl</a>, <a href="http://www.cs.fsu.edu/~engelen/soap.html">C/C++</a>, <a href="http://www.guru4.net/articoli/javascript-soap-client/en/">JavaScript</a>, and many more. By spending the time to formally document the API in WSDL, you can now automatically generate stub code to communicate with the web service for your language of choice. Well worth the extra effort.</p>
<p>To build a web application on top of a XML SOAP web service, the JavaScript client creates the XML SOAP requests and parses the XML SOAP responses, just like the AJAX described above.</p>
<p><img src="http://www.standingonthebrink.com/wp-content/uploads/2008/03/soap.jpg" alt="SOAP" /></p>
<p>For our remote reboot hardware, I decided to not use the built-in AJAX support of the Evolution OS (which relied on sending and receiving data by using POST and reading the response), and instead built an XML SOAP web service in C in the Evolution OS, and a JavaScript web service client for the web browser interface. It took a while to get up and running, but has paid dividends.</p>
<p><strong>What are some examples of how we&#8217;ve benefited?</strong></p>
<ul>
<li>We have complete freedom to choose the right programming tool for each job, without having to worry about maintaining multiple API libraries. We don&#8217;t need to distribute JARs and worry about compiling in Java 1.4, 1.5, or 1.6. We don&#8217;t need to distribute PHP that was developed against version 4 but is buggy against 5. We don&#8217;t impose &#8220;DLL Hell&#8221; on users. We just maintain the web service as the API, put out a guide showing people how to generate the stub code in the language of their choice, and everything else just works.</li>
<li>The web browser interface, once fully loaded, is extremely responsive, considering it is an embedded processor based, SSL-enabled system.</li>
<li>All functionality of the WebReboot Enterprise is regression tested using unit tests written in Java using <a href="http://testng.org/doc/">TestNG</a> against the XML SOAP web service. That&#8217;s right&#8230; test-driven development of an embedded system using Java, even though the embedded system was written in C. Every change to the C code that&#8217;s committed to Subversion gets checked out by <a href="http://www.atlassian.com/software/bamboo/">Bamboo, our continuous integration server,</a> built and deployed on actual WebReboot Enterprise hardware, and ran against a suite of checkin, verification, and functional regression tests (depending on what changed). All automatic. Cool beans.</li>
<li>We are abstracted from dealing with the data on the wire. I don&#8217;t have to care about sending 0&#215;0A hex for a reboot, and 0&#215;0B hex for a power on&#8230; I just call my nice clean doReboot() and doPowerOn() methods in a Java client I&#8217;m integrating with the web service, and it just works.</li>
<li>After implementing the server in C and the client in JavaScript, I wanted to create a reference implementation for the server in a language I can develop much faster than C in. Accordingly, I took the WSDL file, ran WSDL2Java on it to generate the server stub code, and filled in the blanks for the various requests and responses in Java. The net result is I was able to create a fully functional &#8220;mock&#8221; WebReboot Enterprise in a Java servlet container. We now <a href="http://dev.servprise.com/webrebootenterprise.html">distribute this</a> for folks to get started with development without needing a full, physical hardware WebReboot Enterprise in front of them, and we also use it for our <a href="http://www.servprise.com/webreboot-enterprise-demo/">live public demonstration</a>, enabling each user that connects to get a unique &#8220;session,&#8221; such that any configuration changes they make are confined to their session and don&#8217;t affect other users accessing the demo. Super cool beans.</li>
<li>In the field, we&#8217;ve whipped together Python applications in a matter of minutes against the XML SOAP web service that automated several of the mundane processes for deploying large installations&#8230; such as setting Syslog servers, DNS servers, etc.</li>
<li>XML SOAP messages are versioned by namespace. Each request contains a namespace, and each response contains a namespace. The namespaces (if you designed your service well) correspond to which version of the WSDL document (in other words, the API) they were designed for. When our web service code released in December, 2007 receives a message from a client that was written against an older version of the web service, it automatically determines this, and automatically degrades functionality. Upgrades won&#8217;t break existing systems. The more I can prevent things from breaking, the happier I am (since I don&#8217;t have to hack fixes together to get stuff working in the field), and the happier my customers are (since they don&#8217;t need to rewrite their code when they upgrade firmware&#8230; if they want the latest features made available in the latest version of the web service they&#8217;ll need to make some code changes, but they won&#8217;t break anything just by upgrading).</li>
<li>In the factory, we&#8217;ve developed a test system written in Python against the XML SOAP web service to do a full hardware inspection to ensure each unit off the line meets quality standards. The test system is even integrated with the <strong>web service built-in</strong> to <a href="http://www.atlassian.com/software/jira/">JIRA, our issue tracking system</a> (those Atlassian guys are so smart), so quality issues are automatically tracked.</li>
<li>We&#8217;ve developed <a href="http://www.servprise.com/products/nagios/NagiosPlugin.html">plugins in Python for Nagios</a> that use the data available from the XML SOAP web service on the WebReboot Enterprise (like server temperature, server power status, and server connection status) to make decisions about corrective actions that can be taken to automate the datacenter (turn off overheating servers, turn on servers that should never be turned off, reboot crashed servers, etc.).</li>
<li>Our customers have integrated the WebReboot Enterprise functionality into their client control panels using everything under the sun&#8230; from ASP.NET to PHP to Java servlets. We&#8217;re talking huge datacenters filled with thousands and thousands of servers, and the folks using those servers now have nice little reboot, power control, power monitoring, and temperature monitoring displays in the control panels they were already using to monitor and control those servers. When customers are happy, those are the coolest beans of all.<a href="http://www.standingonthebrink.com/wp-content/uploads/2008/01/webreboot-enterprise-api-manual.pdf"><br />
</a></li>
</ul>
<p>For these reasons, and several more I plan on going into more depth on, web services have enabled me to kick more butt with less effort in the embedded hardware world. In Part 2, I&#8217;ll show you how I&#8217;ve used this approach to kick more butt with less effort for full-blown, production web applications, and Part 3 will discuss the huge benefits this approach has for test-driven development of web applications. I&#8217;ll probably wrap up with some lame &#8220;TOP 10 WAYS WEB SERVICES RULEZ!!1!!!&#8221;, since that&#8217;s the only way to get on Digg anymore.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standingonthebrink.com/index.php/kick-more-butt-use-less-effort-web-apps-on-web-services-part-1/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.standingonthebrink.com/index.php/kick-more-butt-use-less-effort-web-apps-on-web-services-part-1/</feedburner:origLink></item>
	</channel>
</rss>
