<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>spire.io</title>
  <link href="http://www.spire.io/atom.xml" rel="self" />
  <link href="http://www.spire.io/posts/" />
  <updated>2012-05-18T00:00:00.000Z</updated>
  <author>
    <name>spire.io</name>
  </author>
  <id>http://spire.io/</id>
            <entry>
        <title>Weekend Reader: May 18, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-19.html"/>
        <updated>2012-05-18T00:00:0.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-19.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though, so get ready to fire up your Instapaper... &lt;/p&gt;  &lt;h3&gt;Facebook&lt;/h3&gt; &lt;p&gt;Chances are you&apos;ve already seen about a hundred Facebook IPO posts today, and maybe even got some of the details from &lt;a href="https://twitter.com/#!/ZuckHood"&gt;one&lt;/a&gt; of the &lt;a href="https://twitter.com/#!/zuckerbergsHood"&gt;multiple&lt;/a&gt; Twitter accounts Mark Zuckerberg&apos;s hoodie is operating right now, so we&apos;ll keep it brief. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The shares rose 23 cents above the IPO price of $38 as of 4 p.m. in New York. Facebook sold 421.2 million shares to raise $16 billion yesterday, giving the company a $104.2 billion market value. &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;-&lt;a href="http://www.bloomberg.com/news/2012-05-17/facebook-raises-16-billion-in-biggest-technology-ipo-on-record.html"&gt;Bloomberg&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Don&apos;t Track Me, Bro&lt;/h3&gt; &lt;p&gt;In less monetarily exciting social news, &lt;a href="http://bits.blogs.nytimes.com/2012/05/17/twitter-implements-do-not-track-privacy-option/"&gt;Twitter announced that they will be supporting the Do Not Track feature&lt;/a&gt; in Mozilla&apos;s Firefox browser.&lt;/p&gt;  &lt;h3&gt;Taco Conf&lt;/h3&gt; &lt;p&gt;We &lt;a href="http://www.spire.io/posts/tacohouse.html"&gt;had a great time&lt;/a&gt; at Taco Conf last weekend. &lt;a href="http://www.mikealrogers.com/posts/tacos-on-parade.html"&gt;So did Mikeal Rogers.&lt;/a&gt; We have to say that we didn&apos;t mind the air conditioning on Sunday at all though.&lt;/p&gt;  &lt;h3&gt;Teaching the User How to Learn&lt;/h3&gt; &lt;p&gt;Rands on how designing applications should be &lt;a href="http://www.randsinrepose.com/archives/2012/05/09/two_universes.html"&gt;a little more like game design&lt;/a&gt; (Using Portal as an example, of course.)&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; That’s how I want to learn. Don’t give me a book; I don’t want a lecture, and I don’t want a list of topics to memorize. Give me ample reason to memorize them and a sandbox where I can safely play. Test me when I least expect it, shock me with the unknown, but make sure you’ve given me enough understanding and practice with my tools that I have a high chance of handling the unexpected.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Miscellany&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.topsecretusb.com/top-secret-custom-made"&gt;Wax seals and USB drives:&lt;/a&gt;  The idea leaves a lot to be desired security-wise, which Bruce Schneier&apos;s commenters have &lt;a href="http://www.schneier.com/blog/archives/2012/05/usb_drives_and.html#c760331"&gt;no problem pointing out.&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://kottke.org/12/05/how-pixar-almost-deleted-toy-story-2"&gt;How Pixar Almost Deleted Toy Story 2:&lt;/a&gt; By the point where the narrator says about a year of work was erased in twenty seconds we were all feeling a little ill. &lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Collaborative Conferences: Farmhouse Conf and Taco Conf</title>
        <link href="http://spire.io/posts/tacohouse.html"/>
        <updated>2012-05-18T00:00:00.000Z</updated>
        <id>http://spire.io/posts/tacohouse.html</id>
        <content type="html">
          &lt;p&gt;&lt;img src="/images/warehouse.jpg" alt="warehouse" title="Taco Confers at the warehouse, day 1"&gt;&lt;/p&gt;  &lt;p&gt;&quot;Huh, Taco Conf?&quot; I thought as I watched &lt;a href="http://www.twitter.com/mikeal"&gt;Mikeal&lt;/a&gt; and &lt;a href="http://www.twitter.com/maxogden"&gt;Max&lt;/a&gt; talk about a conference that revolved around riding bikes to taco stands. &quot;That looks fun, but there&apos;s no way I can take that to our CEO.&quot; I believe this happened around the end of February. I had just started my new position at spire.io in January, and I really didn&apos;t want to seem like some kid who was going to be throwing money at something so he could ride around The Bay for a weekend. To my surprise, Diego (our CEO) leaned over my cubicle and asked me if I&apos;d messaged Mikeal about sponsoring Taco Conf.&lt;/p&gt;  &lt;p&gt;He got it immediately. Some of our most productive times at spire.io have been over a taco lunch or dinner as we talked about work, or anything really. When you collect a group of people who are all working on something, chances are that no conversation will be completely irrelevant to their project. Analogies tend to circle back to programming or the project at hand. People talk about other projects they&apos;re excited about - What they like. What they don&apos;t - and in the process, the rest of the party comes to take away at least a small lesson or shift their perspective to some minor degree. And isn&apos;t that what a conference is supposed to do, really? So why aren&apos;t conferences more like taco lunches?&lt;/p&gt;  &lt;p&gt;We had been sponsoring, hosting, and participating in all sorts of events before, but Diego&apos;s go-ahead there really drove home the notion that we shouldn&apos;t be afraid to experiment and get involved in anything that seemed interesting. As I explained to a Farmhouse presenter who asked why I had attended, &quot;It&apos;s never a bad idea to listen to smart people talk about what&apos;s exciting to them. Even if you have no knowledge of the subject matter and don&apos;t understand everything they&apos;re talking about, at the very least you&apos;ll get a sense of how they&apos;re thinking about the world and tackling problems.&quot; That logic is why I ended up attending &lt;a href="http://farmhouse.la/2012"&gt;Farmhouse Conf&lt;/a&gt; and &lt;a href="http://tacoconf.com/"&gt;Taco Conf&lt;/a&gt; in back-to-back weekends.&lt;/p&gt;  &lt;p&gt;Together, they&apos;ve helped me identify some of my favorite conference experiences and showed me why some could have been better. I definitely plan on trying to bring some of their successes into our own events, and think I&apos;ll probably end up looking back on the last two weekends as setting a new standard for developing the feeling of an open community over the course of an event.&lt;/p&gt;  &lt;p&gt;This is what I thought made them successful:&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;Talks from people of different backgrounds/areas of expertise&lt;/li&gt;&lt;li&gt;Attendees from different backgrounds&lt;/li&gt;&lt;li&gt;Time for attendees to talk&lt;/li&gt;&lt;li&gt;High comfort levels between attendees &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;My explanation to the Farmhouse presenter is still true; the talks are valuable, but it didn&apos;t leave any room for the time in between when the audience gets together to talk about, analyze, and make sense of them. Giving experts time to talk about their work is obviously a good idea, but if the point is to take away knowledge and have truly learned something from it all, the audience needs time to chew it over and work with the material in order to internalize it. Ideally, they will have the chance to talk to someone with different experiences or perspectives. Nobody edits their opinion when they are agreeing completely with someone else, they do it when they are challenged or when they hear another idea that they like and try to incorporate it with their own. As an organizer this seems like a tricky thing to pull off and I&apos;ll probably be struggling with it for a while, but at least I&apos;ve learned not to be afraid to throw in a few speakers that seem to come from out of left field.&lt;/p&gt;  &lt;p&gt;&lt;img src="/images/tara-at-farmhouse.jpg" alt="Tara" title="Tara presenting at under the avocado tree"&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="/images/taco-circle.jpg" alt="Circle" title="Discussions"&gt;
(Photos by &lt;a href="http://twitter.com/jlsuttles"&gt;@jlsuttles&lt;/a&gt; and &lt;a href="http://twitter.com/maxogden"&gt;@maxogden&lt;/a&gt;) &lt;/p&gt;  &lt;p&gt;Both Farmhouse and Taco Conf were successful because of the time they allowed attendees to congregate between talks and presented opportunities for becoming comfortable with one another. One of the things that impressed me most about Farmhouse Conf was that &lt;a href="http://twitter.com/veganstraightedge"&gt;Shane&lt;/a&gt; seemed to understand that it was the conversations and the people in his backyard that were making that particular Saturday special, and he quickly adapted the conference to support that. He started expanding the time between talks and decided to borrow some time from lightning talks.&lt;/p&gt;  &lt;p&gt;Then there was the fact that everyone watched the same talks. Some conferences have five rooms going at any time with overlapping talks, forcing people to pick and choose talks. If you&apos;ve been to a conference before, chances are you&apos;ve had the experience of disappointment when you saw the two most interesting talks slated for the same time. The talks are obviously the most important thing in this event structure. Attendees carry around marked up programs and hurry from one auditorium another. When there&apos;s nothing that interesting going on, many conference goers skip the talks altogether and mess around on their laptops.&lt;/p&gt;  &lt;p&gt;All the emphasis is on the various talks and it creates a fragmented experience. When you do get around to meeting people, most of the time is wasted on summary. &quot;I saw talks A, B, and C. They were about this, that, and the other.&quot; The listener is heavily dependent on what the speaker found important and whatever bit of analysis he or she works into his or her summary. The conversation doesn&apos;t really have much room to grow from there. However, when everyone has seen the same talk, they can launch directly into analysis.&lt;/p&gt;  &lt;p&gt;For example, I had a very different take on the tone of &lt;a href="http://farmhouse.la/2012/talks/the-map-versus-the-territory"&gt;Brian&apos;s talk&lt;/a&gt; at Farmhouse and &lt;a href="http://www.twitter.com/jxson"&gt;Jason&lt;/a&gt; was able to persuade me that I was wrong by pointing directly to some of his statements. I don&apos;t think that would have happened had I been summarizing; it&apos;s hard to politely disagree about something as subjective as tone if you weren&apos;t there. It&apos;s a bit counter-intuitive, but by directing all the attention on the same talks the organizers actually take a good part of the burden of being interesting off the speakers and put it on the audience.&lt;/p&gt;  &lt;p&gt;All of the talks and the conversations, the bike riding and the hacky sacking, created the distinction between going to a conference and being a part of one. Every person who was there contributed to wealth of knowledge being shared and impacted the direction of the conference in some way. That&apos;s something special that we should aim for in every event. Thank you to all the organizers and everyone who came out to both conferences!&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: May 11, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-18.html"/>
        <updated>2012-05-11T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-18.html</id>
        <content type="html">
          &lt;p&gt;The last week was pretty busy for us. Those who went to &lt;a href="http://farmhouse.la/2012"&gt;Farmhouse Conf&lt;/a&gt; were getting readjusted to normal life, and everyone was putting the finishing touches on our Identity service for our &lt;a href="http://techcrunch.com/2012/05/09/spire-io-a-new-platform-for-serverless-apps-that-work-on-web-mobile/"&gt;release on Wednesday.&lt;/a&gt; Still, we managed to get some reading done and throw some links around on IRC. &lt;/p&gt;  &lt;h2&gt;Functional Programming&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/"&gt;Functional Programming in C++&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; My pragmatic summary:  A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in.  In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention.  Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible.  &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;-John Carmack&lt;/p&gt;  &lt;p&gt;(via &lt;a href="http://log.scifihifi.com/post/22283567462/my-pragmatic-summary-a-large-fraction-of-the"&gt;Buzz Anderson&lt;/a&gt;)&lt;/p&gt;  &lt;h2&gt;Essential Complexity&lt;/h2&gt; &lt;p&gt;&lt;a href="http://sandofsky.com/blog/shell-apps.html"&gt;Shell Apps and Silver Bullets&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Sometimes the quest for a silver bullet comes from a good place. Technology is about removing mindless work. Great engineers go through a phase where they try to create the ultimate framework to remove their daily grind, only to realize it’s more work to maintain a gigantic framework.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; The difference is shell apps come from the wrong mentality. They start from, “How do we reduce effort?” instead of “How do we deliver the best product?”&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;-Benjamin Sandofsky&lt;/p&gt;  &lt;h2&gt;DuckDuckHack&lt;/h2&gt; &lt;p&gt;DuckDuckGo announced an &lt;a href="http://www.gabrielweinberg.com/blog/2012/05/introducing-duckduckhack.html"&gt;&quot;open source platform to create instant answer plugins&quot;&lt;/a&gt; for their  search engine. If you haven&apos;t noticed the instant answers feature before, &lt;a href="https://duckduckgo.com/?q=random+number"&gt;&quot;random number&quot;&lt;/a&gt; is a good example of how they can be useful. &lt;/p&gt;  &lt;h2&gt;What is a Technology Company?&lt;/h2&gt; &lt;p&gt;A reminder from Alex Payne to re-evaluate &lt;a href="http://al3x.net/2012/05/08/what-is-and-is-not-a-technology-company.html"&gt;what we mean when we talk about tech startups.&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; You are a technology company if you are in the business of selling technology. That is to say, if your product – the thing you make money by selling – consists of applied scientific knowledge that solves concrete problems and enables other endeavors, you are a technology company.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; By this definition, most of the companies that dominate the “tech blogs” are not technology companies. They’re just, well, companies. These businesses might use technology, or develop technology, or even be run by people who used to work at technology companies, but they don’t exist to create and sell technology.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Legal&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.sparkfun.com/news/836"&gt;Sparkfun Gets a Subpeona&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Please know that subpoenas are very serious, but they are not set in stone. The law enforcement agency was simply trying to do their job and worked with us to limit the scope while getting the information that they needed. I hope you are never served a subpoena but if you are sent one, don&apos;t be caught flat footed. Please let this homepage post serve as a reason to raise your hand and ask more questions.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://www.aclu.org/blog/technology-and-liberty-national-security-free-speech/breaking-news-twitter-stands-one-its-users
