<?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>Webmonkey &#187; Backend</title>
    <atom:link href="http://www.webmonkey.com/category/backend/feed/" rel="self" type="application/rss+xml" />
    <link>http://www.webmonkey.com</link>
    <description>The Web Developer&#039;s Resource</description>
    <lastBuildDate>Mon, 06 May 2013 17:29:19 +0000</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://wordpress.org/?v=3.4.2</generator>
    
    <item>
        <title>We Should Retire Aaron&#8217;s Number</title>
        <link>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/</link>
        <comments>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/#comments</comments>
        <pubDate>Wed, 16 Jan 2013 15:15:38 +0000</pubDate>

                <dc:creator>Dave Winer</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60600</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[DNS]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg" alt="We Should Retire Aaron&#8217;s Number" /></div>Last week the web lost coder and activist Aaron Swartz, but his website lives on. For now. Developer Dave Winer wants to make sure that Aaron's site lives on forever. Winer believes that one way to do that is to "retire" the URL so that the content will last as long as the web does. Sadly, there's currently no way to do that.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_60601" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg" alt="" title="Aaron_Swartz_at_Boston_Wikipedia_Meetup,_2009-08-18_" width="580" height="464" class="size-full wp-image-60601" /></a><p class="wp-caption-text">Aaron Swartz. <em>Image: <a href="https://commons.wikimedia.org/wiki/File:Aaron_Swartz_at_Boston_Wikipedia_Meetup,_2009-08-18_.jpg">Wikimedia Commons</a></em>.</p></div></p>