"&gt;Twitter Stands Up For One of Its Users&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Indeed, even though Twitter provided notice to the Twitter user in this particular case, and even though he was able to get an attorney to file a motion seeking to quash the subpoena, the court found that the Twitter user did not have legal “standing” to challenge the D.A.’s subpoena.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; If Internet users cannot protect their own constitutional rights, the only hope is that Internet companies do so. &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(via &lt;a href="http://brooksreview.net/"&gt;Ben Brooks&lt;/a&gt;)&lt;/p&gt;  &lt;h2&gt;Security&lt;/h2&gt; &lt;blockquote&gt;&lt;p&gt; With the latest Lion security update, Mac OS X 10.7.3, Apple has accidentally turned on a debug log file outside of the encrypted area that stores the user’s password in clear text.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://www.zdnet.com/blog/security/apple-security-blunder-exposes-lion-login-passwords-in-clear-text/11963"&gt;-ZDNet&lt;/a&gt; (via &lt;a href="http://brooksreview.net/"&gt;Ben Brooks&lt;/a&gt;)&lt;/p&gt;  &lt;h2&gt;Cat Feeders&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.codinghorror.com/blog/2012/05/this-is-all-your-app-is-a-collection-of-tiny-details.html"&gt;This Is All Your App Is: a Collection of Tiny Details&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Fair warning: this is a blog post about automated cat feeders. Sort of. But bear with me, because I&apos;m also trying to make a point about software.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;There is a certain kind of person who gravitates to posts about cat feeders and cereal as windows into software design. We just so happen to have one working here. His name is Thomas and he somehow ended up with the authority to edit and post our Weekend Reader. He says &lt;a href="http://marco.org"&gt;Marco Arment&lt;/a&gt; does some good work in this area too. &lt;/p&gt;  &lt;h2&gt;Miscellany&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.ibiblio.org/harris/500milemail.html"&gt;The case of the 500 mile email&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; I was working in a job running the campus email system some years ago when
 I got a call from the chairman of the statistics department.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; &quot;We&apos;re having a problem sending email out of the department.&quot;&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; &quot;What&apos;s the problem?&quot; I asked.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; &quot;We can&apos;t send mail more than 500 miles,&quot; the chairman explained.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; I choked on my latte. &quot;Come again?&quot;&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; &quot;We can&apos;t send mail farther than 500 miles from here,&quot; he repeated. &quot;A
 little bit more, actually. Call it 520 miles. But no farther.&quot;&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(via &lt;a href="http://kottke.org"&gt;Kottke&lt;/a&gt;)&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Creating a Serverless App</title>
        <link href="http://spire.io/posts/creating-serverless-apps.html"/>
        <updated>2012-05-08T00:00:00.000Z</updated>
        <id>http://spire.io/posts/creating-serverless-apps.html</id>
        <content type="html">
          &lt;img class="what-we-do-image" src="/images/to-do-list.png"&gt;
 &lt;h2&gt;Why Serverless?&lt;/h2&gt; &lt;p&gt;First off, there are still servers involved in a &apos;serverless&apos; application; the key difference is they are servers that are NOT maintained by the application developer.&lt;/p&gt;  &lt;p&gt;So why would you want to have servers maintained by someone else?  There are many reasons, but most of them boil down to the basic premise that setting up and maintaining servers for an app takes a disproportionate amount of time compared to the value they add.  What makes an app successful or not is determined by the quality of the app itself, not by the management of a set of servers.  Managing servers is simply a necessary evil in order to have a distributed application.&lt;/p&gt;  &lt;p&gt;When a developer is creating a new web application, the best use of time is in creating the application itself.  The application is what will determine the success or failure of the venture; the server&apos;s only requirement is to make sure end-users are actually able to use the application.  The server&apos;s value is binary; it either works and allows the application to be judged on its merits, or it doesn&apos;t work (or works too slowly) and the application can&apos;t be fairly evaluated.&lt;/p&gt;  &lt;p&gt;The second reason an application developer would want to have their app servers maintained by someone else is scalability.  When an application is first being developed and tested, spending time on scalability is a waste of time that should be spent developing the app itself.  On the other hand, if an application does become successful, it is often a scramble to redesign an app to be properly scalable. During this time, all of the new users flocking to the app will be unable to use it while the servers are overloaded.&lt;/p&gt;  &lt;p&gt;When the servers are maintained by a (competent) third party, however, this is not a problem.  The servers are already built to be scalable; with no extra work, an application developer will have scalability from inception through success and rapid growth.&lt;/p&gt;  &lt;h2&gt;Why is security so hard in a serverless environment?&lt;/h2&gt; &lt;p&gt;None of the reasons listed above for why an application developer should want to give up maintaining their own servers are particularly groundbreaking or that profound; developers have been aware of these advantages for a while, and a number of services have sprung up to address this market.  These API services aim to provide the functionality that would normally require an app developer to have their own server.&lt;/p&gt;  &lt;p&gt;However, security is a very difficult problem to solve for these services.  While it might not seem obvious at first glance, the root of the security problem is actually quite simple to explain.  It boils down to the inability to grant a user of the application limited access to resources.&lt;/p&gt;  &lt;p&gt;Take, for example, a simple chat application.  I chose chat as my example because many of the API services use it as their canonical example (such as &lt;a href="http://www.pubnub.com/tutorial/developer-intro-tutorial"&gt;PubNub&apos;s&lt;/a&gt; and &lt;a href="http://www.firebase.com/tutorial/"&gt;Firebase&apos;s&lt;/a&gt;) for a serverless application.&lt;/p&gt;  &lt;p&gt;While the implementation varies slightly for each provider, the basic process is to use a simple javascript library the service provides and then use your application key in your own javascript code to enable the end-user to interact with the API.&lt;/p&gt;  &lt;p&gt;The limitation of this model is readily apparent; since every visitor to the site receives the same application key when they download the javascript file, there is no way to distinguish users on the site; everyone has the same credentials.    This has a number of consequences; it is impossible to identify who is initiating a message, there is no way to only send messages to specific users, and there is no way for a returning visitor to be able to have ownership of messages they sent previously.  Even if the chat provides a way to set a name that will be displayed next to the messages, there is no way to verify that chat user &apos;TrustedGuy&apos; who sent one message is the same as the &apos;TrustedGuy&apos; you talked to yesterday.&lt;/p&gt;  &lt;p&gt;The end result of these limitations is that all of these serverless application examples skirt the issue of security by granting the same, restricted, access to everyone.  This works fine, as long as the only application you want to make is an anonymous chat room.&lt;/p&gt;  &lt;h2&gt;So how can you overcome this problem?&lt;/h2&gt; &lt;p&gt;The reason the existing API services only provide for this sort of anonymous messaging is that they do not provide for any authentication service besides the global API key.  There is no way for a visitor to the application to authenticate beyond proving that they have access to use the application&apos;s messaging service.&lt;/p&gt;  &lt;p&gt;Spire.io overcomes this limitation by providing a way for the visitors to an application to register with it.  When that visitor returns to the application at a later time, they can re-authenticate and maintain their same identity on subsequent visits.&lt;/p&gt;  &lt;h2&gt;How does persistent identity help with security?&lt;/h2&gt; &lt;p&gt;Authentication alone is not enough to allow for the kind of persistent identity that was described above.  The authentication process has to somehow enable access to the correct set of resources.&lt;/p&gt;  &lt;p&gt;This is not a trivial thing to do for a general purpose authentication API; what an authenticated user has access to will vary by application.&lt;/p&gt;  &lt;p&gt;Spire.io boasts two features that allow an application to control access to various resources in whatever way works for the application in question.  The first feature is spire&apos;s use of &lt;a href="http://www.spire.io/posts/web-capabilities.html"&gt;capabilities&lt;/a&gt;.  A capability can be thought of as a key for a specific action on a specific resource; for example, anyone who has a channel&apos;s URL and its &apos;publish&apos; capability can publish to that channel.  This means that giving access to any resource is as simple as giving someone the URL and the appropriate capability(s) for the action(s) that we are giving access for.&lt;/p&gt;  &lt;p&gt;The second part of the solution is the idea of a &apos;profile&apos; that each authenticated user has.  This profile is simply a JSON object that is returned whenever a user authenticates with an application.  Applications can set a &apos;default&apos; profile, a starting JSON object that is copied to a user&apos;s profile when that user first registers with the application.  Each authenticated user can also update their own profile, overwriting or adding to the JSON object.  Since an application user can only update their own profile, and only store data that they already have access to, the profile provides a secure way for data to be persisted.&lt;/p&gt;  &lt;p&gt;Using these two features together, an application can decide what resources to give access to for new users by default, and can store the access information for other resources in a user&apos;s profile at a later point, and be assured they will retain access to that resource even if they log out and log in on another computer.&lt;/p&gt;  &lt;h2&gt;How would an example application utilize these features?&lt;/h2&gt; &lt;p&gt;&lt;a href="/examples/chat/"&gt;See this example in action!&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Since a chat application is the canonical example used by so many API services, we will use that example; however, we are going to add a secure, private, messaging component as well.&lt;/p&gt;  &lt;p&gt;After creating an account and application with spire, the next step is to create the default channel that we will give everyone access to; in our example, we will have one main chat channel and one subscription to that channel.  We then need to set the default profile to include the URLs and capabilities for our newly created channel and subscription.  We will also need the default profile to include the URL and capability that will allow new channels to be created (to provide for private communication).  The default profile for our application would therefore look something like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  main_channel: {
    url: &quot;https://api.spire.io/account/Ac-hAoBuSM/channel/Ch-hBwE/&quot;,
    capabilities: {
      publish: &quot;gMI6QCFpd1IfHFPXWb5iwEg&quot;
    }
  },
  main_subscription: {
    url: &quot;https://api.spire.io/account/Ac-hAoBuSM/subscription/Su-oCwE/&quot;,
    capabilities: {
      events: &quot;FTG32k3CfJRpIHuX8NSPiA&quot;
    }
  },
  create_channel: {
    url: &quot;https://api.spire.io/account/Ac-hAoBuSM/application/Ap-uKoPuSM/channels&quot;,
    capabilities: {
      create: &quot;5ZHwxx4ludf0DtMRDoqaqQ&quot;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Now, whenever someone registers with our application, they will immediately have access to a main channel they can publish messages to and a subscription they can listen for messages on.  They also will have the ability to create new channels.&lt;/p&gt;  &lt;p&gt;In our client code, the only identifying information we need to include is the application key.  The client will send this key to spire.io, and spire will return enough information to the client to allow it to either register a new user or authenticate for an existing user.&lt;/p&gt;  &lt;p&gt;After registering as a new user, spire.io will return the newly created user resource, which will include the default profile.  Using the create_channel information in that profile, the client will create a new channel; this channel will be for private messages to the newly registered user.  The client will also want to create a subscription for this new channel and start listening for messages, at the same time also adding the URL and capability information for the newly created channel to the user&apos;s profile (so as to retain access when we log in again).&lt;/p&gt;  &lt;p&gt;Now, whenever the client posts a new message to the main chat channel, the posting user can include the information required to respond securely and privately to the posting user.  For example, the posted message might have a JSON body that looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  message: &quot;Hey guys, this chat is cool!  Message me if you want to talk&quot;,
  private_channel: {
    url: &quot;https://api.spire.io/account/Ac-hAoBuSM/channel/Ch-z1Ih/&quot;,
    capabilities: {
      publish: &quot;jIJMixcc6Rzx33JGYPL9oA&quot;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;With that information, other listening clients will have everything they need to display the message and also post a private response to the messaging user&apos;s private channel.  That user will either receive the private reply immediately, or it can be store and retrieved later when the user logs in again.  With no independent server code, we have implemented a public chatroom that has persistent, private, and secure messaging capabilities.&lt;/p&gt;  &lt;p&gt;Using resource capabilities along with user profiles, the possibilities for secure, serverless applications are limitless.  The application has complete control over who gets access to what, and those decisions can persist through subsequent authentications.  What will you build?&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Hello, (Serverless) World</title>
        <link href="http://spire.io/posts/hello-serverless-world.html"/>
        <updated>2012-05-07T00:00:00.000Z</updated>
        <id>http://spire.io/posts/hello-serverless-world.html</id>
        <content type="html">
          &lt;h3&gt;Riddle Me This...&lt;/h3&gt; &lt;p&gt;What do Instagram, World of Warcraft, and Facebook Chat all have in common?&lt;/p&gt;  &lt;p&gt;Surprisingly, the answer to this question is causing a profound shift in software development, a shift towards serverless applications.&lt;/p&gt;  &lt;p&gt;Whether you are sharing Lomo-fi&apos;d pictures of your kitten, trolling Azeroth, or chatting it up at work, behind the scenes all these products rely on a &quot;real-time messaging&quot; engine. Normally when talking about real time, we often think about chat rooms or IMs, but it is the same technology underneath. Bits of information need to be moved quickly and reliably.&lt;/p&gt;  &lt;p&gt;This example illustrates one of the core pillars of software development today: many different types of applications are powered by the same underlying technology (or &quot;back-end&quot;). Games, chat rooms, productivity tools, social networks and more – all these share the same back-end functionality in one way or another. What makes them different is what these common building blocks are shaped into.&lt;/p&gt;  &lt;p&gt;But Real-time messaging is just ONE component service.&lt;/p&gt;  &lt;p&gt;Even though many of the components are similar, almost all developers write them from scratch with each new project. These components are not core to one&apos;s product. When we remove these &quot;distractions&quot; people can focus and build something better and faster. More products, better products, more opportunities.&lt;/p&gt;  &lt;p&gt;How do we remove these distractions?&lt;/p&gt;  &lt;h3&gt;Enter The Cloud&lt;/h3&gt; &lt;p&gt;With the rise of cloud computing it is now possible to confidently off-load some of the costs and technical burdens in creating a software application. The most common example can be found in &quot;Infrastructure-as-a-Service&quot; (IaaS) providers such as Amazon, Joyent, and Rackspace, who essentially &quot;rent&quot; physical infrastructure. Now companies are asking themselves, &quot;Why buy a mountain of hardware that will become obsolete in a year, when I can rent the latest and the greatest only when I need it and not a moment sooner?&quot; And that is why IaaS market is making billions in just a few years.&lt;/p&gt;  &lt;p&gt;And with the new Platform-as-a-Service (PaaS) market, companies will ask themselves, &quot;Why spend resources building out back-end functionality that already exists, when I can get that same back-end technology at a fraction of the cost and time?&quot;&lt;/p&gt;  &lt;p&gt;This is the world of serverless applications.&lt;/p&gt;  &lt;h3&gt;Build Upwards&lt;/h3&gt; &lt;p&gt;The idea is refreshingly simple: spend time on features, not infrastructure. The reality is that the end-user doesn&apos;t care about logistics, they only care about the finished product and service. How it happens is not important. There were World of Warcrafts and Instagrams and Facebooks before, but they all lacked a compelling experience and package. Now entrepreneurs and developers can spend resources focusing on creating something truly captivating. &lt;/p&gt;  &lt;p&gt;This is where Spire.io comes in.&lt;/p&gt;  &lt;p&gt;With serverless applications like Spire.io there are no complicated servers or infrastructure to fight with. They are all hosted, maintained, and scaled by Spire.io. Because we focus on back-end services we can provide customers with excellent quality and performance. Spire.io provides back-end solutions at a fraction of the price, delivered in a fraction of the time.&lt;/p&gt;  &lt;p&gt;How does Spire.io provide these back-end solutions? How do we make sure a developer can drop a feature like real-time communication into their product? The answer is APIs (Application Programming Interface).&lt;/p&gt;  &lt;p&gt;The Spire.io APIs are designed to be dropped into any project (whether the project is written in JavaScript, Ruby, or other languages). A few lines of code are provided where the developer can just &quot;hook&quot; into the service. All a developer needs to do is hook up the wiring and they have a professional grade back-end. Spire.io manages the performance and status of the system, allowing the developer to focus on building the features.&lt;/p&gt;  &lt;p&gt;Whether it is an Instagram, a World of Warcraft, or a Facebook Chat, Spire.io makes it possible.&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: May 4, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-17.html"/>
        <updated>2012-05-4T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-17.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though, so get ready to fire up your Instapaper...  &lt;/p&gt;  &lt;h2&gt;Our Architecture&lt;/h2&gt; &lt;p&gt;Our CTO Dan Yoder wrote a post &lt;a href="http://www.spire.io/posts/our-architecture.html"&gt;detailing the architecture behind spire.io&lt;/a&gt; and why we chose each component. We were very pleased with its reception. The Hacker News community had some &lt;a href="http://news.ycombinator.com/item?id=3924639"&gt;particularly good questions.&lt;/a&gt; Between Dan&apos;s post and the &lt;a href="http://news.ycombinator.com/item?id=3925212"&gt;team&apos;s&lt;/a&gt; &lt;a href="http://news.ycombinator.com/item?id=3925213"&gt;responses&lt;/a&gt;, you&apos;ll end up with a good picture of what makes spire.io tick. &lt;/p&gt;  &lt;h2&gt;The Business of APIs&lt;/h2&gt; &lt;p&gt;It&apos;s been a busy week for Dan, he &lt;a href="http://betakit.com/2012/04/28/startups-in-the-business-of-apis"&gt;also made an appearance in BetaKit&apos;s article&lt;/a&gt; on the trend of businesses relying more and more heavily on APIs, and the companies that have risen up  to support them.   &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;“Each generation of APIs commoditizes an entire class of application features, raising the bar for everyone building new applications.”&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;The Largest Computer&lt;/h2&gt; &lt;p&gt;&lt;a href="http://twitter.com/#!/pasternack"&gt;Alex Pasternack&lt;/a&gt; at Mother Board takes us &lt;a href="http://motherboard.vice.com/2011/6/20/the-largest-computer"&gt;back in time to look at the SAGE project.&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The machine’s specs included a number of innovations: approximately 24 68K magnetic-core memories, which worked faster and held more data than earlier technologies, and rivaled the RAM of the first personal computers; the first real-time operating system, with overlapping computing and I/O operations, capable of processing about 75,000 instructions per second; real-time transmission of data over telephone lines; the first use of CRT terminals and light pens; and redundancy and backup methods and components, which led to the highest reliability of computer systems of the day. Though the tubes were unreliable, the use of two computers at each site, with one processor kept on “hot standby” at all times, gave the system a remarkably high overall uptime, with around 99% availability, which is on par with Amazon’s EC2 servers today.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; It was also a giant: with 55,000 vacuum tubes, weighing 275 tons, occupying half an acre of floor space, and using up to three megawatts of power (each came with its own generating and air conditioning plant), the AN/FSQ-7 remains the largest computer ever constructed. &lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Do Androids Dream of Ironic Tees?&lt;/h2&gt; &lt;p&gt;Babak Radboy shows us what happens when &lt;a href="http://dismagazine.com/dystopia/evolved-lifestyles/27226/spam-erican-apparel/"&gt;spam meets art at Zazzle&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; There is an entirely different order of product being developed here, far beyond the outer reaches of irony. I first started seeing them in Google Image searches; the most random queries were returning pictures of t-shirts, trucker hats, and especially ties that were truly uncanny. One could not, by looking at them, decipher how they had come about, what possible thought process lay behind them, who they were for, or why anyone would want them. They had something akin to the lost-in-translation weirdness of Chinese Shanzhai culture, but what was being lost was in a language far more distant than Chinese; one got the impression the “designers” of these pieces were speaking strictly in ones and zeros. I had visions of design-bots, data mining for user patterns, instantaneously designing products based on trending search queries, generating t-shirts like predictive text and graphics through some kind of visual auto-tune. Amazingly, it turns out I am not totally wrong.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Nothing&apos;s Gonna Stop Me Now&lt;/h2&gt; &lt;p&gt;&lt;a href="http://nothingsgonnastopmenow.com/"&gt;Click the link.&lt;/a&gt; Chase for your dream. &lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Our Architecture</title>
        <link href="http://spire.io/posts/our-architecture.html"/>
        <updated>2012-05-01T00:00:00.000Z</updated>
        <id>http://spire.io/posts/our-architecture.html</id>
        <content type="html">
          &lt;p&gt;People often ask us about the technologies we use to power the spire.io platform. Our architecture is a big part of what makes us unique and ensures that your applications will be reliable, performant, and secure.&lt;/p&gt;  &lt;p&gt;There are basically five major components involved:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;Load-balancer and proxy&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;A dispatcher&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;A message transport&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;A collection of workers&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;And a data store&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Each of these has different requirements and thus employs different technologies. Let&apos;s start where our request processing starts - with the load balancer and proxy.&lt;/p&gt;  &lt;h2&gt;Load Balancer And Proxy&lt;/h2&gt; &lt;p&gt;This is really two things, but, conceptually, they are really doing one job. First, we want to distribute requests evenly across our servers. Second, we want to provide quick responses in some cases: for redirects, bad requests, or obvious denial-of-service (DOS) attacks. We can also do some course-grained routing. This is particularly helpful for setting up failover or for doing rolling deploys. Finally, we terminate SSL at this layer, freeing up the dispatcher from doing routine SSL handshaking.&lt;/p&gt;  &lt;p&gt;We run our servers on &lt;a href="http://aws.amazon.com/"&gt;Amazon Web Services&lt;/a&gt; and use their &lt;a href="http://aws.amazon.com/elasticloadbalancing/"&gt;elastic load balancer&lt;/a&gt; (which is where we terminate SSL). AWS gives us data centers around the world, which is nice (and great for &lt;a href="http://www.youtube.com/watch?v=TPOWB-PAWxA"&gt;load testing&lt;/a&gt;). However, this is an area that is evolving rapidly and we are always re-evaluating cloud providers. We also use &lt;a href="http://haproxy.1wt.eu/"&gt;HA Proxy&lt;/a&gt;, which is ideal for dealing with high-levels of concurrency, as our proxy server.&lt;/p&gt;  &lt;p&gt;And speaking of the dispatcher ...&lt;/p&gt;  &lt;h2&gt;The Dispatcher&lt;/h2&gt; &lt;p&gt;One of the design goals for our platform is to make persistent connections cheap. We want to be able have millions and millions of connections open simultaneously and not have to worry about it from a cost standpoint.&lt;/p&gt;  &lt;p&gt;Keeping sessions open for a long time is useful for supporting HTTPS, because of the overhead associated with establishing an SSL session. We want clients to be able to keep a connection open so they can have the best of both worlds: performance and security. Although we terminate the SSL at the proxy layer, we still need to keep connections open on the dispatcher for long-running requests. This gives us true real-time responsiveness, even for applications with millions of clients.&lt;/p&gt;  &lt;p&gt;Another design principle is that we never want to drop requests. So that means we have to grab them off the wire and persist them somehow as quickly as we can. We don&apos;t want to do any more than that so that we can handle as many requests and connections as possible per machine.&lt;/p&gt;  &lt;p&gt;We wrote the dispatcher in &lt;a href="http://nodejs.org/"&gt;Node&lt;/a&gt; for three reasons. One reason is that we already knew Javascript. Another is that it has &lt;a href="http://nodejs.org/api/http.html#http_http_createserver_requestlistener"&gt;very nice asynchronous HTTP libraries&lt;/a&gt;, which makes it easy for us to keep connections open. Finally, it outperformed Ruby in our load testing, another language we&apos;re quite familiar with and which features support for asynchronous HTTP, for this particular task. Of course, it&apos;s still not as fast as, say, using C, but it&apos;s simple enough that it can be easily rewritten if the current implementation becomes a bottleneck.&lt;/p&gt;  &lt;h2&gt;The Message Transport&lt;/h2&gt; &lt;p&gt;We use &lt;a href="http://redis.io/"&gt;Redis&lt;/a&gt; as our message transport. Messages are distributed across any number of Redis servers, allowing us to easily handle millions of them simultaneously. (By the way, we use lists and blocking operations rather than pub-sub.) The dispatcher constructs a task from a request and places the message containing the task into a worker queue. Which brings us to ...&lt;/p&gt;  &lt;h2&gt;A Collection Of Workers&lt;/h2&gt; &lt;p&gt;Messages are handled by workers that specialize in performing a particular task. They perform the task and then post a message with a particular result. The dispatcher that was waiting for the specific result can then transform that into an HTTP response.&lt;/p&gt;  &lt;p&gt;Workers are written in &lt;a href="http://jruby.org/"&gt;JRuby&lt;/a&gt;, which makes it easy for us to make changes quickly and spin up multiple worker threads - one for each CPU. High-volume workers may eventually be rewritten in C.&lt;/p&gt;  &lt;h2&gt;Data Store&lt;/h2&gt; &lt;p&gt;We also use Redis as our data store. It&apos;s data structure-oriented approach provides a great deal of flexibility over other NoSQL data stores and relational databases. For example, we use &lt;a href="http://redis.io/commands#sorted_set"&gt;SortedSets&lt;/a&gt; to make message retrieval (for application messages, not our internal messages) simple and fast.&lt;/p&gt;  &lt;h2&gt;Advantages&lt;/h2&gt; &lt;p&gt;This architecture is highly elastic. It&apos;s easy to simply add servers wherever we have bottlenecks. And it&apos;s easy to add new features - we can just add new types of workers. Finally, it&apos;s easy to optimize any given component because they are decoupled from one another - all interaction is done via the message transport, which is language neutral. For example, we could rewrite the dispatcher in C or a particularly high-volume worker in Node, or even &lt;a href="http://www.lua.org/"&gt;Lua&lt;/a&gt;, and it wouldn&apos;t affect anything else.&lt;/p&gt;  &lt;h2&gt;Security&lt;/h2&gt; &lt;p&gt;We have put a great deal of thought into how to handle security effectively in an API that lives out in the wild and wooly World-Wide Web. In particular, we use HTTPS for all API requests and &lt;a href="http://www.spire.io/posts/web-capabilities.html"&gt;capability-security&lt;/a&gt; - fine-grained authorization-based keys, rather than course-grain authentication-based keys - which is both more flexible and more secure at the same time. We will be introducing other APIs that build on this approach in the near future.&lt;/p&gt;  &lt;h2&gt;Roadmap&lt;/h2&gt; &lt;p&gt;We have a lot of cool things coming down the road, including new APIs and enhancements to our &lt;a href="http://api.spire.io/"&gt;Messaging API&lt;/a&gt; (including &lt;a href="http://dev.w3.org/html5/websockets/"&gt;Web Sockets&lt;/a&gt; support). &lt;a href="https://twitter.com/#!/spireio"&gt;Follow us&lt;/a&gt; on Twitter - @spireio - or &lt;a href="http://www.spire.io/posts/"&gt;subscribe to our blog&lt;/a&gt; to keep up-to-date.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: April 27, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-16.html"/>
        <updated>2012-04-27T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-16.html</id>
        <content type="html">
          &lt;h2&gt;CISPA&lt;/h2&gt; &lt;p&gt;In a surprising move, the vote for the Cyber Intelligence Sharing and Protection Act was moved move up a day, taking place Thursday afternoon and &lt;a href="http://www.wired.com/threatlevel/2012/04/house-passes-cispa/"&gt;passing the House of Representatives.&lt;/a&gt;   &lt;/p&gt;  &lt;p&gt;As Wired&apos;s David Kravets explains:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The measure, which some are calling the Son of SOPA, allows internet service providers to share information with the government, including the Department of Homeland Security and the National Security Agency, about cybersecurity threats it detects on the internet. An ISP is not required to shield any personally identifying data of its customers when it believes it has detected threats, which include attack signatures, malicious code, phishing sites or botnets. In short, the measure seeks to undo privacy laws that generally forbid ISPs from disclosing customer communications with anybody else unless with a court order.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; The bill immunizes ISPs from privacy lawsuits for voluntarily disclosing customer information thought to be a security threat. Internet companies are also granted anti-trust protection to immunize them against allegations of colluding on cybersecurity issues. The measure is not solely limited to cybersecurity, and includes the catchall phrase “national security” as a valid reason for turning over the data.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; CISPA also allows ISPs to bypass privacy laws and share data with fellow ISPs in a bid to promptly extinguish a cyberattack.  &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;You can find all the last minute changes to the bill &lt;a href="http://gizmodo.com/5905551/cispa-passes-house/"&gt;at Gizmodo&lt;/a&gt;, where Mat Honan and Brian Barrett speculate that the scheduling change was engineered to minimize news coverage for the bill. The Gizmodo post also includes a list of who voted, so you can find and contact your representatives. We found this &lt;a href="http://www.govtrack.us/congress/votes/112-2012/h192?"&gt;record of the votes&lt;/a&gt;, referred to us by &lt;a href="http://www.twitter.com/bradbarrish"&gt;Brad Barrish&lt;/a&gt; via Twitter, to be a little easier on the eyes though.  &lt;/p&gt;  &lt;h2&gt;The Internet Archive&lt;/h2&gt; &lt;p&gt;Instead of keeping track of you, the &lt;a href="http://archive.org/about/about.php"&gt;Internet Archive&lt;/a&gt; would like to &lt;a href="http://www.codinghorror.com/blog/2012/04/preserving-the-internet-and-everything-else.html"&gt;&quot;create a permanent copy of every Internet page ever created, as it existed at the time.&quot;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Catching up to Sci-Fi&lt;/h2&gt; &lt;p&gt;Big-name backed &lt;a href="http://www.planetaryresources.com/technology/"&gt;Planetary Resources&lt;/a&gt; want to boldly lead us toward the future -- and massive profits -- &lt;a href="http://www.space.com/15395-asteroid-mining-planetary-resources.html"&gt;by mining asteroids for precious metals and other resources like oxygen and water.&lt;/a&gt; We often think of precious metals as being valued for their rarity and the ease with which they can be used for vanity items, but Planetary Resources co-founder Peter Diamandis points out that having a larger supply on hand will reduce the cost of items like defibrillators and allow us &quot;to use them in mass production, like in automotive fuel cells.&quot; The plan involves &lt;a href="http://cosmiclog.msnbc.msn.com/_news/2012/04/24/11375462-reality-check-for-asteroid-miners"&gt;space telescopes, robotic probes, spacecraft, and a healthy amount of laser based equipment&lt;/a&gt;, all of which have cool names like, &quot;Rendezvous Prospector,&quot; just as you would expect. &lt;/p&gt;  &lt;h2&gt;Hybrid Funding&lt;/h2&gt; &lt;p&gt;Andrew Cove takes a look at the &quot;e-paper watch&quot; startup, Pebble, which has surpassed its $100,000 goal by over $6.5 million, and &lt;a href="http://andrewacove.posterous.com/funding-the-internet-of-things"&gt;sees the future of funding.&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Pebble&apos;s Kickstarter success isn&apos;t an anomoly; that they didn&apos;t raise money isn&apos;t a mistake on the part of investors. Pebble is the first example of what will soon be a common occurrence: a startup raises seed capital to build the software platform that powers a prototype physical product; it then pre-sells the first run of production goods, and uses the traction established to raise a venture round to fund the growth of the platform and the team.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(&lt;a href="http://justin-singer.com"&gt;via Justin Singer&lt;/a&gt;)&lt;/p&gt;  &lt;h2&gt;Being Cool Post-Internet&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.nytimes.com/2012/04/08/magazine/why-the-old-school-music-snob-is-the-least-cool-kid-on-twitter.html?pagewanted=all"&gt;Why the Old-School Music Snob is the Least Cool Kid on Twitter&lt;/a&gt;: &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; File-sharing had rendered us, the knowledge guardians, irrelevant. Within a few years, knowledge had ceased to confer any distinction, and hoarding it had become about as socially advantageous as stamp collecting. Thanks to the Internet, cultural knowledge was now a collective resource. Which meant that being cool was no longer about what you knew and what other people didn’t. It was about what you had to say about the things that everyone already knew about.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(&lt;a href="http://blog.timoni.org/"&gt;via Timoni&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;Paywall problems? You can circumvent them with a quick &lt;a href="https://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=why+the+oldschool+music+snob+is+the+least+cool+kid#sclient=psy-ab&amp;hl=en&amp;safe=off&amp;q=why+the+old-school+music+snob+is+the+least+cool+kid+on+twitter&amp;oq=why+the+old-school+music+snob+is+the+least+cool+kid+on+twitter&amp;aq=f&amp;aqi=g1g-m1&amp;aql=&amp;gs_nf=1&amp;gs_l=serp.3..0j0i5.5461.5461.1.5701.1.1.0.0.0.0.144.144.0j1.1.0.gjoEOQUrzsQ&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&amp;fp=16ecf87305e97b20&amp;biw=1223&amp;bih=615"&gt;Google search&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Real-Time Messaging for the Real World: Detecting Client Disconnects</title>
        <link href="http://spire.io/posts/expiring-subscriptions.html"/>
        <updated>2012-04-25T08:00:00.000Z</updated>
        <id>http://spire.io/posts/expiring-subscriptions.html</id>
        <content type="html">
          &lt;p&gt;The &lt;a href="http://www.spire.io"&gt;spire.io&lt;/a&gt; Messaging API makes it easy to route messages to many thousands of clients simultaneously.
But how can we tell which clients are actually listening for messages?&lt;/p&gt;  &lt;center&gt;
&lt;img src="/images/client-disconnect.png" alt="Are you listening?"&gt;
&lt;/center&gt;
 &lt;h2&gt;The Problem&lt;/h2&gt; &lt;p&gt;When one client becomes disconnected for unexpected reasons (like closing a browser window), how can the other clients detect that one has gone offline?
In these cases, there is no way for the disconnecting client to alert the others that it is about to disconnect.
So how do the other listeners know that the client is gone?&lt;/p&gt;  &lt;p&gt;This problem is particularly relevant to mobile and web applications.
Mobile applications often suffer from connectivity problems: changing networks, going on- and off-line, and running out of battery.
Similarly, a browser running a web application can crash, or the user can navigate to a new page or close the browser entirely.&lt;/p&gt;  &lt;h2&gt;The Solution&lt;/h2&gt; &lt;p&gt;Happily, spire.io has two unique features that combine to solve the problem of detecting disconnects.&lt;/p&gt;  &lt;p&gt;Firstly, &quot;Subscription Events&quot; are created whenever a subscription is created or deleted.
Secondly, subscriptions can be given an expiration time, after which they will be automatically deleted.&lt;/p&gt;  &lt;h3&gt;Subscription Events&lt;/h3&gt; &lt;p&gt;In my &lt;a href="http://www.spire.io/posts/keeping-track-of-subs.html"&gt;last blog post&lt;/a&gt;, I discussed subscription events and how they partially solve the disconnection problem.&lt;/p&gt;  &lt;p&gt;When a new client comes online and creates a new subscription to a channel, a &quot;join&quot; event will be sent to all listeners of that channel.
The &quot;join&quot; event includes the subscription name and timestamp.
Similarly, if a client deletes a subscription, a &quot;part&quot; event will be sent with the subscription name and timestamp.&lt;/p&gt;  &lt;p&gt;However, until recently, the client had to explicitly delete the subscription in order to send part events to the other listeners.
If the client becomes disconnected for unexpected reasons, it will not have a chance to delete the subscription, no part events will be sent, and other clients will not know that it has disconnected.&lt;/p&gt;  &lt;h3&gt;Expiring Subscriptions&lt;/h3&gt; &lt;p&gt;As of version 1.1.6, you can specify an optional expiration time when creating a new subscription.
If the subscription is not accessed for that amount of time, it will expire.
When a subscription expires, it is automatically deleted, and a part event is created.
This part event will have its &lt;code&gt;reason&lt;/code&gt; property set to &lt;code&gt;&quot;expired&quot;&lt;/code&gt;, so expirations can be distinguished from normal deletions (which have &lt;code&gt;reason&lt;/code&gt; set to &lt;code&gt;&quot;deleted&quot;&lt;/code&gt;).&lt;/p&gt;  &lt;h2&gt;How to use it&lt;/h2&gt; &lt;p&gt;To use the new subscription expiration feature, just send an &apos;expiration&apos; parameter (in milliseconds) when you create the subscription.&lt;/p&gt;  &lt;p&gt;With the &lt;a href="https://github.com/spire-io/spire.io.js
"&gt;spire.io javascript library&lt;/a&gt;, the code looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;// Create a new subscription with a 60 second expiration.
var subscriptionName = &quot;my-expiring-subscription&quot;;
var subscriptionExpiration = 60000; // 60 seconds
spire.session.createSubscription({
  name: subscriptionName,
  channelNames: [&quot;my-channel&quot;],
  expiration: subscriptionExpiration
}, function (err, subscription) {
  if (!err) {
    // subscription is a subscription with a 60-second expiration
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This creates a subscription called &quot;my-expiring-subscription&quot;, with a 60-second expiration.
The subscription is listening on the channel called &quot;my-channel&quot;.&lt;/p&gt;  &lt;p&gt;Creating the subscription will send a join event that looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  channel_name: &quot;my-channel&quot;,
  subscription_name: &quot;my-expiring-subscription&quot;,
  timestamp: 1335318932874000,
  type: &quot;join&quot;,
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Join events get created for all new named subscriptions, not just those with an expiration time.&lt;/p&gt;  &lt;p&gt;If we do not poll this subscription for events for over 60 seconds, it will expire, and a part event like the following will be created:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  channel_name: &quot;my-channel&quot;,
  subscription_name: &quot;my-expiring-subscription&quot;,
  timestamp: 1335318932874000,
  type: &quot;part&quot;,
  reason: &quot;expired&quot;
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;If we delete the subscription manually with &lt;code&gt;subscription.delete&lt;/code&gt;, we will get a similar part event.
The only difference is that the &lt;code&gt;reason&lt;/code&gt; will be &lt;code&gt;&quot;deleted&quot;&lt;/code&gt;.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  channel_name: &quot;my-channel&quot;,
  subscription_name: &quot;my-expiring-subscription&quot;,
  timestamp: 1335318932874000,
  type: &quot;part&quot;,
  reason: &quot;deleted&quot;
}
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Learn more&lt;/h2&gt; &lt;p&gt;To learn more about subscription events check out my blog post about &lt;a href="http://www.spire.io/posts/keeping-track-of-subs.html"&gt;keeping track of subscriptions&lt;/a&gt;, or head to the spire.io &lt;a href="http://www.spire.io/docs/api/reference.html"&gt;api docs&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: April 20, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-15.html"/>
        <updated>2012-04-20T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-15.html</id>
        <content type="html">
          &lt;h3&gt;Patents&lt;/h3&gt; &lt;p&gt;Twitter &lt;a href="http://engineering.twitter.com/2012/04/introducing-innovators-patent-agreement.html"&gt;announced&lt;/a&gt; their &lt;a href="https://github.com/twitter/innovators-patent-agreement/blob/master/innovators-patent-agreement.md"&gt;Innovators Patent Agreement,&lt;/a&gt; which is designed to give their employees peace of mind that their creations will not be used as weapons to stifle competition and innovation in the future. It&apos;s nice to see a large company trying to set an example for the industry in a &lt;a href="http://www.guardian.co.uk/technology/2012/apr/09/microsoft-buys-aol-patents"&gt;climate&lt;/a&gt; of &lt;a href="http://www.wired.com/epicenter/2012/03/opinion-baio-yahoo-patent-lie/"&gt;patent stockpiling.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;From the release: &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The IPA is a new way to do patent assignment that keeps control in the hands of engineers and designers. It is a commitment from Twitter to our employees that patents can only be used for defensive purposes. We will not use the patents from employees’ inventions in offensive litigation without their permission. What’s more, this control flows with the patents, so if we sold them to others, they could only use them as the inventor intended. &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt; A patent is still a patent in Marco Arment&apos;s eyes, and he points out that the potential for aggressive legal action remains under the IPA. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; First, it’s interesting to read their definition of “a Defensive Purpose”, which, loosely summarized, means they can use their patents to:&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; Countersue anyone who sues or threatens to sue Twitter for any intellectual-property claim.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; Sue anyone who has sued anyone else for patent infringement in the last 10 years.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; Sue anyone “to deter a patent litigation threat” against Twitter.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; These leave a lot of room for interpretation.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Net Neutrality&lt;/h3&gt; &lt;p&gt;Speaking of competition, Reed Hastings has something to say about Comcast&apos;s &lt;a href="http://www.rawstory.com/rs/2012/04/16/netflix-ceo-blasts-comcast-for-shredding-net-neutrality/"&gt;cap favoritism for their Xfinity service.&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;“The same device, the same IP address, the same wifi, the same internet connection, but totally different cap treatment,” he added. “In what way is this neutral?”&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Valve is Different&lt;/h3&gt; &lt;p&gt;Any article that begins with &quot;It all started with &lt;em&gt;Snow Crash&lt;/em&gt;&quot; is going to be worth the read, and &lt;a href="http://blogs.valvesoftware.com/abrash/valve-how-i-got-here-what-its-like-and-what-im-doing-2/"&gt;Michael Abrash&apos;s post on working at Valve&lt;/a&gt; is no exception. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The idea that a 10-person company of 20-somethings in Mesquite, Texas, could get its software on more computers than the largest software company in the world told him that something fundamental had changed about the nature of productivity. When he looked into the history of the organization, he found that hierarchical management had been invented for military purposes, where it was perfectly suited to getting 1,000 men to march over a hill to get shot at. When the Industrial Revolution came along, hierarchical management was again a good fit, since the objective was to treat each person as a component, doing exactly the same thing over and over.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; The success of Doom made it obvious that this was no longer the case. There was now little value in doing the same thing even twice; almost all the value was in performing a valuable creative act for the first time.  &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(via &lt;a href="http://kottke.org"&gt;Kottke&lt;/a&gt;)&lt;/p&gt;  &lt;h3&gt;$$$&lt;/h3&gt; &lt;p&gt;Despite David Karp&apos;s previously &lt;a href="http://adage.com/article/digital/tumblr-tests-tools-users-brands/234084/"&gt;strong anti-ad stance&lt;/a&gt;, Tumblr announced that they will be &lt;a href="http://adage.com/article/special-report-digital-conference/social-media-tumblr-announces-foray-paid-ads/234214/"&gt;introducing paid ads beginning May 2nd.&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Miscellany&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.kagenschaefer.com/pipeorgandesk.html"&gt;The coolest desk ever made&lt;/a&gt; features a plethora of secret compartments, a drawer operated pipe organ, and a pneumatic logic board. &lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: April 13, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-14.html"/>
        <updated>2012-04-13T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-14.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though, so get ready to fire up your Instapaper...  &lt;/p&gt;  &lt;h2&gt;Instagram&lt;/h2&gt; &lt;p&gt;It seemed like everyone on the internet had an opinion about Facebook&apos;s acquisition of Instagram earlier this week. Between arguments over whether Facebook overpaid at $1 billion, to whether Instagram was going to get shut down or suffer in quality, cutting through the noise on Twitter was pretty difficult for the next few days. We believe the whole conversation can be summed up excellently between &lt;a href="http://www.twitter.com/om"&gt;Om Malik&lt;/a&gt;&apos;s post, &lt;a href="http://gigaom.com/2012/04/09/here-is-why-did-facebook-bought-instagram/"&gt;Here is why Facebook bought Instagram&lt;/a&gt; and &lt;a href="http://www.twitter.com/ftrain"&gt;Paul Ford&lt;/a&gt;&apos;s post, &lt;a href="http://nymag.com/daily/intel/2012/04/facebook-and-instagram-when-your-favorite-app-sells-out.html"&gt;Facebook and Instagram: When Your Favorite App Sells Out&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;JSCONF&lt;/h2&gt; &lt;p&gt;The transcript of &lt;a href="http://www.twitter.com/brixen"&gt;Brian Ford&lt;/a&gt;&apos;s talk &lt;a href="http://brixen.io/2012/4/9/is_node_js_better"&gt;&quot;Is Node Better&quot;&lt;/a&gt; is up now. He covers a lot of ground on bringing relying on reason and logic to bear solving problems and choosing languages.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://twitter.com/#!/izs"&gt;Isaac Z. Schlueter&lt;/a&gt; has posted a &lt;a href="http://blog.izs.me/post/20786279320/re-brixens-is-node-better?451b20c0"&gt;lengthy, level headed response&lt;/a&gt; based on notes he took during the session that includes some of his own issues and concerns regarding Node&lt;/p&gt;  &lt;h2&gt;Bug Squashing&lt;/h2&gt; &lt;p&gt;Our friends at &lt;a href="http://www.boundary.com"&gt;Boundary&lt;/a&gt; give us a look at a &lt;a href="http://blog.boundary.com/2012/04/04/a-deep-dive-to-find-a-nasty-bug/"&gt;particularly tricky bug&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Competition&lt;/h2&gt; &lt;p&gt;&lt;a href="http://mediadecoder.blogs.nytimes.com/2012/04/11/justice-files-suit-against-apple-and-publishers-over-e-book-pricing/"&gt;The Justice Dept. Sues Apple and Publishers Over E-Book Pricing&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The publishers who have settled are required to end their e-book contracts with Apple and any other retailer with a “most favored nation clause,” which says that no other retailer can sell e-books for a lower price. For two years, the publishers are also prohibited from restricting any retailer’s ability to discount e-books.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Back to the Future&lt;/h2&gt; &lt;p&gt;In honor of the Encyclopedia Britannica giving up its print edition, &lt;a href="http://www.futureofthebook.org/blog/archives/2012/04/these_drawings_date_from_1982.html"&gt;Bob Stein has shared illustrations&lt;/a&gt; made in 1982 for his work on what the future, Intelligent Encyclopedia would be like. The illustrations and scenarios are remarkably prescient in light of how we consume information today. &lt;/p&gt;  &lt;p&gt;(via &lt;a href="http://www.kottke.org"&gt;Kottke&lt;/a&gt;)&lt;/p&gt;  &lt;h2&gt;The Wire&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.fastcocreate.com/1680550/why-you-love-the-wire-explained-in-fascinating-detail"&gt;Why You Love &quot;The Wire,&quot; Explained in Fascinating Detail&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The great thing about Lavik’s video is that it itemizes and demonstrates the creative decisions--imperceptible to the “average viewer”--that made the show excellent. But it also provides a powerful demonstration of the monumental effect that those seemingly small creative decisions have on any creative end product.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;(via Dave Pell&apos;s &lt;a href="http://nextdraft.com/"&gt;Next Draft&lt;/a&gt;)&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Keeping track of subscriptions</title>
        <link href="http://spire.io/posts/keeping-track-of-subs.html"/>
        <updated>2012-04-12T08:00:00.000Z</updated>
        <id>http://spire.io/posts/keeping-track-of-subs.html</id>
        <content type="html">
          &lt;p&gt;One feature request that developers often ask for is a way to tell which clients are listening for messages on a channel.&lt;/p&gt;  &lt;p&gt;For example, a chat application needs to know what users are in each chat room at any given point in time.&lt;/p&gt;  &lt;p&gt;Or, to take a more complex example, say you have a distributed logging setup where log data is generated by various clients and sent to multiple servers (some store the data long-term, others parse the data in real time and send alerts if necessary, etc).&lt;/p&gt;  &lt;p&gt;Since log data is important, we would like to know which servers are currently listening for data.
Furthermore, we should be notified when servers come online or go offline.&lt;/p&gt;  &lt;p&gt;The Spire API makes this very easy.&lt;/p&gt;  &lt;p&gt;Each Spire channel knows which subscriptions are currently listening on that channel, and exposes the names of these channels through a &lt;code&gt;channel_subscriptions&lt;/code&gt; resource described below.
In addition, channels send special events called &quot;joins&quot; and &quot;parts&quot; whenever a new subscription is created or deleted.&lt;/p&gt;  &lt;p&gt;Using these two mechanisms, it is a simple matter to keep track of all subscriptions listening to a particular channel.&lt;/p&gt;  &lt;h2&gt;Find all subscriptions to a channel&lt;/h2&gt; &lt;p&gt;All channels now have a &lt;code&gt;channel_subscriptions&lt;/code&gt; resource inside them.
Making a GET request to that resource will return all the named subscriptions to the channel.&lt;/p&gt;  &lt;p&gt;Using the javascript client, we can find all the subscriptions for the channel &lt;code&gt;chan&lt;/code&gt; with code like the following:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;// `chan` is a channel object defined elsewhere
chan.subscriptions(function (err, subs) {
  // `subs` will be a hash of subscription_name =&gt; subscription
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This code assumes that you already have a channel object called &lt;code&gt;chan&lt;/code&gt;.&lt;/p&gt;  &lt;p&gt;If we don&apos;t have the channel object, but know the channel name, we can get the subscriptions for the channel with a function like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;function getSubsForChannel (channelName, cb) {
  // First, get the channel.
  spire.channel(channelName, function (err, chan) {
    if (err) return cb(err);
    // Then get all the subscriptions.
    chan.subscriptions(function (err, subs) {
      if (err) return cb(err);
      cb(null, subs);
    });
  });
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This function takes a channel name and callback as arguments.
It fetches the channel, and then fetches the subscriptions for the channel.
If there are no errors, the callback will be called with the subscription hash.&lt;/p&gt;  &lt;p&gt;Getting back to our distributed logging example, finding all the servers listening for log data on channel &quot;logs&quot; is as simple as this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;getSubsForChannel(&quot;logs&quot;, function (err, subs) {
  if (!err) {
    // `subs` has all servers subscribing to log data
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Once we have the list of current subscriptions, we want to keep it up to date.
We could just poll the channel subscriptions resource, but that&apos;s not very elegant.
Instead, we can use subscriptions to listen for subscription creation and deletion events, just like we use subscriptions to listen for message events.&lt;/p&gt;  &lt;h2&gt;Subscription events&lt;/h2&gt; &lt;p&gt;In addition to the usual &quot;message&quot; events (which correspond to messages published to a channel), there are two new kinds of events: &quot;joins&quot; and &quot;parts&quot;.&lt;/p&gt;  &lt;p&gt;A &quot;join&quot; event is created whenever a subscription is created to a channel.
A &quot;part&quot; event is created whenever a subscription is deleted.&lt;/p&gt;  &lt;p&gt;Once you have a subscription to a channel, GETting that subscription will return a hash that looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  joins: [],
  parts: [],
  messages: [],
  first: 12345,
  last: 12346
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The &lt;code&gt;messages&lt;/code&gt; array contains messages that have been published to the channel.&lt;/p&gt;  &lt;p&gt;The &lt;code&gt;joins&lt;/code&gt; array contains an event for each subscription that was created.
It will contain the subscription name and timestamp.&lt;/p&gt;  &lt;p&gt;Similarly, the &lt;code&gt;parts&lt;/code&gt; array contains an event for each subscription that was deleted.&lt;/p&gt;  &lt;p&gt;The &lt;code&gt;first&lt;/code&gt; and &lt;code&gt;last&lt;/code&gt; are timestamps corresponding to the first and last events returned.
They are there for convenience, so you don&apos;t need to inspect the arrays to find the first and last timestamp yourself.&lt;/p&gt;  &lt;p&gt;With the javascript client, you add listeners for joins and parts the same way you add listeners for messages:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;  // `sub` is a subscription created elsewhere
  // Add a listener for published messages
  sub.addListener(&apos;messages&apos;, function (messages) {
    // `messages` is an array of message events
  });
  // Add a listener for new subscriptions
  sub.addListener(&apos;joins&apos;, function (joins) {
    // `joins` is an array of join events
  });
  // Add a listener for deleted subscriptions
  sub.addListener(&apos;parts&apos;, function (parts) {
    // `parts` is an array of part events
  });
  sub.startListening({ });
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;For our logging example, we want to be notified when a log server goes on or offline, so our listeners should send some type of notification.&lt;/p&gt;  &lt;h2&gt;Caveat&lt;/h2&gt; &lt;p&gt;Currently, the only way to remove a subscription from a channel is to explicitly DELETE it.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;sub.delete(function (err) {
  if (!err) {
    // sub successfully deleted
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;This deletion removes the subscription from the list of current channel subscriptions, and triggers a part event.&lt;/p&gt;  &lt;p&gt;We are working on a new feature that will allow subscriptions to timeout after a set period of time.
After this feature is released, if a user disconnects from your application or navigates away from the page, Spire will delete the subscription for you and send the &quot;part&quot; event.&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Version 1.1</title>
        <link href="http://spire.io/posts/version-1-dot-1.html"/>
        <updated>2012-04-11T00:00:00.000Z</updated>
        <id>http://spire.io/posts/version-1-dot-1.html</id>
        <content type="html">
          &lt;h2&gt;New Features&lt;/h2&gt; &lt;p&gt;We&apos;re very pleased to announce our 1.1 release, which features:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Named subscriptions and subscription events.&lt;/strong&gt; This makes it easy and convenient to keep track of who is participating in chat, games, or collaborative applications. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Apple Push Notifications.&lt;/strong&gt; You can provide your APN credentials in your spire.io account settings and have notifications sent to iOS devices.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Delete And Update Individual Messages.&lt;/strong&gt; Great for updating feeds.&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Named Subscriptions&lt;/h2&gt; &lt;p&gt;We hope you&apos;ll agree that named subscriptions and subscription events are a really elegant way to connect identity to subscriptions. Named subscriptions are just ordinary subscriptions with names associated with them. These can be whatever your application sets them to be, so it&apos;s very flexible.&lt;/p&gt;  &lt;p&gt;You can see named subscriptions join and leave channels using subscription events, making it easy to notify participants in a channel in realtime who else is participating. You get these events the same way you get messages: simply make a GET request to a channel. Then, just check the &lt;code&gt;joins&lt;/code&gt; and &lt;code&gt;parts&lt;/code&gt; properties in addition to the &lt;code&gt;messages&lt;/code&gt; property.&lt;/p&gt;  &lt;p&gt;For more information, &lt;a href="http://www.spire.io/posts/keeping-track-of-subs.html"&gt;check out our new post detailing how to take advantage of named subscriptions and subscription events.&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Apple Push Notifications&lt;/h2&gt; &lt;p&gt;We are also pleased to announce support for Apple Push Notifications. Our mobile developers have been asking for this - now your messages can reach iOS devices while supporting the native consumer experience.&lt;/p&gt;  &lt;h2&gt;More Soon!&lt;/h2&gt; &lt;p&gt;We&apos;ve also got lots more goodies in store, including more documentation, more features, and even ... a whole new API!&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: April 6, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-13.html"/>
        <updated>2012-04-06T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-13.html</id>
        <content type="html">
          &lt;h3&gt;JSCONF&lt;/h3&gt; &lt;p&gt;A few of our engineers went to JSConf this week and returned with a bunch of cool stories, some of which even involved coding. Our engineer Nick Lacasse was kind enough to link those of us at home to a few talks he liked. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lanyrd.com/2012/jsconf-us/sqxcz/"&gt;Application Cache: Douchebag&lt;/a&gt;, presented by &lt;a href="http://www.twitter.com/jaffathecake"&gt;Jake Archibald&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The Application Cache has skills we need, but if you asked him to paint your bathroom he&apos;d somehow manage to flood your kitchen and break your TV in the process, and he wouldn&apos;t care.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;While there weren&apos;t any slides available, Nick also sent in a link to their &lt;a href="http://wiki.ecmascript.org/doku.php?id=strawman:data_parallelism"&gt;ECMA proposal&lt;/a&gt; after hearing a presentation on RiverTrail, which compiles javascript to parallizable GPU code. &lt;/p&gt;  &lt;p&gt;Fellow spire.io dev Jason Campbell also posted &lt;a href="https://github.com/jxson/jsconf2012/blob/master/notconf.md"&gt;some notes he took at NotConf&lt;/a&gt; the preceding day. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://codestre.am/"&gt;Codestre.am&lt;/a&gt; is another nifty project we heard about at JSConf that allows you share your terminal by live stream or recording. This could be a great tool for helping our non-technical staff as they take their first fledgling steps towards becoming hackers.   &lt;/p&gt;  &lt;h3&gt;(More) Women in Tech&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.etsy.com/blog/news/2012/etsy-hacker-grants-supporting-women-in-technology/"&gt;Etsy partners with Hacker School, providing a total of $50,000 in financial aid for women to join&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Twenty is a small number, but it would roughly match the total number of female engineers I’ve hired in the past 17 years. Even a small change can have a large impact, given the severity of the issue. &lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;The post is much more than a generic announcement, and is worth reading in full. It also includes information about how to apply for one of these grants yourself, so apply or forward it accordingly.&lt;/p&gt;  &lt;h3&gt;Redis&lt;/h3&gt; &lt;p&gt;&lt;a href="http://antirez.com/post/redis-persistence-demystified.html"&gt;Redis Persistence Demystified&lt;/a&gt;  &lt;/p&gt;  &lt;p&gt;Salvatore &quot;antirez&quot; Sanfilippo gives a great high level overview of how Redis persistence works.  &lt;/p&gt;  &lt;h3&gt;Type&lt;/h3&gt; &lt;p&gt;Typographer and teacher, Indra Kupferschmid, recently &lt;a href="http://kupferschrift.de/cms/2012/03/on-classifications/"&gt;posted a proposal for making a more accessible system for classifying typefaces&lt;/a&gt; with a nice bit of history and context thrown in. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The problem with research in any field is that you dive into a subject on such specialized and detailed level that you forget that your distance to the language and knowledge of the normal people gets greater and greater. It helps to step back every now and then and ask the actual user. A classification should help them to find, select and combine typefaces, and not the scholar in the first place.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Open Source&lt;/h3&gt; &lt;p&gt;&lt;a href="http://venturebeat.com/"&gt;VentureBeat&lt;/a&gt; reports that Facebook &lt;a href="http://venturebeat.com/2012/04/03/facebook-ringmark-open-source/"&gt;open-sourced their mobile test suite, Ringmark.&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; For those that are building with the web today, it’s a major hurdle to learn native technologies like Objective-C and Java, and we hope that an improved mobile web can unlock a large contingency of developers that could, and will, be developing for mobile.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Miscellany&lt;/h3&gt; &lt;p&gt;A certain spire.io employee likes talking at length about how we are in the golden age of text editors, and &lt;a href="http://brettterpstra.com/ios-text-editors/"&gt;Brett Terpstra&lt;/a&gt; has what has to be the most comprehensive list, complete with reviews, of ios text editors in existence. &lt;/p&gt;  &lt;p&gt;Martin Wattenberg and Fernanda Viegas have made a &lt;a href="http://hint.fm/wind/"&gt;beautiful visualization&lt;/a&gt; of wind activity in the U.S. using data the updates hourly.&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: March 30, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-12.html"/>
        <updated>2012-03-30T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-12.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though, so get ready to fire up your Instapaper...  &lt;/p&gt;  &lt;h3&gt;Talks&lt;/h3&gt; &lt;p&gt;&lt;a href="http://twitter.com/#!/adactio"&gt;Jeremy Keith&lt;/a&gt; makes &lt;a href="http://adactio.com/journal/5334/"&gt;yet another appearance&lt;/a&gt; on the weekend reader, this time with a post inspired by &lt;a href="http://twitter.com/#!/andyhume"&gt;Andy Hume&lt;/a&gt;&apos;s SXSW talk, CSS for Grown Ups: Maturing Best Practices, wherein he provides some more resources relevant to Andy&apos;s theme of &quot;creating design systems&quot;. Keith also provides a round up of some of the better design focused talks from South By here as well. &lt;/p&gt;  &lt;p&gt;Video from &lt;a href="http://www.lukew.com/ff/"&gt;Luke Wroblewski&lt;/a&gt;&apos;s &lt;a href="http://denver2012.drupal.org/keynote/luke-wroblewski"&gt;keynote at DrupalCon Denver&lt;/a&gt; is up now. If you haven&apos;t been following along with his blog about why teams should focus on developing for mobile first, this video will do a great job of bringing you up to speed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://highscalability.com/blog/2012/3/26/7-years-of-youtube-scalability-lessons-in-30-minutes.html"&gt;&quot;7 Years of YouTube  Scalability Lessons in 30 Minutes.&quot;&lt;/a&gt; Todd Huff recaps YouTube engineer Mike Solomon&apos;s talk from PyCon. &lt;/p&gt;  &lt;h3&gt;Open Source&lt;/h3&gt; &lt;p&gt;&lt;a href="http://twitter.com/#!/mitchellh/"&gt;Mitchell Hashimoto&lt;/a&gt; provides some &lt;a href="http://mitchellhashimoto.com/post/20106073460/lessons-learned-building-open-source?834c1390#comment-479788269"&gt;&quot;Lessons Learned Building Open Source&quot;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.golang.org/2012/03/go-version-1-is-released.html"&gt;Go version 1&lt;/a&gt; was released on Wednesday.  &lt;/p&gt;  &lt;h3&gt;Photo &quot;sharing&quot;&lt;/h3&gt; &lt;p&gt;Quora user Changneng Chen gives an &lt;a href="http://www.quora.com/Instagram/How-does-Instagram-develop-their-filters/answer/Changneng-Chen"&gt;in depth answer&lt;/a&gt; on how photo filters, like Instagram&apos;s, work.  &lt;/p&gt;  &lt;h3&gt;Rack&lt;/h3&gt; &lt;p&gt;&lt;a href="http://puma.io/"&gt;Puma.io&lt;/a&gt;  &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Unlike other Ruby Webservers, Puma was built for speed and concurrency. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications. It is designed for running Rack apps only. &lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Miscellany&lt;/h3&gt; &lt;p&gt;Kickstarter provides a follow up on the massive impact that Double Fine&apos;s fundraising success has had on the site as the &lt;a href="http://www.kickstarter.com/blog/blockbuster-effects"&gt;60,000 new backers that the project brought in have gone on a massive nerdy spending spree.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The NY Times &lt;a href="http://www.nytimes.com/2012/03/28/technology/for-an-edge-on-the-internet-computer-code-gains-a-following.html?_r=4&amp;pagewanted=1&amp;hp&amp;adxnnl=1&amp;adxnnlx=1333094631-TBHrCghcnm%20y/gBYD8PPSQ"&gt;takes a look&lt;/a&gt; at the growing interest around learning to code and the idea that reading code is the new literacy.  &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; “Inasmuch as you need to know how to read English, you need to have some understanding of the code that builds the Web,” said Sarah Henry, 39, an investment manager who lives in Wayne, Pa. “It is fundamental to the way the world is organized and the way people think about things these days.”&lt;/p&gt;&lt;/blockquote&gt; 
        </content>
      </entry>
          <entry>
        <title>Finish Weekend</title>
        <link href="http://spire.io/posts/finish-weekend.html"/>
        <updated>2012-03-029T00:00:00.000Z</updated>
        <id>http://spire.io/posts/finish-weekend.html</id>
        <content type="html">
          &lt;p&gt;As textbook dabblers and side project enthusiasts, we know how hard it can be to get that extra burst of energy needed to get a project out the door. Thanks to those web apps that have been three quarters done for too long, we were only too happy to be involved with &lt;a href="http://collectiveidea.com/"&gt;Collective Idea&lt;/a&gt;&apos;s &lt;a href="https://www.finishweekend.com/"&gt;Finish Weekend&lt;/a&gt; in Boston last weekend. &lt;/p&gt;  &lt;p&gt;We didn&apos;t get to have a team member out there, but we tried to keep up from the sidelines and thought it looked like a great success. The space &lt;a href="http://thoughtbot.com/"&gt;Thoughtbot&lt;/a&gt; so generously provided &lt;a href="https://twitter.com/#!/FinishWeekend/status/183556686441750529/photo/1"&gt;looked warm and inviting&lt;/a&gt; for all the finishers that showed up.  There was &lt;a href="https://twitter.com/#!/FinishWeekend/status/183598741222199296/photo/1"&gt;food when they got hungry&lt;/a&gt;, and Collective Idea&apos;s own &lt;a href="http://www.twitter.com/timbugai"&gt;Tim Bugai&lt;/a&gt; finished up the iOS app for &lt;a href="http://twitter.com/#!/bryckbost"&gt;Brian Ryckbost&lt;/a&gt;&apos;s &lt;a href="http://liquorli.st/"&gt;liquorli.st&lt;/a&gt; to help Michiganders find good prices on liquor when they&apos;re out and about. For our part, we learned that drinking in Michigan is complicated. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/#!/ilamont"&gt;Ian Lamont&lt;/a&gt;, half of the team behind the mobile classifieds app Invantory, &lt;a href="http://invantory.com/2012/03/finish-weekend/"&gt;wrote a great recap of the event&lt;/a&gt; on the Invantory company blog. You can also read &lt;a href="http://invantory.com/2012/03/redesigning-invantory-coms-home-page/"&gt;his follow up post&lt;/a&gt;, where he goes into more detail about exactly what he accomplished on his site redesign. &lt;/p&gt;  &lt;p&gt;Some other notable projects were the &lt;a href="http://alexspixels.com/apps.html"&gt;real-time audio analyzers&lt;/a&gt; Alex Wiltschko brought in to work on, &lt;a href="http://www.codepupil.com/"&gt;CodePupil&lt;/a&gt; - a platform for learning to code via exercises and games, and weight loss network &lt;a href="https://loseitorloseit.com/"&gt;Lose It or Lose It&lt;/a&gt;, who came in to polish the &quot;Keep It Off&quot; feature.&lt;/p&gt;  &lt;p&gt;Thanks to Daniel at Collective Idea for doing such a great job of keeping us in the loop. This type of event is a great idea and we look forward to being involved in more. Hopefully we will be able to attend one in person soon. &lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Announcing JS.la</title>
        <link href="http://spire.io/posts/jsla-march-29.html"/>
        <updated>2012-03-023T00:00:00.000Z</updated>
        <id>http://spire.io/posts/jsla-march-29.html</id>
        <content type="html">
          &lt;p&gt;We love JavaScript.  The language itself is a pleasure to work with, and it&apos;s been amazing to watch the community grow and mature. As soon as we started talking about organizing more meet ups in LA, we knew we wanted to have a killer JS group to go to. So we were really excited when Jason said he had the opportunity to take over organizing &lt;a href="http://js.la"&gt;JS.la.&lt;/a&gt; Carlo Flores, our head of Ops, is bringing his experience as co-organizer of &lt;a href="http://www.meetup.com/ladevops/"&gt;LA DevOps&lt;/a&gt; to the table, and we think the result is going to be a group that combines solid technical talks and fun story swapping.&lt;/p&gt;  &lt;p&gt;The group will meet the last Thursday of every other month in the Hollywood area beginning with this month&apos;s meeting at 7 P.M. on March 29th, hosted by the kind people at &lt;a href="http://www.citygridmedia.com/"&gt;CityGrid&lt;/a&gt;. In addition to the socializing and casual JS talk you would expect, the meeting will feature a presentation by James Halliday (&lt;a href="http://www.twitter.com/substack"&gt;@substack&lt;/a&gt;) on breaking up big node.js apps into lots of tiny services, and an introduction to WebGL and three.js by Travis Glines (&lt;a href="http://www.twitter.com/travisglines"&gt;@travisglines&lt;/a&gt;). You can read expanded descriptions on the &lt;a href="http://js.la"&gt;JS.la site&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Jason and Carlo are still looking for people interested in giving a short lightning talk. (About 5-15 minutes long.) You can contact them via the js.la twitter account: &lt;a href="http://twitter.com/losangelesJS"&gt;@losangelesJS&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://js.la/rsvp"&gt;MAKE SURE TO RSVP&lt;/a&gt;, as space is limited&lt;/p&gt;  &lt;p&gt;7 P.M., March 29th&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.citygridmedia.com/"&gt;CityGrid&lt;/a&gt;
8833 W. Sunset Boulevard
West Hollywood, CA 90069&lt;/p&gt;  &lt;p&gt;&lt;iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=8833+W.+Sunset+Boulevard+West+Hollywood,+CA+90069&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=39.644047,58.974609&amp;ie=UTF8&amp;hq=&amp;hnear=8833+W+Sunset+Blvd,+West+Hollywood,+Los+Angeles,+California+90069&amp;ll=34.090763,-118.384121&amp;spn=0.010147,0.014398&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=8833+W.+Sunset+Boulevard+West+Hollywood,+CA+90069&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=39.644047,58.974609&amp;ie=UTF8&amp;hq=&amp;hnear=8833+W+Sunset+Blvd,+West+Hollywood,+Los+Angeles,+California+90069&amp;ll=34.090763,-118.384121&amp;spn=0.010147,0.014398&amp;t=m&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: March 23, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-11.html"/>
        <updated>2012-03-23T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-11.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though so get ready to fire up your Instapaper...&lt;/p&gt;  &lt;h2&gt;The Cloud&lt;/h2&gt; &lt;p&gt;Amazon reacts to customer demand for hybrid cloud options by &lt;a href="http://gigaom.com/cloud/amazon-eucalyptus-partner-for-enterprise-cloud-just-dont-call-it-a-hybrid/"&gt;partnering with Eucalyptus&lt;/a&gt; to &quot;[enable] customers migrate workloads between private clouds and Amazon Web Services.&quot; &lt;/p&gt;  &lt;h2&gt;Ops&lt;/h2&gt; &lt;p&gt;Netflix&apos;s &lt;a href="https://twitter.com/#!/adrianco"&gt;Adrian Cockcroft&lt;/a&gt; &lt;a href="http://perfcap.blogspot.com/2012/03/ops-devops-and-noops-at-netflix.html"&gt;provides some insight into how Netflix operates, and expands on his notion of NoOps.&lt;/a&gt;    &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Several hundred development engineers use these tools to build code, run it in a test account in AWS, then deploy it to production themselves. They never have to have a meeting with ITops, or file a ticket asking someone from ITops to make a change to a production system, or request extra capacity in advance. They use a web based portal to deploy hundreds of new instances running their new code alongside the old code, put one &quot;canary&quot; instance into traffic, if it looks good the developer flips all the traffic to the new code. If there are any problems they flip the traffic back to the previous version (in seconds) and if it&apos;s all running fine, some time later the old instances are automatically removed. This is part of what we call NoOps. The developers used to spend hours a week in meetings with Ops discussing what they needed, figuring out capacity forecasts and writing tickets to request changes for the datacenter. Now they spend seconds doing it themselves in the cloud.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;&lt;a href="https://twitter.com/#!/allspaw"&gt;John Allspaw&lt;/a&gt; of Etsy &lt;a href="https://gist.github.com/2140086"&gt;responds to Cockroft.&lt;/a&gt; while describing Etsy&apos;s process.     &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Ok so you&apos;ve just described an engineer deploying a change to production, choosing and relying on signals and metrics to increase or decrease confidence in said change, taking action (or not) based on those signals and metrics, and then adjusting resources to make the change pseudo-permanent. Congratulations, you&apos;ve just described one of the most basic patterns of modern Operations, one that aligns quite nicely with Col. Boyd&apos;s OODA loop (http://en.wikipedia.org/wiki/OODA_loop), well-known to the Operations community. No matter how many different titles you give it, no matter who that engineer reports to, this is Operations. This is the Operations that is known currently, in the field. Really, ask anyone who&apos;s been doing this at scale. Ask Theo Schlossnagle. Ask Jesse Robbins. Ask Benjamin Black. Ask Artur Bergman. Ask Jonathan Heiliger. Ask Jon Jenkins.  &lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; You have the person responsible for the code deploy the code and take responsibility for it in production. Excellent! This is how many of us have been doing it for years.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Gaming&lt;/h2&gt; &lt;p&gt;&lt;a href="https://twitter.com/#!/robhawkes"&gt;Rob Hawkes&lt;/a&gt; gives us a look at &lt;a href="https://hacks.mozilla.org/2012/03/rounding-up-the-first-mozilla-html5-games-work-week/"&gt;the first Mozilla HTML5 games work week.&lt;/a&gt; It&apos;s awesome to see so much effort being put behind pushing the web platform into new areas.&lt;/p&gt;  &lt;p&gt;While we&apos;re at it, the new &lt;a href="http://soulwire.co.uk/coffeephysics/#"&gt;demos of the Coffee Physics library&lt;/a&gt; might pique your interest about browser based games.  &lt;/p&gt;  &lt;h2&gt;The Long Game&lt;/h2&gt; &lt;p&gt;&lt;a href="https://twitter.com/#!/mathowie"&gt;Matt Haughey&lt;/a&gt; provides video and his stage notes from his &lt;a href="http://a.wholelottanothing.org/2012/03/my-webstock-talk.html"&gt;&quot;Lessons from a 40 year old&quot; talk&lt;/a&gt; at Webstock where he encourages us to put in the work ourselves and consider our sites and products with the next ten years in mind. It&apos;s a lengthy read full of poignant moments and good advice.  &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; I also want to mention a term people in the VC-world consider derogatory, which is “lifestyle business” where someone builds a site, and brings in enough money to support themselves. Investors see that as a bad thing, and it boggles my mind sometimes when I think about the twisted world that produces that kind of idea. I&apos;ve had discussions with VC investors where they hear about my business and dismiss it as &quot;just a lifestyle business&quot; and I&apos;ve come back with &quot;hey, it&apos;s a pretty good lifestyle, probably a better lifestyle than yours, probably a better lifestyle than if I accepted five million dollars from you.&quot;&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Michael Lopp&apos;s post &lt;a href="http://www.randsinrepose.com/archives/2012/03/13/hacking_is_important.html"&gt;&quot;Hacking is Important&quot;&lt;/a&gt; paints a picture of the paradoxes that a product or company&apos;s success inevitably brings, and how a company built to last must maintain a space for tearing down what came before. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; A healthy product company is, confusingly, one at odds with itself. There is a healthy part which is attempting to normalize and to create predictability, and there needs to be another part that is tasked with building something new that is going to disrupt and eventually destroy that normality.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Miscellany&lt;/h2&gt; &lt;p&gt;&lt;a href="https://twitter.com/#!/robinsloan"&gt;Robin Sloan&lt;/a&gt; has created &lt;a href="http://www.robinsloan.com/fish/"&gt;a beautiful &quot;tap essay&quot;&lt;/a&gt; on the difference between liking and loving something on the internet. &lt;/p&gt;  &lt;p&gt;James Bamford reports that &lt;a href="http://www.wired.com/threatlevel/2012/03/ff_nsadatacenter/all/1"&gt;The NSA is Building the Country&apos;s Biggest Spy Center&lt;/a&gt;&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: March 16, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-10.html"/>
        <updated>2012-03-16T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-10.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though so get ready to fire up your Instapaper...&lt;/p&gt;  &lt;h3&gt;Designing Hypermedia APIs&lt;/h3&gt; &lt;p&gt;&lt;a href="http://steveklabnik.com/"&gt;Steve Klabnik&lt;/a&gt; shares a portion of his Designing Hypermedia APIs book on &lt;a href="https://secure.designinghypermediaapis.com/nodes/kpfqfhzadfsn"&gt;&quot;Programming the Media Type.&quot;&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Essentially, this is the only information that&apos;s published about a particular API. What media types it expects. That&apos;s a radical departure from what one is used to. However, it&apos;s essentially accurate. And, in fact, if you recall the canonical example of the web browser, you&apos;ll realize that the only thing it knows about is HTML, CSS, and a few other media types.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; To build an effective client, you must only rely in the media types served, and their definition.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Web&lt;/h3&gt; &lt;p&gt;We have been following the progress on Mozilla&apos;s &lt;a href="https://wiki.mozilla.org/Identity/BrowserID"&gt;BrowserID&lt;/a&gt; project with interest. If you haven&apos;t taken a look yet, you can get a sense of what it&apos;s about from their overview statement. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; This specification, BrowserID, defines a mechanism for websites to request, from the user via her user-agent, a signed assertion of email-address ownership. Web sites can use this mechanism to register users on their first visit and log them back in on their subsequent visits. The trust path for these assertions of email-address ownership is designed to be federated and decentralized: individual domains can certify their own users.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Responsive Design&lt;/h3&gt; &lt;p&gt;&lt;a href="https://twitter.com/#!/tamapugsley"&gt;Tama Pugsley&lt;/a&gt; and &lt;a href="https://twitter.com/#!/andyhovey"&gt;Andrew Hovey&lt;/a&gt; created an awesome tool for checking your site across a variety of devices at the same time. Which is cool. And it&apos;s called &lt;a href="http://www.responsinator.com/"&gt;The Responsinator.&lt;/a&gt; Which is even cooler. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wired.com/epicenter/2012/03/opinion-baio-yahoo-patent-lie/"&gt;How Yahoo Weaponized My Work:&lt;/a&gt; Former Yahoo employee &lt;a href="http://www.twitter.com/waxpancake"&gt;Andy Baio&lt;/a&gt; gives a personal account of his experience watching patents come from his work.&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The scary part is that even the most innocuous patent can be used to crush another’s creativity. One of the patents I co-invented is so abstract, it could not only cover Facebook’s News Feed, but virtually any activity feed. It puts into very sharp focus the trouble with software patents: Purposefully vague wording invites broad interpretation.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Of the ten patents Yahoo says Facebook is infringing on, Josh Constine at Techrunch thinks he&apos;s &lt;a href="http://techcrunch.com/2012/03/15/one-patent-to-fear/"&gt;identified their best chance of success.&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.marco.org/2012/03/12/not-a-curator"&gt;Marco Arment on the &quot;Curator&apos;s Code.&quot;&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The problems with online attribution aren’t due to a lack of syntax: they’re due to the economics and realities of online publishing.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;The interest in the code itself seems to have already died, but this post should be referenced whenever there&apos;s a debate about ethically covering someone&apos;s post. &lt;/p&gt;  &lt;p&gt;Michael Carney picks up where Tara Brown left off last week, with a &lt;a href="http://pandodaily.com/2012/03/12/the-la-tech-scene-finally-moves-out-of-its-parents-basement/"&gt;positive outlook for the LA tech scene.&lt;/a&gt; He&apos;s also included a list of local incubators and accelerators as a resource.&lt;/p&gt;  &lt;h3&gt;Miscellany&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.twitter.com/andrewchen"&gt;Andrew Chen&lt;/a&gt; &lt;a href="http://andrewchenblog.com/2012/03/02/why-your-product-will-never-seem-like-its-good-enough/"&gt;shares a story&lt;/a&gt; from a visit to Pixar that reminds us to take a step back and appreciate our products through the eyes of others. &lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>REST Made Simple, Part 3</title>
        <link href="http://spire.io/posts/rest-made-simple-3.html"/>
        <updated>2012-03-13T08:00:00.000Z</updated>
        <id>http://spire.io/posts/rest-made-simple-3.html</id>
        <content type="html">
          &lt;p&gt;In &lt;a href="/posts/rest-tutorial.html"&gt;Part 1&lt;/a&gt; and &lt;a href="/posts/rest-made-simple-2.html"&gt;Part 2&lt;/a&gt;, we&apos;ve introduced several key ideas:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;The Web is really a massively distributed key-value store, or &lt;em&gt;tuple-space&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;The keys are URLs and the values are &lt;em&gt;resources.&lt;/em&gt;&lt;/li&gt;&lt;li&gt;We can update the tuple-space using &lt;code&gt;methods&lt;/code&gt;: &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, and &lt;code&gt;delete&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;We use &lt;code&gt;post&lt;/code&gt; to send resource-specific requests to a given resource.&lt;/li&gt;&lt;li&gt;Using the right methods makes it easier to support caching.&lt;/li&gt;&lt;li&gt;A given resource may have different formats, or &lt;em&gt;representations&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;Clients specify the representation they prefer to use.&lt;/li&gt;&lt;li&gt;We use headers for this so we can share keys between clients easily. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;So what does having a massively distributed tuple-space buy us? Why did the architects of the Web choose this abstraction in particular?&lt;/p&gt;  &lt;h2&gt;Great For Sharing Documents!&lt;/h2&gt; &lt;p&gt;It&apos;s easy to understand if you remember that the original intent was to share documents. So what we have is a giant, living library. Even better, it&apos;s a library where you can ask for a document in whatever format or language you prefer. (It might not be available that way, but there&apos;s at least a way to ask, and a way for the document&apos;s owner to give you what you asked for.) The owner of a document can update it, add new formats, and so on. Because the URLs are format-neutral, it&apos;s easy for people to share documents, too: they just share the URL. Finally, for documents that are really widely read, they can be served easily by intermediaries from cache.&lt;/p&gt;  &lt;p&gt;&lt;img src="/images/trinitycollegelibrarydub.jpeg
" alt="The Web was originally conceived of as a giant library on the Internet."&gt;&lt;/p&gt;  &lt;p&gt;Which brings us to hypertext. We can embed URLs in the documents themselves to link one to another. And this is what we&apos;ve come to know and love as &quot;the Web.&quot; It worked really, really well for documents.&lt;/p&gt;  &lt;h2&gt;Great For Sharing &lt;strike&gt;Documents&lt;/strike&gt; Objects!&lt;/h2&gt; &lt;p&gt;But we can go a bit further than that. In fact, what we really have is an abstraction for dealing with documents. So anything we can model in terms of documents will work just as well. If there was a programming abstraction based on documents, we could integrate all kinds of interesting things into this giant library that everyone is already using. And, in fact, there is such an abstraction: object-oriented programming.&lt;/p&gt;  &lt;p&gt;Replace &quot;document&quot; with &quot;object&quot; above, and you&apos;ve got it. In fact, I&apos;ll just make it easy for you:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; ... the original intent was to share &lt;strong&gt;objects&lt;/strong&gt;. So what we have is a giant, living library. Even better, it&apos;s a library where you can ask for &lt;strong&gt;an object&lt;/strong&gt; in whatever format or language you prefer. (It might not be available that way, but there&apos;s at least a way to ask, and a way for the &lt;strong&gt;object&apos;s&lt;/strong&gt; owner to give you what you asked for.) The owner of &lt;strong&gt;an object&lt;/strong&gt; can update it, add new formats, and so on. Because the URLs are format-neutral, it&apos;s easy for people to share &lt;strong&gt;objects&lt;/strong&gt;, too: they just share the URL. Finally, for &lt;strong&gt;objects&lt;/strong&gt; that are really widely read, they can be served easily by intermediaries from cache.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; Which brings us to hypertext. We can embed URLs in the &lt;strong&gt;objects&lt;/strong&gt; themselves to link one to another ...&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Now We&apos;ve Got it&lt;/h2&gt; &lt;p&gt;Okay! So, the Web gives us programmers a protocol for a giant, distributed key-value store for dealing with objects! We can &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt; and &lt;code&gt;delete&lt;/code&gt; them, we can send them requests with &lt;code&gt;post&lt;/code&gt;, we can share them using the keys, we can deal with different representations for them to help us support different kinds of clients ... if nothing else, that&apos;s pretty interesting.&lt;/p&gt;  &lt;p&gt;Of course, we&apos;ve just replaced one question with another. What is &lt;strong&gt;that&lt;/strong&gt; useful for?&lt;/p&gt;  &lt;h2&gt;Application Flows&lt;/h2&gt; &lt;p&gt;In our &lt;a href="/posts/rest-made-simple-2.html"&gt;last installment&lt;/a&gt;, we said we were going to talk about hypertext. We&apos;ve already mentioned that objects can reference (via hyperlinks) other objects using the keys (URLs), which is useful. And they can obviously also reference &lt;em&gt;documents&lt;/em&gt;, too. We can mix and mingle the two.&lt;/p&gt;  &lt;p&gt;On the face of it, this doesn&apos;t seem to be real earth-shaking. It turns out, though, that we can effectively define entire application flows in terms of links. If we think of application in terms of a state-machine, each object or document we have on the client represents a node of that state machine, with literal links to the other nodes. We follow a link and transfer the next state to the client. This is the infamous &quot;state transfer&quot; of the REST acronym. (We&apos;ve already covered the &quot;REpresentational&quot; part.) &lt;/p&gt;  &lt;h2&gt;Until Next Time ...&lt;/h2&gt; &lt;p&gt;Our giant key-value store allows us to move objects (including documents) around on the network, and to define entire application flows in terms of hyperlinks. That&apos;s pretty cool. But in our next installment we&apos;re going to spend some time looking at the challenges of this approach. In particular, why do so many programmers get frustrated with it? In the real world, we see all kinds of APIs, but rarely do they take full advantage of the architectural model that HTTP offers. Is that a mistake? Or the natural consequence of flaws in HTTP? Or something else entirely? See you then.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: March 9, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-9.html"/>
        <updated>2012-03-09T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-9.html</id>
        <content type="html">
          &lt;p&gt;We&apos;ve been pretty busy with the &lt;a href="http://www.spire.io/posts/version-1-dot-0.html"&gt;release of 1.0&lt;/a&gt; and getting ready for &lt;a href="http://www.spire.io/posts/look-for-spire-at-sxsw.html"&gt;SXSW&lt;/a&gt; this week, but we still found time to get a little reading done. &lt;/p&gt;  &lt;h2&gt;SOLID Design Principles in JavaScript&lt;/h2&gt; &lt;p&gt;&lt;a href="https://twitter.com/#!/derekgreer/"&gt;Derek Greer&lt;/a&gt; has put together an in depth series on SOLID design principles. &lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://freshbrewedcode.com/derekgreer/2011/12/08/solid-javascript-single-responsibility-principle/"&gt;Single Responsibility Principle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshbrewedcode.com/derekgreer/2011/12/19/solid-javascript-the-openclosed-principle/"&gt;The Open/Closed Principle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshbrewedcode.com/derekgreer/2011/12/31/solid-javascript-the-liskov-substitution-principle/"&gt;The Liskov Substitution Principle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshbrewedcode.com/derekgreer/2012/01/08/solid-javascript-the-interface-segregation-principle/"&gt;The Interface Segregation Principle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshbrewedcode.com/derekgreer/2012/01/22/solid-javascript-the-dependency-inversion-principle/"&gt;The Dependency Inversion Principle&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Web&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.twitter.com/adactio"&gt;Jeremy Keith&lt;/a&gt; has a nice &lt;a href="http://adactio.com/journal/5272/"&gt;round up&lt;/a&gt; the ongoing discussion concerning vendor prefixes. &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; The superficial issue is that web developers have been implementing -webkit- properties without then adding the non-prefixed standardised version (and without adding the corresponding prefixes of other vendors). The more fundamental problem is that while vendor prefixes were intended to introduce experimental features until those features became standardised, the reality is that the prefixed version ends up being supported in perpetuity. Nobody is happy about this situation but that’s the unfortunate reality.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Beards&lt;/h2&gt; &lt;p&gt;This has been a rather down week for beards, and &lt;a href="http://www.dailymail.co.uk/news/article-2110272/Psychologists-confirm-Women-REALLY-dont-like-beards.html?ito=feeds-newsxml"&gt;this article&lt;/a&gt; in particular sparked a lively debate in the office between the bearded and the non-bearded. This is a big deal for the staff of a young tech company. Amanda Hess at GOOD understood how distraught some of us would be and posted her &lt;a href="http://www.good.is/post/in-defense-of-beards-debunking-research-that-facial-hair-isn-t-sexy/"&gt;response&lt;/a&gt; at 3:00 A.M. this morning. It&apos;s pretty clear what we&apos;ll be talking about at lunch. &lt;/p&gt;  &lt;h2&gt;Los Angeles&lt;/h2&gt; &lt;p&gt;&lt;a href="http://la.startupweekend.org/"&gt;Startup Weekend LA&lt;/a&gt; was a great event that we were proud to be a part of. It&apos;s always inspiring to see a plan come together, and the participants all had a great energy about them. &lt;a href="http://techzulu.com/"&gt;Techzulu&lt;/a&gt; has posted the &lt;a href="http://www.youtube.com/watch?v=KB7NufrYiJg"&gt;winning presentation&lt;/a&gt; from &lt;a href="http://www.snazzyroom.com/"&gt;Snazzy Room&lt;/a&gt; on YouTube. A final congratulations is in order, as well as another &quot;Thank you&quot; to &lt;a href="http://coloft.com/"&gt;Coloft&lt;/a&gt; for hosting. &lt;/p&gt;  &lt;p&gt;We love working out of Los Angeles and &lt;a href="http://www.twitter.com/tara"&gt;Tara Brown&lt;/a&gt; hits most of the reasons why in her &lt;a href="http://www.forbes.com/sites/tarabrown/2012/03/06/why-los-angeles-will-outpace-silicon-valley-as-the-tech-startup-capital/"&gt;post for Forbes.&lt;/a&gt; A diverse community, great investors, more city to explore... We think it&apos;s pretty great. She also has solid opinions on how we can improve and provides some good resources for getting more involved in tech here. &lt;/p&gt;  &lt;p&gt;Speaking of startups in LA, our fellow Angelenos at &lt;a href="http://blog.factual.com/data-in-a-box-challenge"&gt;Factual&lt;/a&gt; are having a developer contest with Box revolving around associating files with place IDs. &lt;/p&gt;  &lt;h2&gt;Other Miscellany:&lt;/h2&gt; &lt;p&gt;When Beards gets it&apos;s own section, you know that the Miscellaneous links are going to be extra weird. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.mediumdifficulty.com/2012/03/06/how-i-helped-destroy-star-wars-galaxies/"&gt;How I Helped Destroy Star Wars Galaxies&lt;/a&gt; - Patrick Desjardins recounts how he built is own real world empire in Star Wars Galaxies and watched it crumble. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.betabeat.com/2011/12/13/in-which-eben-moglen-like-legit-yells-at-me-for-being-on-facebook/"&gt;In Which Eben Moglen Like, Legit Yells at Me for Having Facebook&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; So you’re using them and every time you tag anything or respond to anything or link to anything, you’re informing on your friends. You’re part of the problem, you’re not part of the answer. Why are you calling up to ask me about the problem you’re creating?&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;There are quite a few Instapaper fans here, so we appreciated Dan W&apos;s tongue in cheek tribute, the &lt;a href="http://www.iamdanw.com/wrote/instapaper-placebo/"&gt;Instapaper Placebo&lt;/a&gt; bookmarklet.  &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; I don’t need a nice mobile app for reading. I don’t need a way to remove all the clutter from the page. I don’t need an online cross-platform bookmark syncing service. I just need a way of offloading all my good intentions.&lt;/p&gt;&lt;/blockquote&gt; 
        </content>
      </entry>
          <entry>
        <title>spire.io at SXSW</title>
        <link href="http://spire.io/posts/look-for-spire-at-sxsw.html"/>
        <updated>2012-03-7T00:00:00.000Z</updated>
        <id>http://spire.io/posts/look-for-spire-at-sxsw.html</id>
        <content type="html">
          &lt;p&gt;The release of &lt;a href="http://www.spire.io/posts/version-1-dot-0.html"&gt;1.0&lt;/a&gt; has been great. We couldn&apos;t have done it without the help of our early beta members and the helpful feedback you provided, and we&apos;d like to meet you in person. We know many of you will be descending on Austin this week, and it just so happens that two of our own developers, Matthew and Daniel, will be at SXSW as well. We&apos;ll be posting updates on their locations via Twitter during the conference to help increase your chances of spotting them in the wild around the convention center, but you&apos;ll be guaranteed to see them at some events we&apos;re involved in.&lt;/p&gt;  &lt;p&gt;Our friends over at &lt;a href="http://www.rocket-space.com/"&gt;Rocket Space&lt;/a&gt; are throwing a  &lt;a href="http://rocketspacesxsw.eventbrite.com/"&gt;&quot;Greatest Hits&quot;&lt;/a&gt; party at the Bing lot on Saturday and Daniel and Matthew will be there from 4 - 6 P.M. They will also be at All Girl Hack Night&apos;s &lt;a href="http://garann.com/allgirlhacknight/2012/"&gt;Dev Brunch&lt;/a&gt;, of which we are &lt;a href="http://www.spire.io/posts/aghn-dev-brunch.html"&gt;proud sponsors&lt;/a&gt;, on Monday from 9 A.M. - 12 P.M. at Frank.&lt;/p&gt;  &lt;p&gt;You can talk to them about any questions you have about the platform, applications you&apos;re excited to build, our newly announced &lt;a href="http://www.spire.io/pricing.html"&gt;pricing plan&lt;/a&gt;, or you can just hint that you&apos;d like them to buy you a beer.&lt;/p&gt;  &lt;p&gt;Hope we see you there!&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Spire at All Girl Hack Night's SXSW Dev Brunch</title>
        <link href="http://spire.io/posts/aghn-dev-brunch.html"/>
        <updated>2012-03-07T00:00:00.000Z</updated>
        <id>http://spire.io/posts/aghn-dev-brunch.html</id>
        <content type="html">
          &lt;p&gt;We are happy to be sponsoring All Girl Hack Night&apos;s &lt;a href="http://garann.com/allgirlhacknight/2012/"&gt;Dev Brunch&lt;/a&gt; at SXSW this year.&lt;/p&gt;  &lt;p&gt;We looked into their group after one of our developers told us Garann was looking for sponsors and were really impressed with the All Girl Hack Night community. Garann is a great talent and a passionate organizer with the goal of bringing more women into the industry and drawing attention to the great women developers who are already out there. We agree that this needs to happen, and after talking to her briefly, sponsoring this event was a no brainer.&lt;/p&gt;  &lt;p&gt;We think it&apos;s great that &lt;a href="http://girldevelopit.com/"&gt;Girl Develop It&lt;/a&gt; is also getting involved. They work to connect women who may just be starting out, and help them develop their technical chops in order to change the developer landscape. We feel a great opportunity for improvement lies in creating strong environments and communities (like hacking groups) that encourage women. The importance of these groups, and others like them, is especially true for individuals who are just starting out, as people encouraged early on in their development careers will be around later to help others.  We love seeing people get excited about coding and we are incredibly happy to play even a small role in the process with these organizations.&lt;/p&gt;  &lt;p&gt;The brunch is for men and women both. It should be a lot of fun, and we hope we see you there.&lt;/p&gt;  &lt;p&gt;The brunch is on March 12, from 9-11 at &lt;a href="http://www.hotdogscoldbeer.com/"&gt;Frank.&lt;/a&gt; Don&apos;t forget to &lt;a href="http://garann.com/allgirlhacknight/2012/"&gt;register.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Frank+Restaurant,+Colorado+Street,+Austin,+TX&amp;aq=0&amp;oq=frank+austin&amp;sll=37.0625,-95.677068&amp;sspn=39.644047,58.974609&amp;ie=UTF8&amp;hq=Frank+Restaurant,+Colorado+Street,+Austin,+TX&amp;ll=30.266978,-97.74454&amp;spn=0.042328,0.057592&amp;t=m&amp;z=14&amp;iwloc=A&amp;cid=9778668060227762106&amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Frank+Restaurant,+Colorado+Street,+Austin,+TX&amp;aq=0&amp;oq=frank+austin&amp;sll=37.0625,-95.677068&amp;sspn=39.644047,58.974609&amp;ie=UTF8&amp;hq=Frank+Restaurant,+Colorado+Street,+Austin,+TX&amp;ll=30.266978,-97.74454&amp;spn=0.042328,0.057592&amp;t=m&amp;z=14&amp;iwloc=A&amp;cid=9778668060227762106" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Version 1.0</title>
        <link href="http://spire.io/posts/version-1-dot-0.html"/>
        <updated>2012-03-07T00:00:00.000Z</updated>
        <id>http://spire.io/posts/version-1-dot-0.html</id>
        <content type="html">
          &lt;p&gt;After months of hard work, spire.io has reached GA!&lt;/p&gt;  &lt;p&gt;No small amount of thanks is due to you, our customers, for all the great feedback we&apos;ve gotten during our Beta. We&apos;ll take a small break, catch our breath, see what&apos;s happening on Reddit, and get cracking on the great stuff we&apos;ll be rolling out in 1.1.&lt;/p&gt;  &lt;p&gt;A few highlights of our 1.0 release:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;. &lt;a href="/docs/index.html"&gt;Documentation&lt;/a&gt; is the key to any API and we take great effort to make ours as clear and complete as possible. If we&apos;ve failed, we urge you to &lt;a href="/contact.html"&gt;contact us directly&lt;/a&gt; with any questions and one of our developers will follow up as soon as humanly possible.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;. We have the &lt;a href="/pricing.html"&gt;largest free plan&lt;/a&gt; in the market because we believe that we&apos;ll be successful if you&apos;re successful. Spending time optimizing your architecture or analyzing messaging prices are &quot;rounding errors&quot; in the process of building a great product.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Innovation&lt;/strong&gt;. From our hypermedia (&lt;a href="http://blog.steveklabnik.com/posts/2012-02-23-rest-is-over"&gt;formerly known as REST&lt;/a&gt;) API to our application of &lt;a href="/posts/web-capabilities.html"&gt;capability security&lt;/a&gt;, we&apos;re proud to have a great engine under the hood. &lt;a href="http://storify.com/dyoder/appropriate-humility"&gt;Innovation is hard&lt;/a&gt; and we are always looking for &lt;a href="https://news.ycombinator.com/item?id=3619311"&gt;feedback&lt;/a&gt; and great ideas.&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;By the way, our mission of helping you build great products goes beyond our code: if we can help you by recommending a particular language or library or service, we&apos;re &lt;a href="http://www.spire.io/posts/reference-docs-with-noc.html"&gt;glad to do it&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: March 2, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-8.html"/>
        <updated>2013-03-02T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-8.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though so get ready to fire up your Instapaper...&lt;/p&gt;  &lt;h2&gt;Node&lt;/h2&gt; &lt;p&gt;&lt;a href="http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/"&gt;Managing Node.js Dependencies with Shrinkwrap&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; ... it&apos;s understood that all software changes incur some risk, and it&apos;s critical to be
 able to manage this risk on your own terms.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;REST&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.infoq.com/news/2012/02/websockets-rest"&gt;WebSockets vs. REST&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;How do WebSockets play into REST?&lt;/p&gt;  &lt;h2&gt;Talks&lt;/h2&gt; &lt;p&gt;&lt;a href="http://pinboard.in/talks/biz.pdf"&gt;The Buiness of Bookmarking&lt;/a&gt; by Maciej Ceglowski of &lt;a href="http://pinboard.in"&gt;Pinboard&lt;/a&gt; (From PDA &apos;12)&lt;/p&gt;  &lt;p&gt;As conference season continues, we&apos;ve been quite pleased by how many presenters are doing a great job of writing up their talks. Slides are great, but many of the best presentations use slides as supplements and leave a lot of gaps for people trying to follow along after the fact.&lt;/p&gt;  &lt;p&gt;Maciej has always been really good about sharing the details behind the business and trying to guide other businesses toward reasonable action that will keep them operating comfortably for an extended period of time.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blowmage.com/2012/03/01/outgrowing-the-cloud"&gt;Outgrowing the Cloud&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Mike Moore&apos;s talk from this year&apos;s Ruby on Ales conference. We had some guys there and it sounds like it was a great event.&lt;/p&gt;  &lt;h2&gt;Mobile&lt;/h2&gt; &lt;p&gt;&lt;a href="http://arstechnica.com/gadgets/news/2012/02/lg-reportedly-building-first-boot2gecko-phone-as-mozilla-preps-app-store.ars"&gt;LG reportedly building first Boot2Gecko phone as Mozilla preps app store&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; B2G pairs Mozilla&apos;s Gecko HTML rendering engine with the Linux kernel. The
 platform&apos;s application stack is built entirely with standards-based HTML and
 JavaScript. Hardware capabilities and other platform features are made
 accessible through JavaScript with a new set of APIs that Mozilla is working to
 standardize.&lt;/p&gt;&lt;/blockquote&gt;  &lt;h2&gt;Miscellany:&lt;/h2&gt; &lt;p&gt;&lt;a href="http://gmancasefile.blogspot.com/2012/01/tsa-fail.html"&gt;Steve Moore&apos;s take down of the TSA&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; TSA’s de facto policy to this point has been to react to the latest thing tried by a terrorist, which is invariably something that Al Qaeda identified as a technique not addressed by current screening. While this narrows Al Qaeda’s options, their list of attack ideas remains long and they are imaginative. Therefore, if TSA continues to react to each and every new thing tried, three things are certain:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Nothing Al Qaeda tries will be caught the first time because it was designed around gaps in TSA security.&lt;/li&gt;&lt;li&gt;It is impossible to eliminate all gaps in airline security.&lt;/li&gt;&lt;li&gt;Airline security screening based on eliminating every vulnerability will therefore fail because it is impossible. But it will by necessity become increasingly onerous and invasive on the travelers.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;  &lt;p&gt;McSweeney&apos;s noted that it took them 11 years to make a Yelp joke and only three to get to &lt;a href="http://www.mcsweeneys.net/articles/welcome-to-the-official-kickstarter-page-for-greece"&gt;Kickstarter.&lt;/a&gt; This is accelerated culture, people. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://vimeo.com/24715531"&gt;Ira Glass on Storytelling&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A short video by Ira Glass on how most people doing creative work start with &quot;good taste&quot; but lack the skills to match that taste, so there are grueling years of disappointing, but increasingly-improving work, is another reminder that failing can be either a road to success or an excuse.&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Changelog: Feb 28, 2012</title>
        <link href="http://spire.io/posts/2012-02-28-changelog.html"/>
        <updated>2012-02-28T00:00:00.000Z</updated>
        <id>http://spire.io/posts/2012-02-28-changelog.html</id>
        <content type="html">
          &lt;h1&gt;We updated the spire.io API&lt;/h1&gt; &lt;p&gt;API 2012-02-28:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;API support for retrieving a subscription by name&lt;/li&gt;&lt;li&gt;More efficient storage and usage of subscriptions created without names&lt;/li&gt;&lt;li&gt;Fixed a bug in the task management system&apos;s ephemeral key generation&lt;/li&gt;&lt;li&gt;Updated documentation to reflect that timestamps are now in microseconds.&lt;/li&gt;&lt;li&gt;Fixed a security flaw in the use of secret keys for
authenticating accounts. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Site 2012-02-28:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;Using the newest version of &lt;a href="https://github.com/spire-io/spire.io.js"&gt;spire.io.js&lt;/a&gt; for all javascript on the main site and the examples.&lt;/li&gt;&lt;li&gt;PushState changes update the title of the page appropriately.&lt;/li&gt;&lt;/ul&gt;
        </content>
      </entry>
          <entry>
        <title>Clever with Capabilities</title>
        <link href="http://spire.io/posts/clever-with-capabilities.html"/>
        <updated>2012-02-28T00:00:00.000Z</updated>
        <id>http://spire.io/posts/clever-with-capabilities.html</id>
        <content type="html">
          &lt;p&gt;The code for this article is &lt;a href="https://github.com/spire-io/spire-capability-server-example"&gt;available on
github&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Spire.io APIs use something called a &lt;em&gt;capability&lt;/em&gt; for authentication and
authorization. (To learn more about capabilities, see our &lt;a href="http://www.spire.io/posts/web-capabilities.html"&gt;previous
post&lt;/a&gt; on the topic.)
Essentially, instead of giving users a session and then checking the user&apos;s
permissions for each action, we give users an encrypted key that is tied
specifically to an action they are allowed to take. For example, with the
&quot;create channel&quot; capability, for the account &quot;alice&quot;, any client that knows
that capability can create as many channels for alice as they want, but can&apos;t
take any other action on alice&apos;s account. This is very different than the
situation where alice&apos;s session key is compromised in a typical application,
and an implementation of the &lt;a href="http://en.wikipedia.org/wiki/Principle_of_least_privilege"&gt;principle of least
privilege&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is an awesome way to manage access both for us the API provider and you
the developer. Let&apos;s walk through a simple example of one way to use the
capabilities provided by Spire.io to manage the access your users have to
different aspects of your app. We&apos;re big fans of node.js at Spire.io, so this
example will use node&apos;s Express web framework to serve up the capabilities to
the client as well as host the site.&lt;/p&gt;  &lt;h2&gt;The Server&lt;/h2&gt; &lt;p&gt;We&apos;ll start with some simple code to initialize the Spire.io library, as well
as initialize variables to hold the subscription and channel resources that
we&apos;ll be sharing with our clients.&lt;/p&gt;  &lt;script src="https://gist.github.com/1720921.js?file=gistfile1.js"&gt;&lt;/script&gt;
 &lt;p&gt;We&apos;re going to have two channels, &lt;code&gt;client-publishable-channel&lt;/code&gt; and
&lt;code&gt;client-subscribable-channel&lt;/code&gt;. I imagine you can guess what capabilities we&apos;ll
be sharing with the client for each.&lt;/p&gt;  &lt;p&gt;Below is the callback we&apos;ll pass in when we connect to Spire.io. We use helper
methods from the Spire.io library to create the channel and subscription and
assign their url and capabilities to the variables we initialized earlier.&lt;/p&gt;  &lt;script src="https://gist.github.com/1721075.js?file=gistfile1.js"&gt;&lt;/script&gt;
 &lt;p&gt;Now here&apos;s the guts of our application - a very simple callback on the channel
that our client will publish to, that does something we don&apos;t want clients to
spoof for each other. In this case, we&apos;re just reversing whatever string we&apos;re
sent.&lt;/p&gt;  &lt;script src="https://gist.github.com/1721093.js?file=gistfile1.txt"&gt;&lt;/script&gt;
 &lt;p&gt;Now we set up our Express app with a single method for discovery. We&apos;ll just
give our clients enough capability to publish to one channel and listen on
another. In this trivial example, everyone who loads the page will be on the
same two channels. In a more serious implementation, you&apos;d probably make
someone authenticate here, and give each user their own channel for publishing,
and depending on the application, either the same server channel (in the case
of e.g. a chat application where everyone is in the same room) or their own
read-only channel.&lt;/p&gt;  &lt;script src="https://gist.github.com/1721108.js?file=gistfile1.js"&gt;&lt;/script&gt;
 &lt;p&gt;Finally, we start our server in a loop that makes sure all our resources have
been created before launching:&lt;/p&gt;  &lt;script src="https://gist.github.com/1721128.js?file=gistfile1.js"&gt;&lt;/script&gt;
 &lt;h2&gt;The Client&lt;/h2&gt; &lt;p&gt;Now that our client has the capabilities, it needs to use them. Below is all the
JavaScript we need. It should be fairly self-explanatory if you&apos;ve read the
&lt;a href="https://github.com/spire-io/spire.io.js/blob/master/README.md"&gt;Spire.io.js README&lt;/a&gt;
 and followed the code above.&lt;/p&gt;  &lt;script src="https://gist.github.com/1721166.js?file=gistfile1.js"&gt;&lt;/script&gt;
 &lt;p&gt;That&apos;s all there is to selectively handing out capabilities with the Spire.io
API using our JavaScript library. Having this kind of granular authorization
for resources opens up a huge array of message-based applications. Obviously
our example is intentionally simplistic, but with only a little more complexity
you can imagine using a collection of read- and write-only channels to support
multiplayer gaming, for example, with a server ensuring movements and actions
are legal before replaying them to clients. (As a matter of fact, we wrote that
sample code back when we were alpha testing the messaging service - who knows,
maybe it will see the light someday).&lt;/p&gt;  &lt;p&gt;We&apos;re really excited about giving application developers flexibility and power
to be really creative on our platform, and capability-based security is only
one part of that. If this has inspired you to build a new kind of app based on
real-time messaging, or if you have questions or comments, please leave them
below or give us a shout on twitter &lt;a href="http://twitter.com/spireio"&gt;@spireio&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Check out &lt;a href="https://github.com/spire-io/spire-capability-server-example"&gt;the code on
github&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;If you want to learn more about capabilities, read &lt;a href="/posts/web-capabilities.html"&gt;our blog post about it&lt;/a&gt;&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Feb 24, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-7.html"/>
        <updated>2012-02-24T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-7.html</id>
        <content type="html">
          &lt;h2&gt;Web&lt;/h2&gt; &lt;p&gt;Mozilla rolls out their brwoserID service, renamed &lt;a href="http://identity.mozilla.com/post/18038609895/introducing-mozilla-persona"&gt;&quot;Persona&quot;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Git for beginners&lt;/h2&gt; &lt;p&gt;We&apos;ve been bringing all our non technical staff up to speed on git, and this interactive &lt;a href="http://ndpsoftware.com/git-cheatsheet.html"&gt;cheat sheet&lt;/a&gt; has been helpful. (via &lt;a href="https://twitter.com/#!/indexzero/status/172557848012795904"&gt;indexzero&lt;/a&gt;) &lt;/p&gt;  &lt;p&gt;Use the cheat sheet and &lt;a href="http://gitimmersion.com/"&gt;Git Immersion&lt;/a&gt; to create a happy git using workforce. &lt;/p&gt;  &lt;h2&gt;Cut Throat Coding&lt;/h2&gt; &lt;p&gt;&lt;a href="http://playswithfire.com/blog/2012/02/19/you-are-not-ruthless-enough/"&gt;You Are Not Ruthless Enough&lt;/a&gt;: Chris Parker on the hazards of an &quot;unclear separation of responsibilities&quot; via &lt;a href="http://log.scifihifi.com/post/17930153109/its-not-just-temporary-now-that-it-works-youre"&gt;Buzz Andersen&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;“This is just temporary. I’ll clean it up in a bit.”&lt;/li&gt;&lt;li&gt;“It was really late in the schedule and this was the fastest thing we could do to 
get the feature working.”&lt;/li&gt;&lt;li&gt;“I tried a bunch of things and this is what seemed to work.”&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;  &lt;h2&gt;DevOps/NoOps&lt;/h2&gt; &lt;p&gt;Andrej Koelewijn on &lt;a href="http://www.andrejkoelewijn.com/wp/2012/02/08/noops-selfservic/"&gt;&quot;self service architecture:&quot;&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Removing project dependencies, collaboration and coordination should be main
 priority for architects. Don’t try to design the whole system. Try to specify 
 modules that can be created independently. The goal should be to get rid of large
 projects, by replacing everything with small projects, that don’t need to 
 coordinate their efforts.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Phil Hollenback - &lt;a href="http://www.hollenback.net/index.php/DevopsIsHereWhetherYouLikeItOrNot"&gt;Devops is Here Whether You Like it or Not&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Virtualizing your neckbeard buys you a few years but that&apos;s it. It certainly 
 doesn&apos;t improve your career skills. If I was hiring a sysadmin right now, I&apos;d ask if
 he has any vps experience. If the candidate said yes, I&apos;d ask how he managed 
 those vpses. If his answer wasn&apos;t puppet or chef or something similar, I&apos;d be 
 pretty suspicious.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Oh, you want more ops debating? Chris Siebenmann has a nice &lt;a href="http://utcc.utoronto.ca/~cks/space/blog/sysadmin/WhatWillKillSysadmin"&gt;response&lt;/a&gt; to Hollenback.&lt;/p&gt;  &lt;h2&gt;Miscellany:&lt;/h2&gt; &lt;p&gt;This &lt;a href="http://www.forbes.com/sites/clareoconnor/2012/02/08/manoj-bhargava-the-mystery-monk-making-billions-with-5-hour-energy/"&gt;article&lt;/a&gt; on the man behind 5 Hour Energy came up at lunch last week, but it didn&apos;t show up in my feed until yesterday. The notion of a monk saying &quot;I&apos;m killing it right now&quot; is funny enough to secure a late appearance in the Reader. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.musicforprogramming.net/"&gt;Music for Programming&lt;/a&gt;: 
A series of mixes intended for listening
while programming to aid concentration
and increase productivity (also compatible
with other activities).&lt;/p&gt;  &lt;p&gt;Jeff Preshing takes a &lt;a href="http://preshing.com/20120208/a-look-back-at-single-threaded-cpu-performance"&gt;Look Back at Single-Threaded CPU Performance.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;James Altucher on the things that hold back his &lt;a href="http://www.jamesaltucher.com/2012/02/how-to-increase-your-productivity-500/"&gt;productivity.&lt;/a&gt;&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Socal Piggies Meetup and More</title>
        <link href="http://spire.io/posts/feb-socal-piggies.html"/>
        <updated>2012-02-24T00:00:00.000Z</updated>
        <id>http://spire.io/posts/feb-socal-piggies.html</id>
        <content type="html">
          &lt;p&gt;&lt;img src="/images/socal-piggies.jpg" alt="so-cal-piggies-at-spire"&gt;&lt;/p&gt;  &lt;p&gt;We had the pleasure of hosting &lt;a href="http://www.meetup.com/socalpython/events/52495342/"&gt;SoCal Piggies&lt;/a&gt;&apos; (Python Interest Group) February meetup at our office on Wednesday and we&apos;d like to thank everyone who came out. The members were really active, and &lt;a href="https://twitter.com/#!/craigkerstiens"&gt;Craig Kerstiens&lt;/a&gt; from &lt;a href="http://www.heroku.com/"&gt;Heroku&lt;/a&gt; and &lt;a href="http://www.twitter.com/jtimberman"&gt;Joshua Timberman&lt;/a&gt; from &lt;a href="http://www.opscode.com/"&gt;OpsCode&lt;/a&gt; were both nice enough to travel out here to present. &lt;/p&gt;  &lt;p&gt;If you couldn&apos;t come out, you can listen to Craig&apos;s presentation on the best practices for app development and achieving environment parity &lt;a href="http://soundcloud.com/spireio/greg-kerstiens-socal-piggies"&gt;here&lt;/a&gt;, and Josh&apos;s presentation providing an introduction on Chef and configuration management across all infrastrutcture &lt;a href="http://soundcloud.com/spireio/joshua-timberman-socal-piggies"&gt;here&lt;/a&gt;.  We&apos;ve linked to their slides in the descriptions so you can follow along. &lt;/p&gt;  &lt;p&gt;We&apos;d like to make a final thank you to &lt;a href="http://www.twitter.com/griggheo"&gt;Grig&lt;/a&gt; for organizing the even and &lt;a href="http://www.evite.com"&gt;Evite&lt;/a&gt; for providing the pizza and beer. &lt;/p&gt;  &lt;p&gt;We will be hosting the &lt;a href="http://pyladies.com/"&gt;PyLadies&lt;/a&gt; intermediate Python &lt;a href="http://intermediate-workshop-borderstylo.eventbrite.com/"&gt;workshop&lt;/a&gt; tomorrow, Feb 25, and holding &lt;a href="http://www.meetup.com/Los-Angeles-Hack-Night/"&gt;LA Hack Night&lt;/a&gt; every other Wednesday, starting Feb 29. We&apos;ll be alternating with the good people over at &lt;a href="http://www.carbonfive.com/"&gt;Carbon 5&lt;/a&gt; in Santa Monica.  You can get more details at their &lt;a href="http://www.meetup.com/Hack-Night-at-Carbon-Five-LA/"&gt;meetup page&lt;/a&gt;. &lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Beautiful reference docs with JSDoc and Noc</title>
        <link href="http://spire.io/posts/reference-docs-with-noc.html"/>
        <updated>2012-02-23T08:00:00.000Z</updated>
        <id>http://spire.io/posts/reference-docs-with-noc.html</id>
        <content type="html">
          &lt;h3&gt;Documentation Matters&lt;/h3&gt; &lt;p&gt;When developers evaluate new libraries or tools, documentation is usually the first thing they look at.
If your library has poor documentation, most developers move on without bothering to learn more.&lt;/p&gt;  &lt;p&gt;It doesn&apos;t matter how great the code is, how many tests it has, or how many forks it has on GitHub.
If your code has bad docs, developers are not going to use it.&lt;/p&gt;  &lt;p&gt;As a developer, I know how important documentation is, but I still find myself neglecting it far too often.
For one thing, I put off writing documentation until the very last minute.
But after hours or days or weeks of hacking and bug hunting, writing documentation is usually the last thing on my mind.&lt;/p&gt;  &lt;h3&gt;Inline Documentation&lt;/h3&gt; &lt;p&gt;So when I recently undertook a major refactoring of the &lt;a href="https://github.com/spire-io/spire.io.js"&gt;Spire javascript library&lt;/a&gt;, I wanted to force myself to write good documentation in advance.
I started investigating various tools to convert inline documentation (in the form of code comments) into nice html reference pages.&lt;/p&gt;  &lt;p&gt;The benefit of inline documentation is two-fold.
First, it allows the programmer to write the documentation at the same time as the code; no need to hastily assemble it at the last minute.&lt;/p&gt;  &lt;p&gt;Second, keeping the documentation inside the code makes the code easier for developers to work with.
There is no need to flip back and forth between the docs and the code.
Furthermore, if a developer changes a class&apos;s interface, or a function&apos;s signature, the docs can easily be updated at the same time.&lt;/p&gt;  &lt;h3&gt;First attempt: Docco&lt;/h3&gt; &lt;p&gt;When I started looking for good inline documentation tools, the first one I tried was &lt;a href="http://jashkenas.github.com/docco/"&gt;Docco&lt;/a&gt;.
Docco lets you write Markdown in your comments, and those comments get displayed side-by-side with the code.
The Docco website itself is generated with Docco.
I chose Docco because it supported a lot of languages and made very nice looking docs.&lt;/p&gt;  &lt;p&gt;My first impressions with Docco were great.
I liked being able to structure the documentation however I wanted.
Since I controlled the markdown, I could put headers and subheaders wherever I wanted.
I put lists, embedded code examples, and horizontal rules all over the place, and it was glorious.&lt;/p&gt;  &lt;p&gt;But soon my refactoring project grew, and extended to multiple files and classes, and took on a hierarchy all its own.
Docco doesn&apos;t really support multiple files.
It creates one html page per source file, and if you want to link them, you have to put the links your markdown comments manually.
I found myself spending lots of time linking different parts of the docs, and trying to make my markdown organization mirror the overall project organization.&lt;/p&gt;  &lt;p&gt;Writing documentation had once again become a chore and a time-sink.
I decided to leave Docco in search of something else.&lt;/p&gt;  &lt;h3&gt;Second attempt: JSDoc and Noc&lt;/h3&gt; &lt;p&gt;Now that my project was large, I wanted a tool that could understand the inherent structure in my code.
I didn&apos;t want to have to duplicate that same structure in my comments.
I decided to try JSDoc, which is a comment format for javascript projects.&lt;/p&gt;  &lt;p&gt;JSDoc is based on JavaDoc.
There are a &lt;a href="http://code.google.com/p/jsdoc-toolkit/wiki/TagReference"&gt;bunch of special tags&lt;/a&gt; you put in your comments to designate that a certain function is a constructor, specify what kinds of arguments the function takes, show a code example, and much more.&lt;/p&gt;  &lt;p&gt;It took a while to learn all the tags, but once I did, I found myself eagerly documenting functions before I even wrote them!
I was planning out entire classes, describing the methods, their arguments, and their return values.
Once the docs were in place, writing the actual code was easy because I had already thought through what the code needed to do.&lt;/p&gt;  &lt;p&gt;You can see an example JS file with lots of JSDoc comments &lt;a href="https://github.com/spire-io/spire.io.js/blob/master/lib/spire.io.js"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Soon I had all my code marked up with JSDoc.
I started looking for tools to convert my JSDoc-ified project into html pages.
The most popular tool is &lt;a href="http://code.google.com/p/jsdoc-toolkit/"&gt;jsdoc-toolkit&lt;/a&gt;, but that depends Rhino, which depends on Java, and I didn&apos;t want to introduce Java into our dependencies just for documentation.
I checked out a few JSDoc tools that ran on Node, and ended up settling on a great tool called &lt;a href="https://github.com/francoiscolas/noc"&gt;Noc&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Noc runs jsdoc-toolkit in Node, rather than in Rhino.
Noc is smart about my project&apos;s structure and links classes and files automatically.
It supports the full suite of JSDoc tags, and can use a variety of templates.
Noc comes with the CodeViewer template, which looks nice to me, but others are available.&lt;/p&gt;  &lt;p&gt;You can check out the spire js client docs &lt;a href="http://spire-io.github.com/spire.io.js/
"&gt;here&lt;/a&gt;, and the code and comments used to generate the docs on the &lt;a href="https://github.com/spire-io/spire.io.js"&gt;spire.io.js github&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Web Capabilities: A Better Way To Secure Your Apps</title>
        <link href="http://spire.io/posts/web-capabilities.html"/>
        <updated>2012-02-21T00:00:00.000Z</updated>
        <id>http://spire.io/posts/web-capabilities.html</id>
        <content type="html">
          &lt;p&gt;&lt;a href="http://www.eros-os.org/essays/capintro.html"&gt;Capability security&lt;/a&gt; provides an authorization model that works like keys on a keychain. A given capability provides privileges for accessing a specific object, much like you might have a house key, a car key, and a mailbox key, each of which make it possible to access separate objects.&lt;/p&gt;  &lt;p&gt;&lt;img src="/images/car-keys.jpg" alt="Capabilities are like car keys." title="Capabilities Are Like Car Keys"&gt;&lt;/p&gt;  &lt;p&gt;You can even have capabilities that provide different privileges for the same object. A valet key allows you to get into the car and start the engine, but not open the glove box.&lt;/p&gt;  &lt;h2&gt;Why Capabilities Aren&apos;t Already In Common Use&lt;/h2&gt; &lt;p&gt;Capability security is attractive because of its simplicity. But it&apos;s never been widely adopted in modern operating systems, largely for historical reasons. We&apos;ve carried that over to Web applications even though the architecture of the Web is completely different from that of an operating system. But there&apos;s nothing stopping us from using capability security in Web applications today.&lt;/p&gt;  &lt;h2&gt;A Few Definitions&lt;/h2&gt; &lt;p&gt;A &lt;strong&gt;capability&lt;/strong&gt; is an unforgeable key that references an object and a set of privileges. A &lt;strong&gt;Web capability&lt;/strong&gt;, then, is an unforgeable key that references a &lt;em&gt;resource&lt;/em&gt; and a set of methods (ex: &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, etc.). It&apos;s actually a bit more complex than that in real life, but, conceptually, that&apos;s a reasonable starting point. Finally, a &lt;strong&gt;capability description&lt;/strong&gt; is some representation of the object and privileges referenced by a (Web) capability. &lt;/p&gt;  &lt;h2&gt;Example: Get Messages&lt;/h2&gt; &lt;p&gt;For example, suppose we have a Web capability to allow us to read messages published on the &lt;code&gt;foo&lt;/code&gt; channel. The capability description could be a JSON object:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;{
  url: &quot;http://accounts/acme/channels/foo&quot;,
  methods: [ &quot;GET&quot; ]
}
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;When you want to &lt;code&gt;GET&lt;/code&gt; messages on the &lt;code&gt;foo&lt;/code&gt; channel, you must provide a matching capability. That is, the capability should reference a capability description that looks something like the one above. The capability itself can be in a header or appended as a parameter in the URL. If the capability doesn&apos;t match, you get a 401.&lt;/p&gt;  &lt;h2&gt;Advantages Of Capabilities&lt;/h2&gt; &lt;p&gt;Capabilities offer numerous advantages over typical security models for Web applications.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;They&apos;re simpler to enforce.&lt;/strong&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;That simplicity means the associated code is less bug-prone. Simple things are harder to screw up, and when you screw up security, it&apos;s a different order of screw-up than most other things.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;They&apos;re more efficient.&lt;/strong&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Capabilities can be made &lt;em&gt;self-describing&lt;/em&gt;. That is, we can encrypt the description of a capability and then use that encrypted description as the actual key. To check a capability, all we have to is decrypt it and check the privileges against the request. We can do this with identity-based schemes, but not with specific authorizations. That still requires a reference to external data at some point.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;strong&gt;They&apos;re more flexible.&lt;/strong&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;We can share capabilities, much the way you can give a valet your valet key. And you can share &lt;em&gt;exactly&lt;/em&gt; what you want to share and nothing more because capabilities are so fine-grained. This makes it possible to accommodate collaborative scenarios that would otherwise need to be anticipated in advance and handled explicitly in code.&lt;/p&gt;  &lt;h2&gt;The Principle Of Least Privilege&lt;/h2&gt; &lt;p&gt;The possibility of sharing capabilities means that different clients of an API can be given to different capabilities. Each client can have only those capabilities that they &lt;em&gt;need&lt;/em&gt;. This is very different from what happens with most Web APIs, where access is all-or-nothing.&lt;/p&gt;  &lt;p&gt;With capabilities, each activity supported by a given API (reading my feed, posting an update) has distinct capabilities. I could share only those that an application absolutely needed. This is called the &lt;a href="http://en.wikipedia.org/wiki/Principle_of_least_privilege"&gt;principle of least privilege&lt;/a&gt; and it&apos;s an important advantage that capabilities provide.&lt;/p&gt;  &lt;p&gt;We see a variant of this approach with mobile applications today. But the capabilities are managed opaquely by the operating system and applications can&apos;t share capabilities with each other.&lt;/p&gt;  &lt;h2&gt;Using A Web-Capabiliity&lt;/h2&gt; &lt;p&gt;Enough talk! Let&apos;s look at how Web capabilities can be used in practice. 
First, let&apos;s look at a capability can be included in an HTTP request. We&apos;ll be using &lt;a href="http://coffeescript.org/"&gt;CoffeeScript&lt;/a&gt; in the examples that follow.&lt;/p&gt;  &lt;p&gt;In this example, we&apos;re also making use of an open source HTTP library we wrote, &lt;a href="https://github.com/spire-io/shred"&gt;Shred&lt;/a&gt;, that runs in both the browser and in the Node.js environment, and makes it easy to make rich HTTP requests - and deal with the responses.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;shred.post
  url: channel.url
  headers:
    content_type: schema[&quot;1.0&quot;].message.mediaType
    accept: schema[&quot;1.0&quot;].message.mediaType
    authorization: &quot;Capability #{capabilities[channel.url].post}&quot;
  content:
    content: &quot;Hello, World!&quot;
  on: 
    201: (response) -&gt;
      // we get back the message we publish
      assert.equal response.content.data.content,&quot;Hello, World!&quot;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Basically, what we&apos;re doing here is sending a request that says &quot;please post the &apos;Hello, World!&apos; message to this channel.&quot; We have a &lt;code&gt;channel&lt;/code&gt; object that provides the URL we want to use. We have a &lt;code&gt;schema&lt;/code&gt; object that has all the media types defined for us. Finally, we have a &lt;code&gt;capabilities&lt;/code&gt; object where we&apos;ve cached capabilities we have for given URL and method combinations.&lt;/p&gt;  &lt;p&gt;What we&apos;re most interested in here is the &lt;code&gt;authorization&lt;/code&gt; header. We&apos;re sending a capability with the request, prefixed with the &lt;code&gt;Capability&lt;/code&gt; scheme, that tells the server that we&apos;re authorized to do this.&lt;/p&gt;  &lt;h2&gt;Checking The Capability&lt;/h2&gt; &lt;p&gt;So what happens on the server? A capability description consists of a resource URL and a list of methods. We could extend this further to include additional information, such as the acceptable media types, but for now let&apos;s keep things simple. First, we want to check the &lt;code&gt;authorization&lt;/code&gt; header.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;[scheme,key] = context.request.headers[&quot;authorization&quot;]?.split(&quot; &quot;)
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;If the &lt;code&gt;scheme&lt;/code&gt; is &lt;code&gt;Capability&lt;/code&gt;, then we know we have a capability key. Later, we want to actually look up the key in Redis. We access Redis via &lt;code&gt;store&lt;/code&gt; object.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;if scheme == &quot;Capability&quot;
  hash = &quot;#{context.account.key}.capabilities&quot;
  store.hget hash, key, (error, capability) -&gt;
    if error || !capability
      context.emit &quot;unauthorized&quot;
    else
      context.workspace.capability = 
        new Capability(JSON.parse(capability))
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;We lookup the key in a Redis hash, scoped by the the account key (which makes it easy for us to revoke all capabilities for an account if necessary). If we don&apos;t find it, for whatever reason, we simply return a 401. We don&apos;t want to give a malicious attacker any additional information here.&lt;/p&gt;  &lt;p&gt;So now we have an object that describes the privileges associated with a given capability. Now, we can match it against the request:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;validFor: (request) -&gt;
  request.url == @url and request.method in @methods
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;If the capability description&apos;s &lt;code&gt;validFor&lt;/code&gt; method returns true for a given task, we go ahead and process the task. If it returns false, we return a 401.&lt;/p&gt;  &lt;h2&gt;Issuing Keys&lt;/h2&gt; &lt;p&gt;Generating keys is straightforward. When we return a resource representation, we generate the associated capability description, store it in Redis, and return the key (that is, the capability) in the header of the response.&lt;/p&gt;  &lt;p&gt;For example, suppose you&apos;ve just created a new channel. Obviously, we want to give you full permissions to do whatever you want with it. So the capability description looks like:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;capability = new Capability
  url: channel.url
  methods: [ &quot;get&quot;, &quot;post&quot;, &quot;delete&quot; ]
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;We don&apos;t allow &lt;code&gt;put&lt;/code&gt; here, because we there is no &lt;code&gt;put&lt;/code&gt; operation for channels.&lt;/p&gt;  &lt;h2&gt;Generating Random Keys&lt;/h2&gt; &lt;p&gt;Next, we generate a key. Here&apos;s our key generation code, using the now-standard Node &lt;code&gt;crypto&lt;/code&gt; library, which in turn uses OpenSSL, and the &lt;code&gt;asn1&lt;/code&gt; module. We generate a string of random bytes, Base64 encode them, and then make sure we get rid of any characters that will mess with URLs, for cases where we want to use a key in a URL.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;ByteEncoding = require(&quot;asn1&quot;).Ber
crypto = require(&quot;crypto&quot;)
# http://en.wikipedia.org/wiki/Base64#URL_applications
safe64 = (str) -&gt;
  str.replace(/\\//g, &quot;_&quot;)
    .replace(/\\+/g, &quot;-&quot;)
    .replace(/[=\\n]/g, &quot;&quot;)
module.exports =
  safe64: safe64
  randomGenerator: (length) -&gt;
    () -&gt;
      safe64( crypto.randomBytes(length).toString(&apos;base64&apos;) )
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Storing Keys&lt;/h2&gt; &lt;p&gt;We store the capability description in Redis, associated with the key:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;hash = &quot;#{account.key}.capabilities&quot;
json = JSON.stringify(capability)
store.hset hash, json, @, (error) -&gt;
  if (error)
    // uh-oh ...
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Returning The Response&lt;/h2&gt; &lt;p&gt;Finally, we construct our response and put any capabilities (the keys, not the descriptions) associated with the response in an HTTP response header. (Actually, at the moment, we return the capabilities with the response bodies, which makes them much less cacheable. But that&apos;s another topic.)&lt;/p&gt;  &lt;h2&gt;Less Than 100 Lines Of Code ...&lt;/h2&gt; &lt;p&gt;And that&apos;s it. Less than 100 lines of code, and this encompasses virtually &lt;strong&gt;all&lt;/strong&gt; of our API security code. Yet it&apos;s actually more secure in many respects than a more typical session-based approach that would have much more code. That&apos;s because it&apos;s usually pretty obvious what capabilities you want to grant based on the context when a resource is first created. For example, if you&apos;ve created a channel, you get a capability for joining it.&lt;/p&gt;  &lt;h2&gt;But Wait, There&apos;s More ...&lt;/h2&gt; &lt;p&gt;There&apos;s a lot more to Web capabilities than I&apos;ve been able to get into in this blog post. Capabilities separate identity and authorization, which is a profound change from typical session-based Web security models. Ultimately, Web capabilities need to take into account not just methods, but possibly query parameters and media types. Self-describing keys introduce additional challenges. There are also implications for HTTP caching. Check back for follow-up blog posts, where we&apos;ll explore these issues. &lt;/p&gt;  &lt;p&gt;In the meantime, hit us up in the comments with your thoughts. Are Web capabilities something you&apos;d consider in your Web applications?&lt;/p&gt;  &lt;p&gt;UPDATE: Got two great links on other similar efforts. I wasn&apos;t aware of these, but I&apos;m looking forward to studying them and see how they&apos;ve addressed some of the challenges of doing capabilities on the Web.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;There&apos;s &lt;a href="http://waterken.sourceforge.net/web-key/"&gt;Waterken&apos;s notion of &quot;web-keys&quot;&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Google has a &lt;a href="http://code.google.com/p/google-caja/
"&gt;secure component model for Web apps called Caja&lt;/a&gt; that uses object capabilities. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;We&apos;ll keep adding to this list as people give us more feedback. Thanks!&lt;/p&gt;  &lt;p&gt;If you want to see capabilities in action, check &lt;a href="/posts/clever-with-capabilities.html"&gt;this example&lt;/a&gt;&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Feb 17, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-6.html"/>
        <updated>2012-02-17T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-6.html</id>
        <content type="html">
          &lt;h2&gt;Security&lt;/h2&gt; &lt;p&gt;Nadia Heninger &lt;a href="https://freedom-to-tinker.com/blog/nadiah/new-research-theres-no-need-panic-over-factorable-keys-just-mind-your-ps-and-qs"&gt;on factorable keys.&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; We have been able to remotely compromise about 0.4% of all the [7 million 
 tested] public keys used for SSL web site security. The keys we were able to 
 compromise were generated incorrectly--using predictable &quot;random&quot; numbers 
 that were sometimes repeated. There were two kinds of problems: keys that were
 generated with predictable randomness, and a subset of these, where the lack of
 randomness allows a remote attacker to efficiently factor the public key and 
 obtain the private key.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;And another &lt;a href="http://goodenoughsecurity.blogspot.com/2012/02/we-are-998-in-defense-of-rsa.html"&gt;good response&lt;/a&gt; from David Wachtfogel&lt;/p&gt;  &lt;p&gt;Apple announced an &lt;a href="http://www.theverge.com/2012/2/15/2800338/ios-explicit-permission-address-book-update"&gt;update for iOS&lt;/a&gt; requiring user permission in order for apps to access the address book. This follows &lt;a href="http://mclov.in/2012/02/08/path-uploads-your-entire-address-book-to-their-servers.html"&gt;Arun Thampi&apos;s post&lt;/a&gt; which revealed that Path was uploading your address book to their servers, and led others to confirm that &lt;a href="http://venturebeat.com/2012/02/14/iphone-address-book/"&gt;several other&lt;/a&gt; big name companies do as well. &lt;/p&gt;  &lt;h2&gt;Scaling&lt;/h2&gt; &lt;p&gt;A detailed rundown of how Tumblr has transitioned to deal with their scaling issues. 
http://highscalability.com/blog/2012/2/13/tumblr-architecture-15-billion-page-views-a-month-and-harder.html&lt;/p&gt;  &lt;p&gt;Netflix announced &lt;a href="http://techblog.netflix.com/2012/02/announcing-servo.html"&gt;Servo&lt;/a&gt;, an open source tool for exposing and publishing application metrics in Java.&lt;/p&gt;  &lt;p&gt;As &lt;a href="https://twitter.com/#!/getsomerestbook"&gt;@getsomerestbook&lt;/a&gt; points out, you should be using HTTP caching to make sure your API scales. Mark Nottingham has a &lt;a href="http://www.mnot.net/cache_docs/"&gt;nice tutorial&lt;/a&gt; to help you out. &lt;/p&gt;  &lt;h2&gt;Why Monitoring Sucks&lt;/h2&gt; &lt;p&gt; Carlo has been getting pretty into these posts on monitoring. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://solarce.org/2012/02/12/why-monitoring-sucks-or-the-future-is-a-toolbox"&gt;Why Monitoring Sucks, or the Future is Toolbox&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gigaom.com/2012/02/12/why-monitoring-sucks-for-now/"&gt;Why Monitoring Sucks -- For Now&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Fun, Productivity, and Other Miscellany&lt;/h2&gt; &lt;p&gt;&lt;a href="http://waxy.org/"&gt;Andy Baio&lt;/a&gt; (&lt;a href="http://www.twitter.com/waxpancake"&gt;Wax Pancake&lt;/a&gt;) and his nephew made a site for people to &lt;a href="http://playfic.com/learn/"&gt;make and share&lt;/a&gt; text adventure games. 
http://waxy.org/&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ambassadortothecomputers.blogspot.com/"&gt;Jake Donham&lt;/a&gt;&apos;s &lt;a href="http://jaked.org/resume/coqrock.pdf"&gt;High-Assurance Web Programming with Coq Rock!&lt;/a&gt; is probably the funniest thing this list compiler has read all week. (via &lt;a href="https://twitter.com/#!/brixen"&gt;@brixen&lt;/a&gt; and &lt;a href="https://twitter.com/#!/rbxbx"&gt;@rbxbx&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;It sounds strange to say, but we&apos;re a little proud of how few meetings we manage to have.  If you&apos;re looking for a way to make meetings less painful and costly, &lt;a href="http://www.codinghorror.com/blog/2012/02/meetings-where-work-goes-to-die.html"&gt;Jeff Atwood&apos;s tips&lt;/a&gt; will serve you well. &lt;/p&gt;  &lt;p&gt;37signals have a &lt;a href="http://37signals.com/svn/posts/3109-the-mad-dash-to-remove-something-before-the-deadline"&gt;great reminder&lt;/a&gt; that editing yourself becomes more valuable as you approach the finish line. &lt;/p&gt;  &lt;p&gt;POSIX close(2) &lt;a href="http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-broken.html"&gt;is broken&lt;/a&gt;&lt;/p&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Feb 10, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-5.html"/>
        <updated>2012-02-10T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-5.html</id>
        <content type="html">
          &lt;h3&gt;On the Web&lt;/h3&gt; &lt;p&gt;Adobe proposes a &lt;a href="http://blogs.adobe.com/webplatform/2012/01/13/html5-image-progress-events/"&gt;nice spec&lt;/a&gt; for HTML5 image progress events.&lt;/p&gt;  &lt;p&gt;Peter-Paul Koch takes an &lt;a href="http://www.quirksmode.org/blog/archives/2012/02/the_vendor_pref.html"&gt;interesting position&lt;/a&gt; regarding what and who we call &quot;WebKit&quot; vendors and the reality facing practical web developers today in his response to CSS WG co-chair Daniel Glazman&apos;s recent call to action.&lt;/p&gt;  &lt;h3&gt;Working without Photoshop&lt;/h3&gt; &lt;p&gt;With the combination of tools like &lt;a href="http://livereload.com/"&gt;livereload&lt;/a&gt; and css compilers like &lt;a href="http://lesscss.org/"&gt;less&lt;/a&gt; and &lt;a href="http://learnboost.github.com/stylus/"&gt;stylus&lt;/a&gt;, designer/ developer hybrids can quickly and easily sketch out basic designs and move to more stylized and polished versions with the joy knowing that they won&apos;t have to go anywhere near photoshop.&lt;/p&gt;  &lt;p&gt;Sadly, sometimes it is unavoidable to open the beastly program. Luckily, &lt;a href="http://meltingice.github.com/psd.js/"&gt;psd.js&lt;/a&gt; is making a great effort to parse PSD files with JavaScript. Now all we need is a way to convert those layer styles into css rules...&lt;/p&gt;  &lt;h3&gt;Security&lt;/h3&gt; &lt;p&gt;Chrome to &lt;a href="http://www.imperialviolet.org/2012/02/05/crlsets.html"&gt;disable&lt;/a&gt; online SSL cert revocation checks:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; While the benefits of online revocation checking are hard to find, the costs are
 clear: online revocation checks are slow and compromise privacy. The median time
 for a successful OCSP check is ~300ms and the mean is nearly a second. This delays
 page loading and discourages sites from using HTTPS. They are also a privacy
 concern because the CA learns the IP address of users and which sites they&apos;re
 visiting.&lt;/p&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;&lt;p&gt; On this basis, we&apos;re currently planning on disabling online revocation checks in a
 future version of Chrome. (There is a class of higher-security certificate, called
 an EV certificate, where we haven&apos;t made a decision about what to do yet.)&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Cryptographers have &lt;a href="http://arstechnica.com/business/news/2012/02/crypto-crack-makes-satellite-phones-vulnerable-to-eavesdropping.ars"&gt;succeeded in cracking encryption schemes&lt;/a&gt; used by a number of satellite phones.&lt;/p&gt;  &lt;h3&gt;Node&lt;/h3&gt; &lt;p&gt;&lt;a href="https://github.com/polotek/procstreams"&gt;procstreams&lt;/a&gt; is a cool way to do &lt;a href="http://www.catonmat.net/blog/nodejs-modules-procstreams/"&gt;UNIX scripting in node&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Lessons from the Physical World&lt;/h3&gt; &lt;p&gt;Jim Koch of Samuel Adams on the relationship between &lt;a href="http://blog.samueladams.com/2012/01/20/the-paradox-of-popularity/"&gt;popularity and quality&lt;/a&gt;. He makes some interesting examples about the quality improving aspects of scale that we often miss while looking for cost savings.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Feb 3, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-4.html"/>
        <updated>2012-02-03T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-4.html</id>
        <content type="html">
          &lt;h6&gt;&lt;a href="http://www.larubyconf.com/"&gt;LA Ruby Conf&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;A few of us are heading out to the LA Ruby conf, come find us if you are headed to beautiful burbank this weekend.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://williamedwardscoder.tumblr.com/post/16516763725/how-i-got-massively-faster-db-with-async-batching
"&gt;How I Got Massively Faster Db With Async Batching&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;A good article on how to get around database bottlenecks. William wrote a custom layer that would take insert and update commands from his clients, batch them into large transactions, and flush them periodically. Apparently online games use this technique as well, and he went from being db-bound to saturating network and db disk i/o with a single evented server.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://blog.mozilla.com/blog/2012/01/31/firefox-adds-powerful-new-developer-tools/"&gt;Firefox Finally Adds Developer Tools&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;Exciting and big news from the Firefox team!&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://blog.identified.com/2012/01/new-identified-research-reveals-engineers-far-more-likely-than-mbas-to-build-and-run-companies.html"&gt;New Identified Research Reveals Engineers Far More Likely than MBAs to Build and Run Companies&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;My suspicions now have a basis in some facts, and there seems to be a trend where MBAs now work for engineers instead of the other way around.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://norbertlindenberg.com/2011/11/ecmascript-globalization-api/index.html"&gt;Internationalization coming to JavaScript&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;The draft is available for review and aims to support collation (string comparison), number formatting, date and time formatting, and lets applications choose the language and tailor the functionality to their needs.&lt;/p&gt;  &lt;p&gt;If you don&apos;t want to wait there is always &lt;a href="http://alexsexton.com/"&gt;Alex Sexton&apos;s&lt;/a&gt; new &lt;a href="http://slexaxton.github.com/Jed/"&gt;jed library&lt;/a&gt;.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://lists.w3.org/Archives/Public/public-webapps/2012JanMar/0464.html"&gt;Installing web apps&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;Tim Berners-Lee vision for web apps as the true write-once, run-anywhere contender.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://www.lukew.com/ff/entry.asp?1487="&gt;Login &amp; Passwords Data&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;Luke W. drops some numbers about how ubiquitous log-ins are today and drive home the point that many of the challenges developers face with password systems are out of their control and hinge on the users themselves. Because the human brain struggles to successfully associate random text with the appropriate object, password recovery should play an important role anywhere a user needs to create an identity online.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://blog.aweissman.com/2012/01/information-does-not-want-to-be-free.html"&gt;Information Does Not Want To Be Free&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;Information (content) does not want to be free. Instead, information wants to be distributed friction-free. Via &lt;a href="http://brooksreview.net"&gt;brooksreview.net&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://antirez.com/post/crypto-dogmas.html"&gt;On Cryptography and Dogmas&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;A great article on from one of the authors of Redis about hashing passwords with SHA1.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://www.psychologytoday.com/articles/200810/confessions-late-bloomer"&gt;Confessions of a Late Bloomer&lt;/a&gt;&lt;/h6&gt; &lt;p&gt;In a startup like spire.io where only two of us studied computer science in undergrad (if we finished at all) and some actually started our journey into tech in our late twenties, its a good reminder that &quot;blooming late&quot; as its own distinct set of advantages and risks which, like everything else worth a dam in this world, can be magnified by working through the 10,000 hour rule as fast, hard and honestly as possible.&lt;/p&gt;  &lt;h6&gt;I leave you with swarms of quadrotors, have a great weekend!&lt;/h6&gt; &lt;iframe width="560" height="315" src="http://www.youtube.com/embed/YQIMGV5vtd4" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Jan 27, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-3.html"/>
        <updated>2012-01-27T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-3.html</id>
        <content type="html">
          &lt;p&gt;At the end of last week a few of us headed out to &lt;a href="http://www.socallinuxexpo.org/scale10x"&gt;SCALE&lt;/a&gt; and just a few days later a few more of us headed out to &lt;a href="http://nodesummit.com/"&gt;NodeSummit&lt;/a&gt;. Don&apos;t worry though, there are still a ton of links.&lt;/p&gt;  &lt;h3&gt;Performance Analysis&lt;/h3&gt; &lt;p&gt;At Both SCALE and NodeSummit engineers from Joyent gave presentations on how to handle analyzing what your apps are doing in production:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://dtrace.org/blogs/brendan/files/2012/01/scale10x-performance.pdf"&gt;Brendan Gregg presented &quot;Performance Analysis:
new tools and concepts from the cloud&quot; at SCALE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.slideshare.net/bcantrill/instrumenting-the-realtime-web-nodejs-in-production"&gt;Bryan Cantrill presented &quot;Instrumenting the real-time web: Running node.js in production&quot; at NodeSummit&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Devops Link Pile&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.cutter.com/2012/01/17/where-is-it-operations-within-devops/"&gt;Where is IT Operations in DevOps&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.lusis.org/blog/2012/01/22/scale10x-recap/"&gt;Lusis/John Vincent&apos;s recap of DevOps Day&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://utcc.utoronto.ca/~cks/space/blog/sysadmin/SysadminDeath"&gt;The Death of Systems Administration&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.reddit.com/2012/01/january-2012-state-of-servers.html"&gt;Reddit moves of EBS to S3&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;JavaScript/ node.js Link Pile&lt;/h3&gt; &lt;p&gt;Don&apos;t understand why it might be a good idea to call callbacks inside of &lt;code&gt;process.nextTick&lt;/code&gt;, check out the post over on howtonode.org on &lt;a href="http://howtonode.org/understanding-process-next-tick"&gt;Understanding process.nextTick()&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/mrwooster"&gt;@mrwooster&lt;/a&gt; posted an excellent tutorial on &lt;a href="http://cach.me/blog/2012/01/Writing-a-Twitter-bot-in-NodeJS/"&gt;writing a twitter bot in node.js&lt;/a&gt;, we might have to adapt it for our IRC bot...&lt;/p&gt;  &lt;h3&gt;Didn&apos;t get a ticket to JSConf?&lt;/h3&gt; &lt;p&gt;O&apos;Reilly is putting on &lt;a href="http://fluentconf.com/fluent2012/public/cfp/206"&gt;Fluent Conference&lt;/a&gt; focusing on &quot;JavaScript and beyond&quot;. If you are worried that the quality wont be up to par make sure to &lt;a href="https://en.oreilly.com/fluent2012/user/account/login/proposer"&gt;submit a proposal&lt;/a&gt;! Call for participation ends 01/31/2012...&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>REST Made Simple, Part 2</title>
        <link href="http://spire.io/posts/rest-made-simple-2.html"/>
        <updated>2012-01-23T08:00:00.000Z</updated>
        <id>http://spire.io/posts/rest-made-simple-2.html</id>
        <content type="html">
          &lt;p&gt;In our last installment of &lt;a href="/posts/rest-tutorial.html"&gt;REST Made Simple&lt;/a&gt;, we introduced the idea that the Web is really a giant key-value store, or tuple-space, with the keys being URLs. And that &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, and &lt;code&gt;delete&lt;/code&gt; are the primary operations that allow us to manipulate this tuple-space, with &lt;code&gt;post&lt;/code&gt; being a catch-all. Finally, we talked about how having operations with well-defined semantics makes it easier to implement features like caching.&lt;/p&gt;  &lt;h2&gt;The Wild, Wild West&lt;/h2&gt; &lt;p&gt;So far, so good. We&apos;ve got clients asking servers to put things into the tuple-space or to get things out of it. And now we run into the first difficulty because we have no way to be sure that one client is putting in the same thing another client is expecting to get out. Remember, this is the Web. It&apos;s a globally distributed tuple-space. We don&apos;t want to make too many assumptions about how it&apos;s going to be used. It&apos;s the Wild, Wild West out there.&lt;/p&gt;  &lt;p&gt;For example, consider the introduction of a new video format. During the time it takes for everyone to switch to the new format, some user-agents will support the new format and some will support only the old one. If we publish a video, we&apos;d like to be able to support both formats. But how can we do this if each key (URL) can have only one value?&lt;/p&gt;  &lt;h2&gt;Sharing Is Caring&lt;/h2&gt; &lt;p&gt;One approach would be to simply have two separate key-value pairs, one for the old format and one for the new one. For example, we could simply add a &lt;code&gt;format&lt;/code&gt; parameter to the URL. Or perhaps we add an extension to the URL corresponding to the version. But what happens if we want to share the URL? We&apos;d have to share two URLs! And then hope people used the one that matched their user-agent software.&lt;/p&gt;  &lt;p&gt;And it gets worse. We might want to support more than just new video formats - streaming, compression, subtitles in different languages, and so on. The number of possible keys that can potentially correspond to our video will grow exponentially. In turn, this makes it impractical to share URLs without providing some sort of guide to using them.&lt;/p&gt;  &lt;h2&gt;A Rose By Any Other Name ...&lt;/h2&gt; &lt;p&gt;Perhaps more importantly, &lt;em&gt;it&apos;s really the same video.&lt;/em&gt; There&apos;s something troubling about a key-value store that has more than one key for the same value. What would be nice would be if we could request the value for the key in a specific format (or language or character set, and so forth), using some sort of standard specification. In other words, have just one URL, but some way for a user-agent to tell the server what format, language, character-set, and so on, that it prefers.&lt;/p&gt;  &lt;h2&gt;Content Negotiation, For The Win&lt;/h2&gt; &lt;p&gt;And, of course, this is exactly what HTTP does. HTTP headers are used to tell the server how the client wants to see the value. (Or, in the case of &lt;code&gt;put&lt;/code&gt;, how it is able to provide the value.) These are standardized (to satisfy the constraint of providing uniform interfaces) and completely distinct from the URL, the key. For example, in a &lt;code&gt;get&lt;/code&gt;, the video format the client wants is provided in the &lt;code&gt;accept&lt;/code&gt; header. Now we can share keys between clients and still give each client what it wants.&lt;/p&gt;  &lt;h2&gt;Representations And Resources&lt;/h2&gt; &lt;p&gt;This is the distinction in REST between &lt;em&gt;representations&lt;/em&gt; and &lt;em&gt;resources&lt;/em&gt;. The resource is the value associated with a given key (URL). But a client must request a specific representation for that resource. This allows us to seamlessly deal with change and complexity in the real world. We can handle everything from languages to character sets to new formats, all without blinking an eye. All thanks to this separation of the resource from its representation. This strategy is known as &lt;em&gt;content-negotiation&lt;/em&gt;, since the user-agent &quot;negotiates&quot; the representation with the server.&lt;/p&gt;  &lt;h2&gt;All Together Now&lt;/h2&gt; &lt;p&gt;Let&apos;s recap. We have a tuple-space. The keys are URLs and the values are resources. We can put things in, take them out, or remove them entirely. Clients, known as user-agents, can access a representation using the key, but also must provide information about which representation(s) they&apos;re using. We don&apos;t want to include information about the representation in the key because then we end up with a bunch of keys for the same thing, which makes it hard to share keys between clients that prefer different representations.&lt;/p&gt;  &lt;h2&gt;What&apos;s In It For You?&lt;/h2&gt; &lt;p&gt;Simple enough? This arrangement - a tuple-space that supports multiple representations for a given value - turns out to work better than any of the many similar prior attempts to provide an &lt;a href="http://en.wikipedia.org/wiki/Remote_procedure_call
"&gt;RPC-based model&lt;/a&gt; for distributed computing. It&apos;s worth studying and, arguably, worth emulating. And since HTTP is so ubiquitous, emulating it is easy: just use HTTP the way it was designed.&lt;/p&gt;  &lt;h2&gt;Same Bat Time, Same Bat Channel&lt;/h2&gt; &lt;p&gt;In our next installment, we&apos;ll take a look at the often-overlooked importance of using hypertext.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Jan 20, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-2.html"/>
        <updated>2012-01-20T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-2.html</id>
        <content type="html">
          &lt;h4&gt;&lt;a href="http://www.spire.io/posts/shred-v0_7.html"&gt;Shred Now Works in the Browser&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;Even though we already talked about this earlier we are still pretty excited. &lt;a href="https://github.com/spire-io/shred"&gt;Shred (our node.js http wrapper)&lt;/a&gt; is now available in the browser via the amazing &lt;a href="https://github.com/substack/node-browserify"&gt;Browserify&lt;/a&gt; project.&lt;/p&gt;  &lt;h4&gt;&lt;a href="http://oli.jp/2012/git-powerup/
"&gt;Git Powerup&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;&lt;a href="http://twitter.com/boblet"&gt;@boblet&lt;/a&gt; walks through how to boost your git workflow using &lt;a href="http://book.git-scm.com/5_customizing_git.html"&gt;aliases&lt;/a&gt; and some fancy &lt;a href="http://book.git-scm.com/3_reviewing_history_-_git_log.html"&gt;log&lt;/a&gt; and &lt;a href="http://book.git-scm.com/3_comparing_commits_-_git_diff.html"&gt;diff&lt;/a&gt; work.&lt;/p&gt;  &lt;h4&gt;Javascript Link Pile&lt;/h4&gt; &lt;p&gt;If your&apos;e just getting started with JavaScript &lt;a href="http://www.metafilter.com/111825/Javascript"&gt;metafilter has a great post&lt;/a&gt; about it with tons of helpful links.&lt;/p&gt;  &lt;p&gt;More advanced JavaScript coders will find the &lt;a href="http://shichuan.github.com/javascript-patterns/"&gt;JavaScript Pattern Collection&lt;/a&gt; useful / fascinating, since it&apos;s a &lt;a href="https://github.com/shichuan/javascript-patterns"&gt;github repo&lt;/a&gt; you can even make additions.&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://harthur.github.com/brain/"&gt;brain JavaScript library&lt;/a&gt; has been around a while but I ran across it again last week, could be useful where you might need to sprinkle a little machine learning on a project. It works in the browser too!&lt;/p&gt;  &lt;h4&gt;&lt;a href="http://www.sopastrike.com/numbers"&gt;Monumental Week for the SOPA Opposition&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;It&apos;s really exciting that all of our efforts online this week helped &lt;a href="http://www.readwriteweb.com/archives/sopa_pipa_votes_indefinitely_delayed.php"&gt;shelve both SOPA and PIPA acts indefinitely&lt;/a&gt;. What is really staggering are the &lt;a href="http://www.sopastrike.com/numbers"&gt;numbers behind the effort&lt;/a&gt;. It was a good week.&lt;/p&gt;  &lt;h4&gt;&lt;a href="http://theamericanscholar.org/solitude-and-leadership/"&gt;Lastly, Make Sure to Take Some Time to Slow Down&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;William Deresiewicz gave &lt;a href="http://theamericanscholar.org/solitude-and-leadership/"&gt;this great lecture&lt;/a&gt; at the United States Military Academy at West Point in October 2009. Lots of really salient points. In an age (and industry) which is fast, we must not forget the value of slowing down, craftsmanship, and concentration. Some things should be fast, other things may be slower but the &quot;clarity of thought&quot; will offset the apparent &quot;slowness.&quot;&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; I used to have students who bragged to me about how fast they wrote their papers. I would tell them that the great German novelist Thomas Mann said that a writer is someone for whom writing is more difficult than it is for other people. The best writers write much more slowly than everyone else, and the better they are, the slower they write. James Joyce wrote Ulysses, the greatest novel of the 20th century, at the rate of about a hundred words a day—half the length of the selection I read you earlier from Heart of Darkness—for seven years. T. S. Eliot, one of the greatest poets our country has ever produced, wrote about 150 pages of poetry over the course of his entire 25-year career. That’s half a page a month. So it is with any other form of thought. You do your best thinking by slowing down and concentrating.&lt;/p&gt;&lt;/blockquote&gt; 
        </content>
      </entry>
          <entry>
        <title>Shred v0.7: Now with browser support!</title>
        <link href="http://spire.io/posts/shred-v0_7.html"/>
        <updated>2012-01-20T08:00:00.000Z</updated>
        <id>http://spire.io/posts/shred-v0_7.html</id>
        <content type="html">
          &lt;p&gt;I&apos;m very pleased to announce the latest release of Shred, a javascript HTTP client library that supports gzip, https, redirects, and proxies.&lt;/p&gt;  &lt;p&gt;Shred was initially written for the Node.js platform, but as of version 0.7, Shred can run in any modern browser as well!&lt;/p&gt;  &lt;h1&gt;How we did it&lt;/h1&gt; &lt;p&gt;We used the awesome &lt;a href="https://github.com/substack/node-browserify"&gt;Browserify&lt;/a&gt; tool to package Shred and all of its dependencies into one handly javascript file.
The equally-awesome &lt;a href="https://github.com/substack/http-browserify"&gt;http-browserify&lt;/a&gt; provides a wrapper around
XHRs that looks just like Node&apos;s http module.&lt;/p&gt;  &lt;p&gt;Using these tools, we got Shred working in the browser almost immediately.
We only ran in to two sticking points.&lt;/p&gt;  &lt;p&gt;The first sticking point was Shred&apos;s requiring of the zlib library, which is used to gunzip responses with a &quot;&lt;code&gt;Content-Encoding: gzip&lt;/code&gt;&quot; header.
This module isn&apos;t available for browsers, but luckily we don&apos;t need it because the browser transparently handles content encodings for us.
That means that all responses that get to Shred in the browser are already gunzipped for us!
Problem solved.&lt;/p&gt;  &lt;p&gt;The second sticking point was https.
Node has two separate modules for handling http and https requests, however the &lt;a href="https://github.com/substack/http-browserify"&gt;http-browserify&lt;/a&gt; library only provides the &quot;http&quot; module.
Luckily, the browser handles all of our SSL difficulties for us, so the &lt;a href="https://github.com/substack/http-browserify"&gt;http-browserify&lt;/a&gt; library is perfectly capable of sending requests to sites over HTTPS.
Thanks to &lt;a href="https://github.com/substack
"&gt;Substack&lt;/a&gt; for quickly reviewing and accepting my patch that makes this possible.&lt;/p&gt;  &lt;h1&gt;How you can benefit&lt;/h1&gt; &lt;p&gt;Now that it can run in Node and in the browser, Shred is a great library to choose when writing code that needs to run client-side and server-side.&lt;/p&gt;  &lt;p&gt;For example, we use Shred in our &lt;a href="https://github.com/spire-io/spire.io.js"&gt;javascript spire.io client library&lt;/a&gt;, which also runs in node and in browsers.
We previously had to use different http libraries in each environment, with slightly different interfaces.
We ended up with a lot of conditional logic in our code that depended on the environment it was running in.&lt;/p&gt;  &lt;p&gt;Switching to Shred significantly simplified our code and our dependencies.&lt;/p&gt;  &lt;h1&gt;How to get it&lt;/h1&gt; &lt;p&gt;To get Shred for the browser, head to the &lt;a href="https://github.com/spire-io/shred"&gt;Shred repo&lt;/a&gt; on Github and download &lt;code&gt;browser/shred.bundle.js&lt;/code&gt; (or the minified version &lt;code&gt;browser/shred.bundle.min.js&lt;/code&gt;).
You only need to source that file in a script tag in your application.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;&lt;script src=&quot;browser/shred.bundle.js&quot; /&gt;
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;&lt;a href="https://github.com/substack/node-browserify"&gt;Browserify&lt;/a&gt; packages Shred into a module, so to use it you must require it like so:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;var Shred = require(&apos;./shred&apos;);
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;To get Shred for Node, as always just do&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;npm install shred
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;and require the module as usual.&lt;/p&gt;  &lt;p&gt;Then instantiate a new Shred cliend and start Shredding!&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;var shred = new Shred();
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;You can learn more about Shred at our &lt;a href="https://github.com/spire-io/shred/wiki"&gt;wiki&lt;/a&gt; or on our &lt;a href="https://github.com/spire-io/shred"&gt;github&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Beta 6 Released</title>
        <link href="http://spire.io/posts/beta-6.html"/>
        <updated>2012-01-18T00:00:00.000Z</updated>
        <id>http://spire.io/posts/beta-6.html</id>
        <content type="html">
          &lt;p&gt;Lots of new features for spire.io with the beta-6 release, here are Some of the highlights:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved CORS support.&lt;/strong&gt; We now validate against the origins you provide in your account settings to minimize the possibility of cross-site request forgeries.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;New parameters for subscription GET requests.&lt;/strong&gt; You can now set a &lt;code&gt;delay&lt;/code&gt; which will be the minimum amount of time (in seconds) the server will wait
before replying (default 0s). You can also set an &lt;code&gt;order_by&lt;/code&gt;, it defaults to &lt;code&gt;desc&lt;/code&gt; (oldest first) or can be set to &lt;code&gt;asc&lt;/code&gt; to get the freshest events.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Paging support for subscriptions.&lt;/strong&gt; You can now return pages of messages for a subscription, for things like status updates.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Named subscriptions, aka &quot;nicks&quot;.&lt;/strong&gt; These allow you to attach identifiers to subscriptions and make them persistent across sessions.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;New channels resource.&lt;/strong&gt; Your account will have a new &lt;code&gt;account.channels&lt;/code&gt; resource associated with it, this is a list of all the channels available to your account.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;New password validations.&lt;/strong&gt; When creating and / or updating accounts you can send a &lt;code&gt;password_confirmation&lt;/code&gt; and it will be checked against the sent &lt;code&gt;password&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Channels and subscription deletion.&lt;/strong&gt; Channels and subscriptions can now be deleted using an http DELETE to the channel or subscription resource you want to zap.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved account management.&lt;/strong&gt; In addition to the origin setting for CORS, we also have password reset.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance improvements.&lt;/strong&gt; We have moved node 0.6.x in this release, which means we picked up some overall performance improvements and much faster gzip support.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;More client libraries&lt;/strong&gt; &lt;a href="https://github.com/spire-io/spire.io.py"&gt;Python&lt;/a&gt;, &lt;a href="https://github.com/spire-io/spire.io.rb"&gt;Ruby&lt;/a&gt;, and &lt;a href="https://github.com/spire-io/spire.io.js
"&gt;Node.js&lt;/a&gt; joins our growing lists of client libraries that make using spire.io a snap for any application. (NeXT up: Objective-C.)&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You can start to expect seeing more of these kinds of posts in the future!&lt;/p&gt;  &lt;p&gt;As always, we want to hear from you! On email, you can reach either &lt;a href="mailto:dan@spire.io"&gt;Dan&lt;/a&gt;, &lt;a href="mailto:jason@spire.io"&gt;Jason&lt;/a&gt;, or &lt;a href="mailto:dhengeveld@spire.io"&gt;The Daniel&lt;/a&gt;. On IRC, we&apos;re &lt;a href="irc://freenode.org/spire"&gt;spire&lt;/a&gt; on freenode. And, of course, &lt;a href="http://twitter.com/#!/spireio"&gt;Twitter&lt;/a&gt;.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Come Find Us at NodeSummit</title>
        <link href="http://spire.io/posts/node-summit-emerging-spoonsor.html"/>
        <updated>2012-01-18T00:00:00.000Z</updated>
        <id>http://spire.io/posts/node-summit-emerging-spoonsor.html</id>
        <content type="html">
          &lt;p&gt;We are really excited to be a sponsor of &lt;a href="http://nodesummit.com/
"&gt;NodeSummit&lt;/a&gt;. We will have a table at the event with the other Emerging Sponsors and there will be several of our nerds roaming the the halls, sitting in on the talks, and hanging around the local wells. Make sure to come find us, we love to chat about spire.io, node.js, REST, APIs, web development, and I could keep going...&lt;/p&gt;  &lt;p&gt;We are really looking forward to &lt;a href="http://nodesummit.com/
"&gt;NodeSummit&lt;/a&gt;, hopefully we will see you there.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Stop SOPA and PIPA</title>
        <link href="http://spire.io/posts/stop-sopa.html"/>
        <updated>2012-01-17T00:00:00.000Z</updated>
        <id>http://spire.io/posts/stop-sopa.html</id>
        <content type="html">
          &lt;iframe src="http://grassroutes.us/campaigns/2/iframe" width="100%" height="700" class="sopa"&gt;&lt;/iframe&gt;
        </content>
      </entry>
          <entry>
        <title>Weekend Reader: Jan 13, 2012</title>
        <link href="http://spire.io/posts/weekend-reader-1.html"/>
        <updated>2012-01-13T00:00:00.000Z</updated>
        <id>http://spire.io/posts/weekend-reader-1.html</id>
        <content type="html">
          &lt;p&gt;A good amount of links fly across our internal IRC channel and team emails, usually these links are directly related to our own development or business interests. We do manage to slip in other kinds of nerdery though so get ready to fire up your Instapaper...&lt;/p&gt;  &lt;p&gt;Heroku CEO Brian Sebastian talks about a topic near and dear to our hearts, &lt;a href="http://blog.programmableweb.com/2012/01/10/heroku-ceo-byron-sebastian-on-api-strategy-and-design/"&gt;API strategy and design&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you haven&apos;t already, you really need to checkout &lt;a href="http://www.12factor.net/"&gt;http://www.12factor.net/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Normally DailyJS posts short explanations and links to javascript libraries, but the &lt;a href="http://dailyjs.com/2012/01/12/style/"&gt;post on programing styles in node is an exception&lt;/a&gt;. If you are a JavaScript developer I recommend you &lt;a href="http://twitter.com/dailyjs"&gt;follow them on twitter&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Mozilla provides some really great advice on &lt;a href="http://hacks.mozilla.org/2011/12/writing-forward-compatible-websites/"&gt;writing forward compatible websites&lt;/a&gt;, really good stuff for people pushing the boundaries of CSS.&lt;/p&gt;  &lt;p&gt;Should you have comments on or off? Matt Gemmell &lt;a href="http://mattgemmell.com/2012/01/07/comments-commentary/"&gt;shares some feedback&lt;/a&gt; regarding his posts about &lt;a href="http://mattgemmell.com/2011/11/29/comments-off/"&gt;turning them off&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Okay, some of us already know &lt;a href="http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/"&gt;the pain of being forced to use your &quot;real name&quot;&lt;/a&gt; so its a breath of fresh air to see Disqus shed some light on &lt;a href="http://disqus.com/research/pseudonyms/"&gt;why people who use pseudonyms are valuable contributors to online communities&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There is a really fascinating article over at the Economist about how &lt;a href="http://www.economist.com/node/21541706"&gt;products can have personalities&lt;/a&gt;, an interesting idea:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; As for why customers picked a particular brand, Dichter concluded that it
 wasn’t exactly the smell or price or look or feel of the soap, but all that
 and something else besides—that is, the &lt;em&gt;gestalt&lt;/em&gt; or “personality” of the
 soap.&lt;/p&gt;&lt;p&gt; This was a big idea. Dichter understood that every product has an image,
 even a “soul”, and is bought not merely for the purpose it serves but for
 the values it seems to embody... Dichter’s message to advertisers was:
 figure out the personality of a product... Soaps could be old or young,
 flirty or conservative. Ivory, Dichter inferred, had a “sombre, utilitarian,
 thoroughly cleansing character”. It was the mother-daughter of soaps,
 whereas a brand like Camay was a seductress....&lt;/p&gt;&lt;/blockquote&gt;
        </content>
      </entry>
          <entry>
        <title>REST Made Simple, Part 1</title>
        <link href="http://spire.io/posts/rest-tutorial.html"/>
        <updated>2012-01-11T08:00:00.000Z</updated>
        <id>http://spire.io/posts/rest-tutorial.html</id>
        <content type="html">
          &lt;p&gt;There&apos;s a lot of angst around REST and most of it tends to obscure the important questions: what is REST? and why is it useful? We wanted to give our take on these questions since we believe our REST-based approach is part of what makes the spire.io API so useful.&lt;/p&gt;  &lt;p&gt;Roy Fielding defined the acronym REST in &lt;a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm"&gt;his dissertation&lt;/a&gt; and so that&apos;s how we&apos;re going to use it. So we&apos;ll definitely talk a lot about hyperlinked data and content-negotiation and so on. But before we do that, let&apos;s start simple.&lt;/p&gt;  &lt;h2&gt;Why REST Matters To You&lt;/h2&gt; &lt;p&gt;The best thing about REST, in a way, is that it describes the architectural patterns (Fielding calls them constraints) behind HTTP. It&apos;s easy to overlook the fact that HTTP is, by far, the world&apos;s most successful protocol for distributed computing. And that&apos;s saying something, considering the decades worth of failed attempts that preceded it. Anyone remember &lt;a href="http://en.wikipedia.org/wiki/Common_Object_Request_Broker_Architecture"&gt;CORBA&lt;/a&gt;? &lt;a href="http://en.wikipedia.org/wiki/Distributed_Component_Object_Model"&gt;DCOM&lt;/a&gt;? &lt;a href="http://en.wikipedia.org/wiki/Distributed_Computing_Environment"&gt;DCE&lt;/a&gt;? A lot of you are shaking your heads - either because you don&apos;t remember ... or because you do. And that&apos;s the point.&lt;/p&gt;  &lt;h2&gt;Yoder&apos;s Tenth Rule&lt;/h2&gt; &lt;p&gt;At any rate, if you&apos;re building distributed applications, which, thanks to the emergence of the Web and mobile technology, almost everyone is, HTTP is worth both study and consideration. Have you ever heard of &lt;a href="http://en.wikipedia.org/wiki/Greenspun&apos;s_tenth_rule"&gt;Greenspun&apos;s Tenth Rule&lt;/a&gt;?&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt; Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;I believe that there&apos;s an analogous rule for HTTP, which states that you&apos;ll end up with an ad-hoc, informally-specified, bug-ridden, slow implementation of half of HTTP if you don&apos;t take advantage of what it already so generously offers you.&lt;/p&gt;  &lt;h2&gt;Learning From What Works&lt;/h2&gt; &lt;p&gt;Let&apos;s take caching as one example. Entire companies have been built around &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html"&gt;HTTP caching&lt;/a&gt;, like &lt;a href="http://www.akamai.com/"&gt;Akamai&lt;/a&gt; and &lt;a href="http://www.edgecast.com/"&gt;EdgeCast&lt;/a&gt; - not to mention open-source caching solutions like &lt;a href="https://www.varnish-cache.org/"&gt;Varnish&lt;/a&gt; or &lt;a href="http://www.squid-cache.org/"&gt;Squid&lt;/a&gt;. That&apos;s some well-designed caching, right there. So if you have caching requirements in your applications, isn&apos;t it at least worth studying how HTTP does caching?&lt;/p&gt;  &lt;p&gt;So let&apos;s take it as a given that HTTP is worth serious study. And since REST describes the architectural principles behind HTTP, that means it would be good to at least understand REST. And maybe once we really understand it, we can make good use of it in our own work.&lt;/p&gt;  &lt;p&gt;After all, it isn&apos;t that hard to take advantage of it, since you&apos;re probably using HTTP in your applications already. So this is really about understanding how to make the most of a protocol you&apos;re already using.&lt;/p&gt;  &lt;h2&gt;The Web Is A Really (Really) Big Tuple-Space&lt;/h2&gt; &lt;p&gt;I believe the easiest place to start is with the concept of a key-value store, or &lt;a href="http://en.wikipedia.org/wiki/Tuple_space"&gt;tuple-space&lt;/a&gt;. Why? Because the Web itself is really a giant tuple space. The keys are URLs and the values are resources. We have three main verbs to manipulate the contents of this hash table: &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, and &lt;code&gt;delete&lt;/code&gt;. We can get the value of a given key with &lt;code&gt;get&lt;/code&gt;, set that value with &lt;code&gt;put&lt;/code&gt;, and remove the key-value pair entirely with &lt;code&gt;delete&lt;/code&gt;.&lt;/p&gt;  &lt;p&gt;Pretty straightforward, right?&lt;/p&gt;  &lt;p&gt;&quot;But he forgot &lt;code&gt;post&lt;/code&gt;!&quot; some of you are grumbling. No, I didn&apos;t. In the real world, not everything can be modeled as a hash table. Sometimes you need to do something like charge someone&apos;s credit card. And for those sorts of things, we have &lt;code&gt;post&lt;/code&gt;. It&apos;s a catch-all method that can be roughly translated as &quot;something that isn&apos;t a get, put, or delete.&quot;&lt;/p&gt;  &lt;h2&gt;Consistent ...&lt;/h2&gt; &lt;p&gt;This simplicity is part of what makes HTTP caching work so well. Our DHT operations are all idempotent, meaning that we can make the same request over and over and our tuple-space will look the same afterwards. Think about it: you can &lt;code&gt;delete&lt;/code&gt; a key over and over and it has the same effect as deleting it once. Or you can &lt;code&gt;put&lt;/code&gt; a key and value over and over and, again, the end result is the same. Same thing with &lt;code&gt;get&lt;/code&gt;. No matter how many times we &lt;code&gt;get&lt;/code&gt; a value, we won&apos;t change it.&lt;/p&gt;  &lt;p&gt;This is what allows me to cache a value. If &lt;code&gt;get&lt;/code&gt; could have side-effects we couldn&apos;t safely cache it. What&apos;s more, it&apos;s important that a cache can easily distinguish between a &lt;code&gt;get&lt;/code&gt; and a &lt;code&gt;put&lt;/code&gt; request. Since these are standard and have well-defined meanings, this is a trivial for caching proxies to do.&lt;/p&gt;  &lt;h2&gt;... Yet Flexible&lt;/h2&gt; &lt;p&gt;Conversely, that&apos;s why &lt;code&gt;post&lt;/code&gt; is it&apos;s own thing. Basically, HTTP gives you a simple and elegant tuple-space model, but doesn&apos;t lock you in when you need to go beyond what that. So you want to use &lt;code&gt;get&lt;/code&gt;, &lt;code&gt;put&lt;/code&gt;, and &lt;code&gt;delete&lt;/code&gt; whenever possible because everyone knows what those mean. But if you can&apos;t, use &lt;code&gt;post&lt;/code&gt;, and no one is allowed to make any assumptions about what &lt;code&gt;post&lt;/code&gt; means. Which is why, for example, it isn&apos;t required that &lt;code&gt;post&lt;/code&gt; is idempotent. After all, if you charge a credit card twice, that&apos;s pretty different than charging it once.&lt;/p&gt;  &lt;h2&gt;What&apos;s In It For You?&lt;/h2&gt; &lt;p&gt;This simple and standardized definition of the basic request methods - that &lt;em&gt;uniformity&lt;/em&gt; - is part of what makes it possible for clients, servers, and - crucially - intermediate proxies - to all work together, even they were all developed independently. That&apos;s why you can, say, drop &lt;a href="https://www.varnish-cache.org/"&gt;Varnish&lt;/a&gt; in front your Web server to improve performance even though you haven&apos;t changed your server code at all. It does require a bit of extra work - you have to make proper use of the relevant HTTP headers - but that&apos;s only a fair trade-off.&lt;/p&gt;  &lt;h2&gt;Same Bat Time, Same Bat Channel!&lt;/h2&gt; &lt;p&gt;In our &lt;a href="/posts/rest-made-simple-2.html
"&gt;next installment&lt;/a&gt;, we&apos;ll build on this idea of a giant tuple-space to delve into content negotiation and hyperlinking, and explore how these patterns can help you build better applications.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Shred v0.6.4</title>
        <link href="http://spire.io/posts/shred-update.html"/>
        <updated>2011-12-13T08:00:00.000Z</updated>
        <id>http://spire.io/posts/shred-update.html</id>
        <content type="html">
          &lt;p&gt;We received a lot of great feedback after our initial release of &lt;a href="https://github.com/spire-io/shred"&gt;Shred&lt;/a&gt;, and we are pleased to announce that a new version has been published to npm.&lt;/p&gt;  &lt;p&gt;One of the most requested features was that we give Shred&apos;s request object an interface that is more in line with the standard Event Emitter interface.  In particular, users wanted to pass in event listeners by calling &lt;code&gt;request.on(...)&lt;/code&gt; rather than passing the listeners in to the request&apos;s construction.&lt;/p&gt;  &lt;p&gt;For example, the old (but still supported) interface works like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;var Shred = require(&apos;shred&apos;);
var shred = new Shred();
var request = shred.get({
  url: &quot;http://api.spire.io&quot;,
  headers: { accept: &quot;application/json&quot; },
  on: {
    200: function(response) {
      console.log(&quot;We got a 200.&quot;);
    },
    success: function(response) {
      console.log(&quot;We got a success, but its not a 200.&quot;);
    },
    response: function(response) {
      console.error(&quot;Got a non-200 response!&quot;);
    }
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Notice that we are passing a hash of event listeners in the &lt;code&gt;on&lt;/code&gt; key in the request&apos;s construction.&lt;/p&gt;  &lt;p&gt;When the response comes back, the request will run the event listeners that correspond with the status code of the response.&lt;/p&gt;  &lt;p&gt;This interface works, but it is different from the usual Event Emitter paradigm, where emitters have an &lt;code&gt;on&lt;/code&gt; method that takes listeners.&lt;/p&gt;  &lt;p&gt;Thanks to a helpful patch from &lt;a href="https://github.com/g23"&gt;g23&lt;/a&gt;, we have now exposed an Event Emitter-like interface on Shred requests.&lt;/p&gt;  &lt;p&gt;The following code does the same thing as the code above:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;var request = shred.get({
  url: &quot;http://api.spire.io&quot;,
  headers: { accept: &quot;application/json&quot; },
}).on(200, function(response) {
  console.log(&quot;We got a 200.&quot;);
}).on(&quot;success&quot;, function(response) {
  console.log(&quot;We got a success, but its not a 200.&quot;);
}).on(&quot;response&quot;, function(response) {
  console.error(&quot;Got a non-200 response!&quot;);
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The chainable &lt;code&gt;on&lt;/code&gt;&apos;s also allow us to have multiple listeners for the same event, which was impossible with the old interface.&lt;/p&gt;  &lt;p&gt;Unlike Event Emitters, you can also pass in a hash to the &lt;code&gt;on&lt;/code&gt; function, which behaves as you would expect.  This is slightly more concise than calling &lt;code&gt;on&lt;/code&gt; multiple times.  The code below does the same thing as the previous two snippets:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;var request = shred.get({
  url: &quot;http://api.spire.io&quot;,
  headers: { accept: &quot;application/json&quot; },
}).on({
  200: function(response) {
    console.log(&quot;We got a 200.&quot;);
  },
  success: function(response) {
    console.log(&quot;We got a success, but its not a 200.&quot;);
  },
  response: function(response) {
    console.error(&quot;Got a non-200 response!&quot;);
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Thus we have three ways to add event listeners to a request:&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;Add them during the construction of the request.&lt;/li&gt;&lt;li&gt;Call &lt;code&gt;request.on&lt;/code&gt; once for each event listener, passing in the listener.&lt;/li&gt;&lt;li&gt;Call &lt;code&gt;request.on&lt;/code&gt; once and pass in a hash of listeners. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Which interface does the Node community prefer?  Let us know in the comments!&lt;/p&gt;  &lt;p&gt;You can learn more about Shred at our &lt;a href="https://github.com/spire-io/shred/wiki"&gt;wiki&lt;/a&gt;, or at our &lt;a href="https://github.com/spire-io/shred"&gt;github&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks to everybody who has tried Shred so far.  We are looking forward to making it even more awesome!&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>Introducing Shred</title>
        <link href="http://spire.io/posts/introducing-shred.html"/>
        <updated>2011-12-07T08:00:00.000Z</updated>
        <id>http://spire.io/posts/introducing-shred.html</id>
        <content type="html">
          &lt;p&gt;We&apos;re very excited to launch our first open source project at &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;, an HTTP client library for &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; called &lt;a href="https://github.com/spire-io/shred"&gt;Shred&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In building &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;, we&apos;ve been inspired to build out a variety of interesting libraries which we hope will see the light of day as open source projects in the near future. Shred is the first of these.&lt;/p&gt;  &lt;p&gt;Here&apos;s a quick example of Shred in action, adapted &lt;a href="https://github.com/spire-io/shred/wiki"&gt;from the wiki&lt;/a&gt;. It&apos;s the resource description request for &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;surf.get({
  url: &quot;http://api.spire.io&quot;,
  headers: {
    accept: &quot;application/json&quot;
  },
  on: {
    200: function(response) {
      // We can treat the response content data
       // as an ordinary Javascript object:
      resources = response.content.data.resources;
      schema = response.content.data.schema[&quot;1.0&quot;];
    },
    response: function(response) {
      console.log(&quot;We got something besides a 200 response!&quot;)
    }
  }
});
&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;You can read all about Shred on &lt;a href="https://github.com/spire-io/shred/wiki"&gt;the wiki&lt;/a&gt; and on &lt;a href="https://github.com/spire-io/shred"&gt;github&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;Why Shred?&lt;/h2&gt; &lt;p&gt;In a a classic example of documentation-driven design, Shred actually was conceived when we were working on the &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt; &lt;a href="/docs/rest-api-tutorial"&gt;API tutorial&lt;/a&gt;. We wanted to make sure the code associated with the mechanics of making an HTTP request didn&apos;t obscure the point of the tutorial, which was focused on the headers and content of the request.&lt;/p&gt;  &lt;p&gt;Writing the tutorial using the native &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; libraries wasn&apos;t doing the trick. There was too much code just associated with the mechanics of streaming the response body, checking the response status, and so on. After several iterations, we ended up with something like the above listing. It seemed to be about as spare as it could get.&lt;/p&gt;  &lt;p&gt;Next, we looked around at the available options for &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; HTTP libraries. The only one that really offered anything like what we&apos;d ended up with was &lt;a href="https://github.com/visionmedia/superagent"&gt;SuperAgent&lt;/a&gt;. The big difference was that it provided a chaining interface and still required control-flow logic based on the response, whereas we preferred an event-based interface.&lt;/p&gt;  &lt;h2&gt;&lt;code&gt;http.get&lt;/code&gt; And Friends&lt;/h2&gt; &lt;p&gt;The &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; core team has done a great job with the core HTTP libraries, including the client library. That may not sound like a big deal, but, remarkably, in an era where the Web is pervasive, it&apos;s still hard to find good HTTP client libraries. This is a big problem when you want to build an API, because it complicates how you do things like load testing or, for that matter, writing tutorials.&lt;/p&gt;  &lt;p&gt;The work the core team did on the HTTP client library gave us a solid foundation that we could build on. We didn&apos;t have to build from scratch. We could just provide a wrapper that made it a bit more convenient. Based on our experience working in other languages, we think the combination of Shred and the core HTTP libraries addresses an important gap in Web development.&lt;/p&gt;  &lt;h2&gt;And They Lived Happily Ever After ...&lt;/h2&gt; &lt;p&gt;We use Shred in our own client library for &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;, &lt;a href="https://github.com/spire-io/spire.io.js"&gt;spire.io.js&lt;/a&gt;. And we use it in our load tests. Shred clients, running on an array of boxes in the cloud, allows us to generate massive amounts of load, to the point where we&apos;re constrained primarily by bandwidth.&lt;/p&gt;  &lt;p&gt;At one point, we thought we had identified a performance bottleneck. But then &lt;a href="http://petalphile.com/#splash
"&gt;Carlo&lt;/a&gt;, our rock star opster, logged into his home box and found our response times were still pretty good. We scratched our heads for awhile before we realized we&apos;d saturated the bandwidth we were being allocated from Amazon. It was kind of a strange moment. Evented I/O is a wonderful thing.&lt;/p&gt;  &lt;p&gt;Shred still has a ways to go. As with all open source authors, our hope is that people will contribute improvements and Shred will go on to have a life of it&apos;s own. But, for now, we&apos;re pretty happy just sending it off for it&apos;s first day of school.&lt;/p&gt; 
        </content>
      </entry>
          <entry>
        <title>spire.io rolls out beta</title>
        <link href="http://spire.io/posts/beta-release.html"/>
        <updated>2011-11-22T08:00:00.000Z</updated>
        <id>http://spire.io/posts/beta-release.html</id>
        <content type="html">
          &lt;p&gt;We are pleased to announce the Beta launch for &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;!&lt;/p&gt;  &lt;h2&gt;What&apos;s &lt;a class="logo" href="/"&gt;spire&lt;span class="grey"&gt;.&lt;/span&gt;&lt;span class="blue"&gt;io&lt;/span&gt;&lt;/a&gt;?&lt;/h2&gt; &lt;p&gt;Our objective is to make it possible for you to build sophisticated Web and mobile applications without having to &lt;em&gt;also&lt;/em&gt; build out all the typical server-side infrastructure to support them.&lt;/p&gt;  &lt;p&gt;We&apos;ve set out to provide you with the best server-side support you could ask for: fast, RESTful, scalable, and secure. That way you can focus on building something great - something no one&apos;s ever done before.&lt;/p&gt;  &lt;h2&gt;We Want To Hear From You&lt;/h2&gt; &lt;p&gt;The Messages service is our first API, and the API itself is, again, still in Beta. So .. what that means is we want to hear from you!&lt;/p&gt;  &lt;p&gt;We&apos;re working on ways to make that easier, but for now we have the old standbys, email and IRC. On email, you can reach either &lt;a href="mailto:dan@spire.io"&gt;Dan&lt;/a&gt; or &lt;a href="mailto:jason@spire.io"&gt;Jason&lt;/a&gt;. On IRC, we&apos;re &lt;a href="irc://freenode.org/spire"&gt;spire&lt;/a&gt; on freenode. And, of course, &lt;a href="http://twitter.com/#!/spireio"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;Getting Started&lt;/h2&gt; &lt;p&gt;For starters, we have a &lt;a href="http://www.spire.io/examples/chat/"&gt;JQuery-based sample chat app&lt;/a&gt; that uses our convenient &lt;a href="https://github.com/spire-io/spire.io.js"&gt;wrapper library&lt;/a&gt;. You can learn about the underlying &lt;a href="http://www.spire.io/docs/tutorials/rest-api.html"&gt;REST interface&lt;/a&gt; and we&apos;d love for you to &lt;a href="http://www.spire.io/register.html
"&gt;kick the tires&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;Coming Soon ...&lt;/h2&gt; &lt;p&gt;We&apos;ll be posting more soon - more libraries, more APIs, and more information about spire.io and the advantages of using it. For now, we&apos;re just excited to be able to share our work with the developer community and learn more about what works and what doesn&apos;t.&lt;/p&gt;  &lt;p&gt;Hope to hear from you soon.&lt;/p&gt; 
        </content>
      </entry>
    </feed>