<p>[<em>Editor's Note: Coder and activist Aaron Swartz committed suicide Jan. 11, 2013 in New York. He was 26 years old. See Wired's <a href="http://www.wired.com/threatlevel/2013/01/aaron-swartz/">early coverage</a> for details.</em>]</p>
<p>When a great <a href="http://en.wikipedia.org/wiki/List_of_Major_League_Baseball_retired_numbers">baseball</a> or <a href="http://en.wikipedia.org/wiki/List_of_National_Basketball_Association_retired_jersey_numbers">basketball</a> player leaves the game they <a href="http://en.wikipedia.org/wiki/Retired_number">retire</a> his or her number. That means the jersey hangs from the ceiling, or there&#8217;s a plaque at the stadium, and no player on the team ever wears that number again.</p>
<p><a href="https://en.wikipedia.org/wiki/Babe_Ruth">Babe Ruth&#8217;s</a> number, 3, is retired. <a href="http://en.wikipedia.org/wiki/Michael_Jordan">Michael Jordan&#8217;s</a> too (23). Jackie Robinson&#8217;s <a href="http://en.wikipedia.org/wiki/List_of_Major_League_Baseball_retired_numbers#Number_retired_by_Major_League_Baseball">number</a>, 42, is retired for all baseball teams.</p>
<p>On the web, retiring a number would mean the website is permanently registered, and the content is preserved so it lasts as long as the web does. That means the contents of <a href="http://www.aaronsw.com/">aaronsw.com</a> will be there forever. It will never become a porn site, or a landing page, or whatever.</p>
<p>Right now there is no way to do this. Isn&#8217;t that strange. We could fix it if we want. The internet is just software. It would be a small but worthwhile hack and could set a precedent for future memorials.</p>
<p>Something to think about!</p>
<p><em>This post first appeared on <a href="http://threads2.scripting.com/2013/january/weShouldRetireAaronsNumber">Scripting News</a>. Also see the <a href="http://news.ycombinator.com/item?id=5064923">related thread on Hacker News</a></em>.</p>
<div class="bio"><a href="http://www.wired.com/epicenter/author/Dave"><img src="http://www.wired.com/images/1x1.trans.gif" data-lazy-src="http://www.wired.com/epicenter/wp-content/gallery/biopics/dave_winer.jpg" alt="" /><noscript><img src="http://www.wired.com/epicenter/wp-content/gallery/biopics/dave_winer.jpg" alt="" /></noscript></a><a href="http://worldoutline.scripting.com/blogroll/aboutTheAuthor">Dave Winer</a>, a former researcher at NYU and Harvard, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software. A former contributing editor at <em>Wired</em> magazine, Dave won the Wired Tech Renegade award in 2001.<br /> Follow <a href="http://www.twitter.com/davewiner">@davewiner</a> on Twitter.</div>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Host Your Static Website on Amazon S3, No WWW Necessary</title>
        <link>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/</link>
        <comments>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/#comments</comments>
        <pubDate>Thu, 03 Jan 2013 16:24:41 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60424</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[amazon s3]]></category>
        <description><![CDATA[Amazon's S3 file hosting service has long been a cheap, easy way to publish static websites, but now it's even more appealing thanks to support for root domains. Amazon's documentation can be a bit confusing, but fear not, we'll show you how to get your custom domain up and running in no time.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2011/02/aws.gif" />Amazon&#8217;s S3 file storage service started life as just that &#8212; a simple way to store static files and pay for only the data you used. When you don&#8217;t need an always-on server, S3 fits the bill. </p>
<p>But if you can store static files, why not whole static websites? In 2011 Amazon began allowing you to point your own domain to an S3 &#8220;bucket&#8221;, a folder in Amazon parlance. Custom domain support made it simple to <a href="http://www.webmonkey.com/2011/02/amazon-s3-storage-now-handles-entire-websites/">host entire static sites</a>; the catch was that you needed to use a subdomain &#8212; for example, www.</p>
<p>Now <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">the www restriction has been lifted</a> and you can point any root domain at S3 and serve your files directly. The only catch is that Amazon has created its own non-standard DNS workaround, which means you must use Amazon&#8217;s Route 53 service to host the DNS data for your domain.</p>
<p>Unfortunately, while the new root domain support is great news for anyone using a static blog generator like <a href="http://jekyllrb.com/">Jekyll</a>, Amazon&#8217;s <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html">documentation</a> leaves much to be desired. To help you get started with S3 hosting, here&#8217;s a quick guide to setting up S3 to serve files from a root domain (rather than making the root domain redirect to www.mydomain.com, as the <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">Amazon blog post instructions</a> do).</p>
<p>First, register a domain name and point your DNS records to Amazon&#8217;s Route 53 service (the Route 53 docs have <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/R53Example.html">detailed instructions</a> on how to do this). The next step is to create an S3 bucket for your domain. In other words, a bucket named mydomain.com. </p>
<p>Now click the Properties button, select the Website tab and make sure that the option is enabled and the Index Document is set to index.html. You&#8217;ll also need to click the Permissions tab and set a bucket policy (you can use this <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html">basic example</a> from Amazon).</p>
<p>Now upload your site to that bucket and head back to Route 53. Here comes the magic. To make this work you need to create an A &#8220;Alias&#8221; DNS record. Make sure you name it the same as your domain name. Sticking with the earlier example, that would be mydomain.com. Now click the Alias Target field and select the S3 endpoint you created earlier when you set up the bucket. </p>
<p>And that&#8217;s it. Behind the scenes that Route 53 &#8220;Alias&#8221; record looks like a normal DNS A record. That means things like email will continue to work for your domain and at the same time Route 53 directs requests to your S3 bucket. If you want to make www redirect to the root domain you can either set that up through Route 53 (see <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">Amazon&#8217;s instructions</a>) or handle it through another service.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Google Drive&#8217;s New &#8216;Site Publishing&#8217; Takes on Amazon, Dropbox</title>
        <link>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/</link>
        <comments>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/#comments</comments>
        <pubDate>Thu, 29 Nov 2012 20:18:45 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60127</guid>
        		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[google drive]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite.jpg" alt="Google Drive&#8217;s New &#8216;Site Publishing&#8217; Takes on Amazon, Dropbox" /></div>Google Drive can now host entire websites if you don't mind serving them from a long, confusing URL. Google Drive's new "site publishing" tools make it easy for app developers to upload files to Drive and then serve those files on the web.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_60128" class="wp-caption aligncenter" style="width: 590px"><img src="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite.jpg" alt="" title="gdrivesite" width="580" height="315" class="size-full wp-image-60128" /><p class="wp-caption-text">Google&#8217;s demo site, served entirely by Google Drive. <em>Image: Screenshot/Webmonkey</em></p></div></p>
<p>Google has unveiled a new feature dubbed &#8220;<a href="http://googleappsdeveloper.blogspot.nl/2012/11/announcing-google-drive-site-publishing.html">site publishing</a>&#8221; for the company&#8217;s Drive cloud hosting service. Drive&#8217;s new site publishing is somewhere between a full-featured static file hosting service like Amazon S3 and Dropbox&#8217;s public folders, which can make hosted files available on the web.</p>
<p>Google has set up a simple <a href="https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM/">demo site</a> served entirely from Google Drive to give you an idea of what&#8217;s possible with the site publishing feature. Essentially site publishing gives your public folders a URL on the web &#8212; anything you drop in that folder can then be referenced relative to the root URL. It&#8217;s unclear from the announcement how these new features fit with Google&#8217;s existing answer to Amazon S3, Google Cloud Storage. </p>
<p>The API behind site publishing works a lot like what you&#8217;ll find in Amazon&#8217;s S3 offering. If you use the Drive API&#8217;s <code>files.insert</code> method to upload a file to Drive, it will return a <code>webViewLink</code> attribute, something like <code>https://googledrive.com/host/A1B2C3D4E5F6G7H8J</code>. That ugly, but functional URL becomes the base URL for your content. So, if you uploaded a folder named <code>images</code>, with a file named <code>kittens.jpg</code>, you could access it on the web at <code>https://googledrive.com/host/A1B2C3D4E5F6G7H8J/images/kittens.jpg</code></p>
<p>There&#8217;s one drawback though, Drive&#8217;s site publishing doesn&#8217;t appear to support custom domains, which means it works fine for assets like images, CSS or JavaScript, but unless you don&#8217;t mind serving your site from some funky URLs, it&#8217;s probably not the best choice for hosting an entire site.</p>
<p>There are already numerous static file hosting solutions on the web including Dropbox and Amazon&#8217;s S3, as well as whole publishing systems that use Dropbox and S3 to host files, but for those who would prefer a Google-based solution, now you have it.</p>
<p>For more details on the new API see the <a href="http://googleappsdeveloper.blogspot.nl/2012/11/announcing-google-drive-site-publishing.html">Google Apps Developer Blog</a> and be sure to read through the <a href="https://developers.google.com/drive/publish-site">Drive SDK docs</a>. If you need help, Google is answering questions over on <a href="http://stackoverflow.com/questions/tagged/google-drive-sdk">Stack Overflow</a>.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Behind the Scenes at Instagram: Tools for Building Reliable Web Services</title>
        <link>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/</link>
        <comments>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/#comments</comments>
        <pubDate>Tue, 10 Apr 2012 16:58:59 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=55514</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Instagram]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo-200x100.png" type="image/png" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo.png" alt="Behind the Scenes at Instagram: Tools for Building Reliable Web Services" /></div>Want to build a web service that sells for a cool billion dollars? Instagram's developers have some advice for you: Choose your tools wisely.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><img class="aligncenter size-full wp-image-55519" title="Instagram_logo" src="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo.png" alt="" width="200" height="200" />In case you missed it, yesterday <a href="http://www.wired.com/epicenter/2012/04/facebook-buys-instagram/">Facebook acquired Instagram</a>, a photo-sharing service with some 30 million users and hundreds of millions of images on its servers.</p>
<p>The reported sale price of one billion dollars no doubt has many developers dreaming of riches, but how do you build a service and scale it to the size and success of Instagram? At least part of the answer lies in choosing your tools wisely.</p>
<p>Fortunately for outside developers, Instagram&#8217;s devs have been documenting the tools they used all along. The company&#8217;s <a href="http://instagram-engineering.tumblr.com/">engineering blog</a> <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">outlined its development stack</a> last year and has further detailed <a href="http://instagram-engineering.tumblr.com/post/12202313862/storing-hundreds-of-millions-of-simple-key-value-pairs">how it uses</a> several of the tools it&#8217;s chosen.</p>
<p>Instagram uses an interesting mashup of tried-and-true technologies alongside more cutting-edge tools, mixing SQL databases with NoSQL tools like Redis, and chosing to host its traditional Ubuntu servers in Amazon&#8217;s cloud.</p>
<p>In a blog post last year Instagram <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">outlined its core principles</a> when it comes to chosing tools, writing, &#8220;keep it very simple, don&#8217;t reinvent the wheel [and] go with proven and solid technologies when you can.&#8221;</p>
<p>In other words, go with the boring stuff that just works.</p>
<p>For Instagram that means a Django-based stack that runs on Ubuntu 11.04 servers and uses PostgreSQL for storage. There are several additional layers for load balancing, push notifications, queues and other tasks, but overwhelmingly Instagram&#8217;s stack consists of stolid, proven tools.</p>
<p>Among the newer stuff is Instagram&#8217;s use of <a href="http://redis.io/">Redis</a> to store <a href="http://instagram-engineering.tumblr.com/post/12202313862/storing-hundreds-of-millions-of-simple-key-value-pairs">hundreds of millions of key-value pairs</a> for fast feeds, and <a href="http://gunicorn.org/">Gunicorn</a> instead of Apache as a web server.</p>
<p>All in all it&#8217;s a very impressive setup that has, thus far, helped Instagram avoid the down time that has plague many similar services hit with the same kind of exponential growth. (Twitter, I&#8217;m looking at you.) For more details on how Instagram looks behind the scenes and which tools the company uses, be sure to check out <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">the blog post</a> as well as <a href="http://instagram-engineering.tumblr.com/archive">the archives</a>.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Microsoft Unveils New Plan to Speed Up the Web</title>
        <link>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/</link>
        <comments>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/#comments</comments>
        <pubDate>Tue, 27 Mar 2012 15:58:58 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=55227</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[SPDY]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc.jpg" alt="Microsoft Unveils New Plan to Speed Up the Web" /></div>First Google proposed the SPDY protocol for a "speedier" web. Now Microsoft wants in on the fun. The company has proposed an alternative to the SPDY protocol which it calls HTTP Speed+Mobility. The details of Microsoft's plan are still unclear, but with two brain trusts now contributing maybe we'll get a faster internet sooner rather than later.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_55229" class="wp-caption alignleft" style="width: 290px"><a href="http://www.flickr.com/photos/theogeo/3605733189/in/photostream/"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc.jpg" alt="" title="streaking_by_theogeo_flickrcc" width="280" height="312" class="size-full wp-image-55229" /></a><p class="wp-caption-text">Photo: <a href='http://www.flickr.com/photos/theogeo/3605733189/in/photostream/'>Lindsey Turner</a>/Flickr</p></div>Microsoft wants in on the drive to speed up the web. The company plans to submit its proposal for a faster internet protocol to the standards body charged with creating HTTP 2.0.</p>
<p>Not coincidentally, that standards body, the Internet Engineering Task Force (IETF), is meeting this week to discuss the future of the venerable Hypertext Transfer Protocol, better known as HTTP. On the agenda is creating HTTP 2.0, a faster, modern approach to internet communication.</p>
<p>One candidate for HTTP 2.0 is Google&#8217;s <a href="http://www.webmonkey.com/2012/01/google-works-on-internet-standards-with-tcp-proposals-spdy-standardization/">SPDY protocol</a>. Pronounced &#8220;speedy,&#8221; Google&#8217;s proposal would replace the HTTP protocol &#8212; the language currently used when your browser talks to a web server. When you request a webpage or a file from a server, chances are your browser sends that request using HTTP. The server answers using HTTP, too. This is why &#8220;http&#8221; appears at the beginning of most web addresses.</p>
<p>The SPDY protocol handles all the same tasks as HTTP, but SPDY can do it all about 50 percent faster. Chrome and Firefox both support SPDY and several large sites, including Google and Twitter, are already <a href="http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/">serving pages over SPDY where possible</a>. </p>
<p>Part of the IETF&#8217;s agenda this week is to discuss the SPDY proposal, and the possibility of turning it into a standard.</p>
<p>But now Microsoft is submitting another proposal for the IETF to consider.</p>
<p>Microsoft&#8217;s new HTTP Speed+Mobility lacks a catchy name, but otherwise appears to cover much of the same territory SPDY has staked out. Though details on exactly what HTTP Speed+Mobility entails are thin, judging by the <a href="http://blogs.msdn.com/b/interoperability/archive/2012/03/26/speed-and-mobility-an-approach-for-http-2-0-to-make-mobile-apps-and-the-web-faster.aspx">blog post announcing it</a>, HTTP Speed+Mobility builds on SPDY but also includes improvements drawn from work on the HTML5 WebSockets API. The emphasis is on not just the web and web browsers, but mobile apps.</p>
<p>&#8220;We think that apps &#8212; not just browsers &#8212; should get faster,&#8221; writes Microsoft&#8217;s Jean Paoli, General Manager of Interoperability Strategy.</p>
<p>To do that, Microsoft&#8217;s HTTP Speed+Mobility &#8220;starts from both the Google SPDY protocol and the work the industry has done around WebSockets.&#8221; What&#8217;s unclear from the initial post is exactly where HTTP Speed+Mobility goes from that hybrid starting point.</p>
<p>But clearly Microsoft isn&#8217;t opposed to SPDY. &#8220;SPDY has done a great job raising awareness of web performance and taking a &#8216;clean slate&#8217; approach to improving HTTP,&#8221; writes Paoli. &#8220;The main departures from SPDY are to address the needs of mobile devices and applications.&#8221;</p>
<p>SPDY co-inventor Mike Belshe <a href="https://plus.google.com/u/0/110209787594312878744/posts/cZtdadKmue4">writes on Google+</a> that he welcomes Microsoft&#8217;s efforts and looks forward to &#8220;real-world performance metrics and open source implementations so that we can all evaluate them.&#8221;</p>
<p>Belshe also notes that Microsoft&#8217;s implication that SPDY is not optimized for mobile &#8220;is not true.&#8221; Belshe says that the available evidence suggests that developers are generally happy using SPDY in mobile apps, &#8220;but it could always be better, of course.&#8221;</p>
<p>The process of creating a faster HTTP replacement will not mean simply picking any one vendor&#8217;s protocol and standardizing it. Hopefully the IETF will take the best ideas from all sides and combine them into a single protocol that can speed up the web. The exact details &#8212; and any potential speed gains &#8212; from Microsoft&#8217;s HTTP Speed+Mobility contribution remain to be seen, but the more input the IETF gets the better HTTP 2.0 will likely be.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Twitter Catches the &#8216;SPDY&#8217; Train</title>
        <link>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/</link>
        <comments>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/#comments</comments>
        <pubDate>Fri, 09 Mar 2012 15:49:07 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=54895</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[SPDY]]></category>
		<category><![CDATA[Twitter]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-660x527.jpg" alt="Twitter Catches the &#8216;SPDY&#8217; Train" /></div>Twitter is now serving up pages over Google's improved web protocol, making the site a bit speedier in Chrome and (soon) Firefox. Google is hoping that its SPDY protocol, pronounced "speedy," will one day speed up not just Google and Twitter, but the entire web.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_54918" class="wp-caption alignleft" style="width: 335px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b.jpeg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-300x239.jpg" alt="" title="385574568_cbe5fe31a7_b" width="325" class="alignleft size-medium wp-image-54918" /></a><p class="wp-caption-text"><em>Photo: <a href='https://secure.flickr.com/photos/dark_ghetto28/385574568/sizes/l/in/photostream/'>dark_ghetto28</a>/Flickr</em></p></div></p>
<p>Twitter has embraced Google&#8217;s vision of a faster web and is now <a href="https://twitter.com/#!/raffi/status/177616491204714497/photo/1">serving webpages over the SPDY protocol</a> to browsers that support it.</p>
<p>SPDY, pronounced &#8220;speedy,&#8221; is a replacement for the HTTP protocol &#8212; the language currently used when your browser talks to a web server. When you request a webpage or a file from a server, chances are your browser sends that request using HTTP. The server answers using HTTP, too. This is why &#8220;http&#8221; appears at the beginning of most web addresses.</p>
<p>The SPDY protocol handles all the same tasks as HTTP, but SPDY can do it all about 50 percent faster.</p>
<p>SPDY started life as a proprietary protocol at Google and worked only in the company&#8217;s Chrome web browser. SPDY has since won support elsewhere. Firefox will have <a href="http://hacks.mozilla.org/2012/02/spdy-brings-responsive-and-scalable-transport-to-firefox-11/">SPDY support</a> when version 11 hits prime time in the near future [<b>Update:</b> As Mozilla's Chris Blizzard <a href="https://twitter.com/#!/chrisblizzard/status/178228640595718144">points out</a>, SPDY is disabled by default in Firefox 11. If you're using the beta and want to give it a try, you'll need to visit about:config, search for <code>network.http.spdy.enabled</code> and set the value to true. If all goes well SPDY will be turned on by default in Firefox 13.]. Amazon also baked SPDY support into its Silk browser for the Kindle. </p>
<p>The IETF&#8217;s HTTPbis Working Group &#8212; the standards body charged with creating and maintaining the HTTP specification &#8212; is now <a href="http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00">considering</a> <a href="http://www.webmonkey.com/2012/01/google-works-on-internet-standards-with-tcp-proposals-spdy-standardization/">adding SPDY</a> to HTTP 2.0, which will improve the speed of HTTP connections. </p>
<p>Despite the web standards backing, SPDY still has a long way to go before it&#8217;s an everyday part of the web. With only Chrome and Firefox behind it, SPDY is still only available for about <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=1&amp;qpcustomb=0">40 percent of desktop users</a>. But with large services like Twitter throwing their weight behind it, SPDY may well start to take the web by storm &#8212; the more websites that embrace SPDY the more likely it is that other browsers will add support for the faster protocol.</p>
<p>If you&#8217;d like to follow Twitter&#8217;s lead and get your own site serving over SPDY, check out <a href="http://calendar.perfplanet.com/2011/introducing-mod_spdy-a-spdy-module-for-the-apache-http-server/">mod_spdy</a>, a SPDY module for the Apache server (currently a beta release). </p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>OpenDNS and Google Working with CDNs on DNS Speedup</title>
        <link>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/</link>
        <comments>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/#comments</comments>
        <pubDate>Wed, 31 Aug 2011 14:05:19 +0000</pubDate>

                <dc:creator>Ryan Paul - Ars Technica</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=51516</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Location]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[Web Basics]]></category>
        <description><![CDATA[A group of DNS providers and content delivery network (CDN) companies have devised a new extension to the DNS protocol that that aims to more effectively direct users to the closest CDN endpoint. Google, OpenDNS, BitGravity, EdgeCast, and CDNetworks are among the companies participating in the initiative, which they are calling the Global Internet Speedup. [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><a href="http://arstechnica.com/telecom/news/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup.ars"><img src="http://www.webmonkey.com/wp-content/uploads/2010/07/ars-technica1.jpg" /></a>A group of DNS providers and content delivery network (CDN) companies have devised a new extension to the DNS protocol that that aims to more effectively direct users to the closest CDN endpoint. Google, OpenDNS, BitGravity, EdgeCast, and CDNetworks are among the companies participating in the initiative, which they are calling the <a href="http://www.afasterinternet.com/">Global Internet Speedup</a>.</p>
<p>The new DNS protocol extension, which is documented in an IETF draft, specifies a means for including part of the user&#8217;s IP address in DNS requests so that the nameserver can more accurately pinpoint the destination that is topologically closest to the user. Ensuring that traffic is directed to CDN endpoints that are close to the user could potentially reduce latency and congestion for high-impact network services like video streaming.</p>
<p>The new protocol extension has already been implemented by <a href="http://www.opendns.com/">OpenDNS</a> and <a href="http://code.google.com/speed/public-dns/">Google&#8217;s Public DNS</a>. It works with the CDN services that have signed on to participate in the effort. Google and OpenDNS hope to make the protocol extension an official IETF standard. Other potential adopters—such as Internet ISPs—are free to implement it from the draft specification.</p>
<p>It&#8217;s not really clear in practice how much impact this will have on network performance. It&#8217;s worth noting that GeoIP lookup technology is already used by some authoritative DNS servers for location-aware routing. The new protocol extension will reportedly address some of the limitations of previous approaches.</p>
<p><em>This article originally appeared on <a href="http://www.arstechnica.com/">Ars Technica</a>, Wired&#8217;s sister site for in-depth technology news.</em></p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Google&#8217;s New Cloud Storage Service Takes on Amazon S3</title>
        <link>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/</link>
        <comments>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/#comments</comments>
        <pubDate>Thu, 20 May 2010 14:48:39 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=47484</guid>
        		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Google]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" alt="Google&#8217;s New Cloud Storage Service Takes on Amazon S3" /></div>Google plans to go head to head with Amazon&#8217;s popular S3 cloud storage service with the new Google Storage for Developers. Like S3, Google&#8217;s new service offers developers a cheap, scalable way to store data online. While it isn&#8217;t exactly the fabled &#8220;GDrive,&#8221; Google Storage for Developers certainly lays the groundwork for Google to create [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" alt="googlecode" title="googlecode" width="170" height="69" class="alignleft size-full wp-image-47485" />Google plans to go head to head with Amazon&#8217;s popular S3 cloud storage service with the new <a href="http://code.google.com/apis/storage/">Google Storage for Developers</a>. Like S3, Google&#8217;s new service offers developers a cheap, scalable way to store data online.</p>
<p>While it isn&#8217;t exactly the fabled &#8220;<a href="http://www.webmonkey.com/2007/11/the_fabled_gdrive_may_soon_see_the_light_of_day/">GDrive</a>,&#8221; Google Storage for Developers certainly lays the groundwork for Google to create a user-friendly online storage service. </p>
<p>Google Storage for Developers offers a RESTful API, backups across multiple data centers and even has support for storing large files up to hundreds of gigabytes in size. </p>
<p><a href="http://code.google.com/apis/storage/docs/overview.html">Google Storage for Developers</a> is currently an experimental Google Labs project. For now the service is available by invitation only and limited to U.S. developers. You can head over to <a href="http://gs-signup-redirect.appspot.com/">the sign up page</a> to request an invite which will give you access to 100GB of data storage and 300GB per month of data-transfer bandwidth.</p>
<p>After your application hits those limits a pay-as-you-go scheme kicks in. The pricing is roughly analogous to Amazon&#8217;s S3 service. Google&#8217;s version will run you 17 cents per GB per month for simple storage, 10 cents per GB for uploading data and 15 to 30 cents per GB for downloads. There&#8217;s also a fee for the number of requests &#8212; $.01 per 1000 PUT, POST or LIST requests and $0.01 per 10,000 requests using GET or HEAD.</p>
<p>Unfortunately that&#8217;s just different enough from <a href="http://aws.amazon.com/s3/#pricing">Amazon&#8217;s pricing structure</a> (which decreases the per GB price as your usage goes up) that it&#8217;s hard to say which is cheaper. At first glance Amazon&#8217;s S3 service looks marginally cheaper for storage, but in the end the total cost &#8212; and which is cheaper &#8212; will vary depending on the nature of your web app and how you use either storage service.</p>
<p>Hopefully, now that there&#8217;s some competition in the cloud storage space, both services will eventually become even cheaper.</p>
<p>Google does offer some extra tools that Amazon doesn&#8217;t have &#8212; the BigQuery API and the Prediction API. </p>
<p>According the <a href="http://googlecode.blogspot.com/2010/05/bigquery-and-prediction-api-get-more.html">Google Code announcement</a>, <a href="http://code.google.com/apis/bigquery/">BigQuery</a> is designed to explore the history of your data, and the more interesting <a href="http://code.google.com/apis/predict/">Prediction API</a> gives you access to Google&#8217;s machine learning algorithms which are designed to &#8220;make your apps more intelligent.&#8221; </p>
<p>The Prediction API can help make real-time decisions &#8220;such as recommending products, assessing user sentiment from blogs and tweets, routing messages or assessing suspicious activities,&#8221; says the Google Code blog.</p>
<p>For now there is no charge for using the extra APIs, though noting that in the announcement seems to indicate that, when Google Storage for Developers moves out of Labs, there will be an additional charge.</p>
<p>Because Google Storage for Developers is a beta Labs project, you won&#8217;t want to switch from Amazon&#8217;s services just yet, but if you&#8217;d like to take Google Storage for Developers for spin, head over to the <a href="http://gs-signup-redirect.appspot.com/">sign up page</a> and request an invite.</p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2009/11/google_drops_the_price_of_online_storage__paves_the_way_for_a_cheap_cloud-based_os/">Google Cuts Online Storage Pricing, Fuels Anticipation for Cheap Cloud-Based OS</a></li>
<li><a href="http://www.webmonkey.com/2010/05/dropbox-api-lets-you-add-cloud-storage-to-your-apps/">Dropbox API Lets You Add Cloud Storage to Your Apps</a></li>
<li><a href="http://www.webmonkey.com/2007/11/the_fabled_gdrive_may_soon_see_the_light_of_day/">The Fabled GDrive May Soon See the Light of Day</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/feed/</wfw:commentRss>
        <slash:comments>11</slash:comments>

        
    </item>
    
    <item>
        <title>Learn Enough Unix for Your Resume</title>
        <link>http://www.webmonkey.com/2010/02/learn_enough_unix_for_your_resume/</link>
        <comments>http://www.webmonkey.com/2010/02/learn_enough_unix_for_your_resume/#comments</comments>
        <pubDate>Tue, 16 Feb 2010 00:45:47 +0000</pubDate>

                <dc:creator>Pam Statz</dc:creator>

        <guid isPermaLink="false">http://stag.wired.com/primate/?p=787</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wiki]]></category>
        <description><![CDATA[On the resume that convinced Wired to hire me, I said that I knew enough about Unix that it didn&#8217;t scare me anymore. This wasn&#8217;t exactly true. Unix was still a chilling concept for me when I arrived at the San Francisco office armed with a copy of Unix for Dummies. The managing editor steered [...]]]></description>

            <content:encoded><![CDATA[<!-- wpautop disabled --><p>On the resume that convinced Wired to hire me, I said that I knew enough about Unix that it didn&#8217;t scare me anymore. This wasn&#8217;t exactly true. Unix was still a chilling concept for me when I arrived at the San Francisco office armed with a copy of <i>Unix for Dummies.</i> The managing editor steered me to my desk and instead of the Macintosh I was hoping for, there sat a purple SGI machine.

</p><p>I realized then that I needed to learn a lot about Unix fast. Initially I tried using SGI&#8217;s graphical user interface, which mimicked the Macintosh desktop fairly well, but soon realized that it was just too damn slow. So I stole some better Unix books from the engineering staff and found a nice Unix expert to help me. Soon I was <tt>cp</tt>-ing, <tt>mv</tt>-ing, and <tt>chmod</tt>-ing like lightning. Unix still gives me the occasional nightmare, but basically I love it. It&#8217;s fast, it makes sense (most of the time), and anyone can figure it out with a little work. Plus, it looks great on a résumé. If you can convince a prospective employer that you have a working knowledge of Unix, you&#8217;re one step ahead of everyone else who is too scared even to try figuring it out.

</p><p>I&#8217;ve put together a very basic explanation of Unix to get you started. But first, a warning. Unix is very powerful. The wrong collection of keystrokes can blow away files that you&#8217;ll probably never be able to recover, so practice on sample files before you move on to anything important.



</p><span id="more-787"></span>

<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> </div>

<ol>

<li><a href="#Getting_started">Getting started</a></li>

<li><a href="#Telnet">Telnet</a></li>



<li><a href="#Basic_Commands">Basic Commands</a></li>

<li><a href="#Permissions">Permissions</a>

<ol>

<li><a href="#What_the_Heck_is_rwx.3F">What the Heck is rwx?</a></li>

</ol>

</li>

<li><a href="#Text_Editors">Text Editors</a>



<ol>

<li><a href="#VI">VI</a></li>

<li><a href="#Emacs">Emacs</a></li>

<li><a href="#PICO">PICO</a></li>



</ol>





</td></tr></tbody></table>

<a name="Getting_started"></a><h3> <span class="mw-headline">Getting started</span></h3>

<p>Before you can do anything, you need an account. Find someone at your school or workplace whose title is webmaster, server administrator, systems administrator, or Unix god. Be very nice to this person. Bring gifts and libations, and then ask them to set up an account and user directory for you. Promise that you won&#8217;t bug them very often with questions, even though this may indeed turn out to be a white lie.

</p><p>Keep in mind that Unix installations vary widely. If something doesn&#8217;t work for you here, it may be that a program wasn&#8217;t installed or your account was misconfigured. There&#8217;s also a strong possibility that you&#8217;re using one of several different kinds of Unix, which means your commands may vary slightly from what you learn here. If you run into trouble, go ask the person who set up your account to help you &#8212; but don&#8217;t forget to bring a gift.

</p><p>Once you&#8217;ve got your account, go to the bookstore and purchase a few Unix books. My favorite is O&#8217;Reilly &amp; Associates&#8217; <i><a href="http://www.oreilly.com/catalog/unixnut4/" class="external text" title="http://www.oreilly.com/catalog/unixnut4/" rel="nofollow">UNIX in a Nutshell</a>.</i> It&#8217;s a fabulous dictionary of commands.



</p>

<a name="Telnet"></a><h3> <span class="mw-headline">Telnet</span></h3>

<p>To access your account, you&#8217;ll need a shell (a program that sends whatever you type to the host computer). The easiest way to go about this is to open a Telnet window. (If you&#8217;re sitting at the host computer, you&#8217;ll already have a shell.) Accessing files with Telnet is essentially the same as opening the Finder on your Mac or opening the Windows Explorer on a Microsoft machine &#8212; except that when you get into the file structure, you won&#8217;t find all those sissy color-coded directories.

</p><p>So open Telnet, and choose <tt>Open Connection</tt> from the <tt>File</tt> menu. Fill in the <tt>Host/Session Name</tt> slot with your host&#8217;s address and hit <tt>Connect.</tt> You&#8217;ll be asked to enter the username and password that your nice sysadmin assigned you when your account was set up. You should also have a user directory, which is the first place you&#8217;ll end up when you Telnet to your Host. When you log on, you should get something that looks like this:



</p>

<pre class="brush: js"> IRIX (sutro)



 login:pam



 Password:



 IRIX Release 5.3 IP20 sutro



 Copyright 1987-1994 Silicon Graphics, Inc. All Rights Reserved.



 Last login:Fri Dec 13 14:04:59 PST 1996 by UNKNOWN@hill.hotwired.com



 You have mail.



 sutro[~]%

</pre>

<p>Although you probably won&#8217;t see it when you log on, the actual location of your user directory is

</p>

<pre class="brush: js"> sutro.hotwired.com[~]%pwd



 /usr/people/pam



</pre>

<p><br />

</p>

<a name="Basic_Commands"></a><h3> <span class="mw-headline">Basic Commands</span></h3>

<p>I&#8217;ve put together a few commands to get you started. Most of these commands have several options that make them even more powerful, but I won&#8217;t go into those here. You can find them in the Unix Online Manual, which I&#8217;ll explain in a minute (or you can use that book you went out and bought).

</p><p><b>ls</b> &#8211; list files in a directory

syntax:ls [options] [names]



</p><p>You should get something that looks like this:

</p>

<pre class="brush: js"> sutro.hotwired.com[~]% ls

 airwolf.au          goo.html    unixclass

 apanel.parameters   graphics

</pre>

<p>In this example I have two files ( <tt>airwolf.au</tt> and <tt>goo.html</tt>) and three directories (<tt>unixclass, apanel.parameters,</tt> and <tt>graphics</tt>) in my user directory.

</p><p><b>cd</b> &#8211; change directory

syntax:cd [dir]



</p><p>Here&#8217;s an example of it what the result might be:sutro.hotwired.com[~]% cd unixclass

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% ls

 one       one.html  two       two.html

 sutro.hotwired.com[~/unixclass]%

</pre>

<p>In this case, I&#8217;ve changed from my user directory to the <tt>unixclass</tt> directory, which holds one directory and two files (if you want to move back one directory use <tt>% cd ../</tt>).

</p><p><br />

<b>mv</b> &#8211; moves or renames a file or directory

syntax:mv [options] sources target

</p><p>Here&#8217;s what it might look like:

</p>



<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% mv one/ two/

 sutro.hotwired.com[~/unixclass]% ls

 one.html  two       two.html

 sutro.hotwired.com[~/unixclass]% ls two/

 one

 sutro.hotwired.com[~/unixclass]%

</pre>

<p><br />

I moved the directory <tt>one</tt> into directory <tt>two.</tt>

</p><p>If you use <tt>mv</tt> to rename a file, it will look something like this:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% mv two/ somethingdifferent

 sutro.hotwired.com[~/unixclass]% ls

 one.html            somethingdifferent  two.html



</pre>

<p><br />

In this example, I&#8217;ve renamed the directory <tt>two.</tt> Now it is called <tt>somethingdifferent.</tt>

</p><p><b>rm</b> &#8211; removes a file

syntax:rm [options] [files]

</p><p>Here&#8217;s an example of removing a file:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% rm one.html

 sutro.hotwired.com[~/unixclass]% ls

 somethingdifferent  two.html

</pre>

<p>I removed the file <tt>one.html</tt> from the directory <tt>unixclass.</tt>



</p><p><b>rm -ir</b> &#8211; removes a directory

</p><p>Here&#8217;s what happens when you remove a directory:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% rm -ir somethingdifferent/

 Directory somethingdifferent/. Remove&nbsp;? (yes/no)[no]&nbsp;:yes

 Directory somethingdifferent//one. Remove&nbsp;? (yes/no)[no]&nbsp;:yes

 sutro.hotwired.com[~/unixclass]% ls

 two.html

</pre>

<p>In this example, I&#8217;ve used <tt>rm -ir</tt> to remove the directory <tt>somethingdifferent.</tt> Before the directory is removed, I must confirm that I really want it gone. Once I do, <tt>somethingdifferent</tt> no longer exists. Be very careful with <tt>rm</tt>, because once files or directories are gone, they&#8217;re probably gone forever.



</p><p><b>mkdir</b> &#8211; creates new directory

syntax:mkdir [options] directories

</p><p>Here&#8217;s how you do it:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% mkdir waga

 sutro.hotwired.com[~/unixclass]% ls

 two.html  waga

</pre>

<p>I used <tt>mkdir</tt> to create the directory <tt>waga.</tt>

</p><p><b>more</b> &#8211; <tt>more</tt> a file when you just want to read it (not edit it)



</p><p><b>less</b> &#8211; <tt>less</tt> really is <tt>more.</tt> It does the same thing as <tt>more,</tt> but it allows you to search through a file (among other things).

</p><p><b>exit</b> &#8211; allows you to log out of your host

</p><p><b>date</b> &#8211; prints the current date and time



</p><p><b>cal 1997</b> &#8211; prints the 1997 calendar

</p><p><b>whoami</b> &#8211; prints who is currently logged on to your terminal

</p><p><b>mail</b> &#8211; brings up a simple mail editor

</p><p><b>pwd</b> &#8211; tells you where you are; it prints the full pathname of the current directory

</p><p><b>Unix online manual</b>If you want more details about a particular command, you can check out the Unix main page, which is basically just a manual for Unix. For example, if you want to find out more about <tt>ls</tt>, type

</p>



<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% man ls

</pre>

<p>And you&#8217;ll get:ls(1)

</p>

<pre class="brush: js">NAME

      ls - list contents of directory



SYNOPSIS



      ls [-RadLCxmlnogrtucpFbqisf1AM] [names]



DESCRIPTION



      For each directory argument, ls lists the contents of the directory; for

      each file argument, ls repeats its name and any other information

      requested. The output is sorted alphabetically by default.

</pre>

<p>To quit <tt>man,</tt> type <tt>q.</tt>

</p>

<a name="Permissions"></a><h3> <span class="mw-headline">Permissions</span></h3>



<p>As you travel around your host computer, you&#8217;re going to find there are lots of things you can&#8217;t do. You won&#8217;t have the freedom to move and edit files as you did in your user directory.

</p><p>Remember <tt>ls</tt> from our basic commands? One of this command&#8217;s options (<tt>ls -l</tt>) gives you loads of information about files and directories.

</p><p>Here&#8217;s an example:

</p>

<pre class="brush: js">sutro.hotwired.com[~/unixclass]% ls -l



total 20



drwxrwxr-x    2 pam      staff        512 Dec  5 09:34 one



-rw-rw-r--    1 pam      staff       4233 Dec  5 09:35 one.html



drwxrwxr-x    2 pam      staff        512 Dec  5 09:34 two



-rw-r--r--    1 pam      staff       4233 Dec  5 09:36 two.html

</pre>

<p>Here we have the contents of the directory <tt>unixclass,</tt> which contains two directories (<tt>one</tt> and <tt>two</tt>) and two files (<tt>one.html</tt> and <tt>two.html</tt>). The first column of letters determines who can read, write, or execute your files and directories. (I know it just looks like a bunch of letters, but give me a second and I&#8217;ll explain.)



</p><p>The second list (<tt>pam, pam, pam, pam</tt>) tells who owns the file. In this case, it&#8217;s me.

</p><p>The next column tells which group I was part of when I made these files. To find out what groups you belong to, type <tt>groups</tt> and your name, like this:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% groups pam

 infomgr staff prod edit

</pre>

<p>The fourth column shows the size of the files.

</p><p>The fifth is the date and time the file was last modified; the sixth is the name of the file.

</p>

<a name="What_the_Heck_is_rwx.3F"></a><h4> <span class="mw-headline">What the Heck is rwx?</span></h4>



<p>As I mentioned before, these letters determine who can read, write, or execute your files. They break down like this:

</p><p>For files:

</p><p><tt>r</tt> = read &#8211; you can read the file (<tt>more</tt> or <tt>less</tt> it)

</p><p><tt>w</tt> = write &#8211; you can write to the file (edit it with vi, Emacs, or Pico)

</p><p><tt>x</tt> = execute &#8211; you can execute the file (run a Perl program)



</p><p>For directories:

</p><p><tt>r</tt> = read &#8211; you can read the directory

</p><p><tt>w</tt> = write &#8211; you can create, move, rename, or remove files or directories

</p><p><tt>x</tt> = execute &#8211; you can search the directory

</p><p>Take a look at this <tt>ls -l</tt> example:

</p>

<pre class="brush: js"> drwxrwxr-x    2 pam      staff        512 Dec  5 09:34 one/

 -rw-rw-r--    1 pam      staff       4233 Dec  5 09:35 one.html



</pre>

<p>For every folder and file there are four sets of <tt>rwx.</tt> In the example above, they are easy to spot because they&#8217;re set apart by hyphens. The first set shows your permissions, the second is for a group, the third is for anything else (other), and the fourth is for everyone (all).

</p><p>Now, to make things a little more complicated, each one is referred to by a single letter:

</p>

<pre class="brush: js">you = u

group = g

other = o

all = a

</pre>

<p>To add permissions on a file or directory, you use <tt>+</tt>, and to remove them, you use <tt>-</tt>. Let&#8217;s try it out. We&#8217;ll remove group write privileges for this file:

</p>

<pre class="brush: js"> -rw-rw-r--    1 pam      staff       4233 Dec  5 09:35 one.html



</pre>

<p>To do this, we must also use the <tt>chmod</tt> command to change the access mode of the file.

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% chmod g-w one.html

 sutro.hotwired.com[~/unixclass]% ls -l

 total 19

 -rw-r--r--    1 pam      staff       4233 Dec  5 10:59 one.html

</pre>

<p>To make a program executable for everyone, we&#8217;d do this:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]%ls -l svensprogram.pl

 -rw-rw-r--    1 pam      staff          0 Dec  5 11:02 svensprogram.pl

 sutro.hotwired.com[~/unixclass]% chmod a+x svensprogram.pl

 sutro.hotwired.com[~/unixclass]% ls -l

 total 19

 -rwxrwxr-x    1 pam      staff          0 Dec  5 11:02 svensprogram.pl

</pre>

<p>To change who actually owns a file, use the <tt>chown</tt> command:



</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% ls -l svensprogram.pl

 -rwxrwxr-x    1 pam      staff          0 Dec  5 11:02 svensprogram.p

 sutro.hotwired.com[~/unixclass]% chown sven svensprogram.pl

 sutro.hotwired.com[~/unixclass]% ls -l

 total 19

 -rwxrwxr-x    1 sven     staff          0 Dec  5 11:02 svensprogram.pl

</pre>

<p>To change which group can access the file, use the <tt>chgrp</tt> command:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% ls -l svensprogram.pl

 -rwxrwxr-x    1 sven     staff          0 Dec  5 11:02 svensprogram.pl

 sutro.hotwired.com[~/unixclass]% chgrp infomgr svensprogram.pl

 svensprogram.pl - Not privileged

</pre>

<p>D&#8217;oh! Not privileged. Until you become a powerful Unix god, you will see this message many times. But keep at it, and deityhood may be closer than you think.

</p>

<a name="Text_Editors"></a><h3> <span class="mw-headline">Text Editors</span></h3>



<a name="VI"></a><h4> <span class="mw-headline">VI</span></h4>

<p>The most commonly available text editor is [[Tutorial:Vi Tutorial for Beginners|vi] (pronounced vee-eye), which I especially recommend for Mac users. You really only need to know a few commands to get started.

</p><p>To start vi, simply type <tt>vi</tt> at the command prompt:

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]% vi myfile.html

</pre>

<p>and you&#8217;ll be instantly thrown into this crazy-looking environment with a <tt>~</tt> on every line. Don&#8217;t be afraid. The annoying thing about vi is that you have to tell it when you&#8217;re adding and deleting text. You can&#8217;t simply type and delete, you have to use the following commands:

</p>



<ul><li> To add text &#8211; hit the <tt>esc</tt> key and the letter <tt>i</tt> (for insert)

</li><li> To delete text &#8211; hit the <tt>esc</tt> key and the letter <tt>x</tt> (for delete)

</li><li> To delete an entire line &#8211; hit the <tt>esc</tt> key and the letters <tt>dd</tt>



</li><li> To save your file &#8211; hit the <tt>esc</tt> key and type <tt>:w</tt> and then hit <tt>return</tt>

</li><li> To save and exit vi &#8211; hit the <tt>esc</tt> key and type <tt>:wq</tt> and hit return



</li></ul>

<a name="Emacs"></a><h4> <span class="mw-headline">Emacs</span></h4>

<p>Emacs is the favorite editor of many, but Macintosh users may tell you not to bother because they find it really irritating. PC users will probably offer a different opinion.

</p>

<a name="PICO"></a><h4> <span class="mw-headline">PICO</span></h4>

<p>If you&#8217;re a beginner, pico is probably your best bet. Simply type in

</p>

<pre class="brush: js"> sutro.hotwired.com[~/unixclass]%pico myfile.html

</pre>

<p>and you&#8217;ll be thrown into the editor. All the commands are listed on the top and bottom of the screen. Be sure to save frequently.

</p><div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/02/learn_enough_unix_for_your_resume/feed/</wfw:commentRss>
        <slash:comments>6</slash:comments>

        
    </item>
    
    <item>
        <title>Set Up a Linux Firewall on Your Network</title>
        <link>http://www.webmonkey.com/2010/02/set_up_a_linux_firewall_on_your_network/</link>
        <comments>http://www.webmonkey.com/2010/02/set_up_a_linux_firewall_on_your_network/#comments</comments>
        <pubDate>Tue, 16 Feb 2010 01:45:47 +0000</pubDate>

                <dc:creator>Webmonkey Staff</dc:creator>

        <guid isPermaLink="false">http://stag.wired.com/primate/?p=789</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wiki]]></category>
        <description><![CDATA[Go outside and pop the hood of your car. You should see a thick metal barrier at the back of the engine compartment. This is called the firewall. To see how it works, poke a small hole in the fuel line so that a tiny amount of gasoline starts dripping on the engine block. Now [...]]]></description>

            <content:encoded><![CDATA[<!-- wpautop disabled --><p>Go outside and pop the hood of your car. You should see a thick metal barrier at the back of the engine compartment. This is called the <i>firewall.</i> To see how it works, poke a small hole in the fuel line so that a tiny amount of gasoline starts dripping on the engine block. Now close the hood, start the car, and head out on the highway (Some of you may choose to save life and limb (and time!) by merely visualizing this exercise).

</p><p>If you have positioned the puncture correctly, within a few minutes the escaped gasoline should ignite and cause a small engine fire. At this point you may see smoke emerge from the engine compartment. Continue driving. You should be able to proceed a considerable distance before the heat becomes uncomfortable and toxic fumes and flames start to enter the passenger compartment.

</p><p>The reason you can drive so far with a flaming engine is because the firewall is a highly effective barrier between the engine compartment and the passenger compartment. If your car had no firewall, the engine fire would have already melted the dashboard electronics and plastic, destroyed the upholstery, and toasted you to a crisp.

</p><p>Now. Pull over and very carefully extinguish the fire.

</p><p>A similar principle can be applied to networked computers. Picture your machine as the cozy, tricked-out interior of your automobile, and the outside world as the dirty but powerful engine that makes it go. It won&#8217;t do to have the vulnerable components of your network exposed to the engine&#8217;s maliciously raging heat &#8212; it&#8217;s best to install a firewall.

</p><p>Let us abandon our weakening metaphor here before it carries us into a ping-pong tournament without a paddle. A firewall, in the networking sense, is a machine that straddles the interface between a private network and the Internet at large, and follows predetermined rules for allowing certain traffic to pass, while blocking traffic that&#8217;s unwanted.

</p><p>So, how to get yourself one of those disaster-averting firewalls? You can start by reading on.

</p><span id="more-789"></span><p><br />

</p>



<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> </div>

<ol>

<li><a href="#A_Firewall_for_the_Home">A Firewall for the Home</a>

<ol>

<li><a href="#Sharing_and_Masquerading">Sharing and Masquerading</a></li>

</ol>



</li>

<li><a href="#Tables_and_Chains">Tables and Chains</a></li>

<li><a href="#Set_up_a_Firewall_with_iptables">Set up a Firewall with iptables</a></li>

<li><a href="#Set_up_PMFirewall_with_ipchains">Set up PMFirewall with ipchains</a></li>

</ol>

</td></tr></tbody></table>



<a name="A_Firewall_for_the_Home"></a><h3> <span class="mw-headline">A Firewall for the Home</span></h3>



<p>There are a hundred ways to build a firewall, from turnkey machines (am I the only one who always misreads that word as &#8220;turkey&#8221;?) that you can just plug in and ignore to a vast variety of software packages.

</p><p>The elves who bring us Linux, though, have seen fit to incorporate into the Linux kernel the capacity to filter incoming and outgoing packets. They&#8217;ve also incorporated tools into Linux distributions to manage these packet-filtering capabilities, making it easy to turn a basic Linux box into a firewall. And all for free! Since we&#8217;re now saving up for a new car, we&#8217;ll go the thrifty route and set up our system using inexpensive hardware and gratis software.

</p><p>For purposes of illustration, let&#8217;s imagine that you have a small home network. You have just one broadband line running into the house, and you want to share it amongst all the computers:your big desktop system, your laptop, the entertainment system in the livingroom, your live-in boyfriend&#8217;s laptop, and the iMac that the boyfriend&#8217;s mother, who lives in the basement, uses to surf eBay all day. (Just a temporary arrangement, the boyfriend assures you, until she gets back on her feet and finds a reasonably priced mobile home. Fine, you say, but you both know he owes you big.) Obviously, this is a small-scale example, but the principles can be applied to anything from a single machine to a gigantic network.

</p><p>Or perhaps you want to run a web server and want it to be a bit less crackable. Whatever your setup, you need a firewall.

</p>

<a name="Sharing_and_Masquerading"></a><h4> <span class="mw-headline">Sharing and Masquerading</span></h4>

<p>First, if you want to share one connection among several machines, you can use a gateway masquerading machine for your firewall. As long as traffic is relatively low, it doesn&#8217;t have to be particularly powerful.

</p><p>So exhume that old Pentium 150 from the closet, evict the dust bunnies, stick in US$20 worth of RAM to bring it up to 128 MB, and install a nice new copy of Linux. You will also need two network interface cards &#8212; one to talk to the outside world via the broadband line, and one to talk to the rest of the machines in the house. You split your connection amongst the machines in your house with an Ethernet hub, either the shmancy wireless laptop-on-the-roof kind or the traditional kind that you can trip over.

</p><p>An IP masquerading setup means that, as far as the internet at large is concerned, there&#8217;s only one computer here in your house. It has one IP address. When packets come from the outside world, they are sent to that IP address. Our firewall and masquerading box figures out which of the computers inside the house (each of which has its own internal IP address known only to its LAN-mates) should get that packet.

</p><p>Now you want to configure your firewall. There are a few major versions of the Linux kernel that are in widespread use &#8212; version 2.2, which is older but more tried-and-true, and versions 2.4 and 2.6, which are newer, with more and better features. Typically a Linux distribution that you acquire today will use 2.6, but some distros use older kernel versionss. Somewhat inconveniently for us, the firewalling code has changed significantly between these versions.

</p><p>The Linux <a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptablesl" class="external text" title="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptablesl" rel="nofollow">Firewall How-To</a> and the <a href="http://www.interhack.net/pubs/fwfaq/" class="external text" title="http://www.interhack.net/pubs/fwfaq/" rel="nofollow">Firewall FAQ</a> are indispensable as well.



</p><p>The first step, though, is to make sure your Linux box is reasonably secure in and of itself. The <a href="http://www.linuxtopia.org/Linux_Security_HOWTO/" class="external text" title="http://www.linuxtopia.org/Linux_Security_HOWTO/" rel="nofollow">Linux Security HOWTO</a> is an excellent guide. Basically you want to download any security updates that may exist for the version of Linux that you&#8217;re running, turn off any services you&#8217;re not using (which should mean most services), and generally lock everything down. A firewall that gets broken into is no good at all.

</p>

<a name="Tables_and_Chains"></a><h3> <span class="mw-headline">Tables and Chains</span></h3>

<p>The 2.2 Linux kernel packet-filtering tool is called &#8220;ipchains.&#8221; The updated version that ships with version 2.4 and 2.6 is known as &#8220;iptables.&#8221; (There is an older version still, called &#8220;ipfwadm,&#8221; that works with the 2.0 kernel, but one can&#8217;t live in the past.) All of these tools operate on a very simple principle &#8212; apply sets of rules to control which sorts of traffic are allowed in and out, and which are not.

</p><p>Each workstation in the house knows that the firewall machine is its gateway. When workstation number one sends a packet to the firewall machine, the latter assigns the packet to a particular port number (so as to keep track of where it came from), replaces the IP number in the originating header with its own real-world IP address, and sends the packet out. When it receives a reply to the packet from the outside world, the reply will come to the same TCP/IP port. The firewall machine knows that traffic on that port goes to workstation number one, so it replaces the port number and IP address with their original values and passes the packet on to the workstation. This process is completely transparent to both parties.

</p><p>There are a number of tools that configure ipchains and iptables for you automatically. These easy-to-use tools include <a href="http://www.pointman.org/PMFirewall/" class="external text" title="http://www.pointman.org/PMFirewall/" rel="nofollow">PMFirewall</a> and <a href="http://users.dhp.com/%7Ewhisper/mason/" class="external text" title="http://users.dhp.com/~whisper/mason/" rel="nofollow">Mason</a>. PMFirewall involves making choices about the configuration you desire. Mason has a &#8220;learning mode&#8221; that simply looks at how you use your network and sets up firewalling rules automatically to accommodate you. Download and install one of these tools, and configuring your firewall is approximately as easy as pie.

</p>



<a name="Set_up_a_Firewall_with_iptables"></a><h3> <span class="mw-headline">Set up a Firewall with iptables</span></h3>

<p><i>This section needs expanding. Please log in and edit it.</i>

</p><p><br />

</p>

<a name="Set_up_PMFirewall_with_ipchains"></a><h3> <span class="mw-headline">Set up PMFirewall with ipchains</span></h3>

<p>Just for fun, let&#8217;s go over how to set up a firewall with PMFirewall. The installation of Mason is similar, but Mason takes care of detecting your network setup automatically. First, you have to make sure that you have ipchains installed. It should come with your Linux distribution. If you can&#8217;t find it on your system (and you&#8217;re running the 2.2 kernel), check the CDs or DVDs you installed from. If it&#8217;s not there either, it can be downloaded from <a href="http://netfilter.samba.org/ipchains/" class="external text" title="http://netfilter.samba.org/ipchains/" rel="nofollow">here</a>. You&#8217;ll also want to make sure your kernel is configured to work with ipchains. Chances are that it is &#8230; if you get a message that it&#8217;s not, the <a href="http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html" class="external text" title="http://www.linuxdoc.org/HOWTO/IPCHAINS-HOWTO.html" rel="nofollow">ipchains HOWTO</a> will tell you how to check, and how to fix your configuration if you have to.

</p><p>Download the zipped PMFirewall from the creator&#8217;s <a href="http://www.pointman.org/PMFirewall/#download" class="external text" title="http://www.pointman.org/PMFirewall/#download" rel="nofollow">site</a> and save it wherever you like to save such things on your system. Unpack the file by typing



</p>

 <pre class="brush: js">tar -xzvf ./pmfirewall-x.x.x.tar.gz</pre>

<p>where x.x.x is the version number. Then cd to the pmfirewall directory thus created, and, as the root user, type

</p>

 <pre class="brush: js">sh install.sh</pre>

<p>The installation process will prompt you for answers to some preliminary questions &#8211; where do you want config files installed, where does your copy of ipchains live, how are you connected to the Internet &#8211; for which the default answers should typically suffice. Then it will ask about how you want the firewall set up. Are there machines that you want to give unquestioned access to? Are there machines that you want to prohibit unilaterally? You will be asked to enter their IP addresses.

</p><p>You also have to tell PMFirewall whether you have a static IP address or whether you&#8217;re given a new one every time you log on, via DHCP. Then it asks what services you are running on the firewall machine:FTP? SSH? Telnet? SMTP? DNS? POP? a Web server? IMAP? and so forth. And are there any other ports that you want left open?

</p><p>Finally, you are asked to configure masquerading, supply information about your internal network, and specify startup behavior. Voila! PMFirewall has configured your firewall automatically. You can proceed to tweak the settings manually if you want or need to.

</p><p>When your firewall is set up, you can test it by going to the <a href="http://crypto.yashy.com/nmap.php" class="external text" title="http://crypto.yashy.com/nmap.php" rel="nofollow">Self Port Scan</a>, which will check your machine for open ports. Try accessing the page from your firewall machine with the firewall turned off and then with it turned on. The difference should be striking &#8230; like, say, the difference between slightly elevated temperatures and third-degree burns all over your body.

</p><div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/02/set_up_a_linux_firewall_on_your_network/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    </channel>
</rss>
