<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: friendfeed</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/friendfeed.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2013-10-30T16:27:00+00:00</updated><author><name>Simon Willison</name></author><entry><title>How was FriendFeed's schema less db faster than pure MySQL?</title><link href="https://simonwillison.net/2013/Oct/30/how-was-friendfeeds-schema/#atom-tag" rel="alternate"/><published>2013-10-30T16:27:00+00:00</published><updated>2013-10-30T16:27:00+00:00</updated><id>https://simonwillison.net/2013/Oct/30/how-was-friendfeeds-schema/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/How-was-FriendFeeds-schema-less-db-faster-than-pure-MySQL?no_redirect=1"&gt;How was FriendFeed&amp;#39;s schema less db faster than pure MySQL?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The principle reason they switched to a schemaless DB was to work around the challenges of having to make schemes changes in MySQL, which can lock the table and take hours if bit days to complete in large tables.&lt;/p&gt;

&lt;p&gt;The performance improvement shown in the graph is almost certainly because they almost entirely eliminated joins and complex queries when they switched to the new mechanism. This meant that all it their database traffic was now simple queries, which have much more predictable performance characteristics. MySQL (in fact all databases) are extremely fast at primary key lookups and index scans.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/databases"&gt;databases&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mysql"&gt;mysql&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nosql"&gt;nosql&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rdbms"&gt;rdbms&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="databases"/><category term="friendfeed"/><category term="mysql"/><category term="nosql"/><category term="quora"/><category term="rdbms"/></entry><entry><title>How does FriendFeed work, and what programming languages are used?</title><link href="https://simonwillison.net/2011/Jan/22/how-does-friendfeed-work/#atom-tag" rel="alternate"/><published>2011-01-22T13:19:00+00:00</published><updated>2011-01-22T13:19:00+00:00</updated><id>https://simonwillison.net/2011/Jan/22/how-does-friendfeed-work/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/How-does-FriendFeed-work-and-what-programming-languages-are-used/answer/Simon-Willison"&gt;How does FriendFeed work, and what programming languages are used?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It was written in Python, using the Tornado asynchronous web server (which the FriendFeed team developed themselves). They used their own schemaless NoSQL-style store based on keeping serialized objects in MySQL.&lt;/p&gt;

&lt;span&gt;&lt;a href="http://www.tornadoweb.org/"&gt;http://www.tornadoweb.org/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="http://bret.appspot.com/entry/how-friendfeed-uses-mysql"&gt;http://bret.appspot.com/entry/ho...&lt;/a&gt;&lt;/span&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/web-development"&gt;web-development&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="friendfeed"/><category term="web-development"/><category term="quora"/></entry><entry><title>Quoting Bret Taylor</title><link href="https://simonwillison.net/2009/Sep/11/async/#atom-tag" rel="alternate"/><published>2009-09-11T17:31:57+00:00</published><updated>2009-09-11T17:31:57+00:00</updated><id>https://simonwillison.net/2009/Sep/11/async/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://groups.google.com/group/python-tornado/browse_thread/thread/9a08f5f08cdab108"&gt;&lt;p&gt;We experimented with different async DB approaches, but settled on synchronous at FriendFeed because generally if our DB queries were backlogging our requests, our backends couldn't scale to the load anyway. Things that were slow enough were abstracted to separate backend services which we fetched asynchronously via the async HTTP module.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://groups.google.com/group/python-tornado/browse_thread/thread/9a08f5f08cdab108"&gt;Bret Taylor&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/async"&gt;async&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/bret-taylor"&gt;bret-taylor&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/http"&gt;http&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tornado"&gt;tornado&lt;/a&gt;&lt;/p&gt;



</summary><category term="async"/><category term="bret-taylor"/><category term="friendfeed"/><category term="http"/><category term="tornado"/></entry><entry><title>Tornado Web Server</title><link href="https://simonwillison.net/2009/Sep/10/tornado/#atom-tag" rel="alternate"/><published>2009-09-10T21:32:57+00:00</published><updated>2009-09-10T21:32:57+00:00</updated><id>https://simonwillison.net/2009/Sep/10/tornado/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.tornadoweb.org/"&gt;Tornado Web Server&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
An extremely exciting addition to the Python web landscape, Tornado is the open sourced version of FriendFeed’s custom web stack. It’s a non-blocking (epoll) Python web server designed for handling thousands of simultaneous connections, perfect for building Comet applications. The web framework is cosmetically similar to web.py or App Engine’s webapp but has decorators for writing asynchronous request handlers. The template language uses Django-style syntax but allows you to use full Python expressions. FriendFeed have benchmarked it handling 8,000 requests a second running as four load-balanced processes on a 4 core server.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://bret.appspot.com/entry/tornado-web-server"&gt;Bret Taylor&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bret-taylor"&gt;bret-taylor&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/comet"&gt;comet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/epoll"&gt;epoll&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-app-engine"&gt;google-app-engine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tornado"&gt;tornado&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/webapp"&gt;webapp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/webpy"&gt;webpy&lt;/a&gt;&lt;/p&gt;



</summary><category term="bret-taylor"/><category term="comet"/><category term="django"/><category term="epoll"/><category term="friendfeed"/><category term="google-app-engine"/><category term="python"/><category term="tornado"/><category term="webapp"/><category term="webpy"/></entry><entry><title>Paul Buchheit: Make your site faster and cheaper to operate in one easy step</title><link href="https://simonwillison.net/2009/Apr/17/paul/#atom-tag" rel="alternate"/><published>2009-04-17T17:19:44+00:00</published><updated>2009-04-17T17:19:44+00:00</updated><id>https://simonwillison.net/2009/Apr/17/paul/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://paulbuchheit.blogspot.com/2009/04/make-your-site-faster-and-cheaper-to.html"&gt;Paul Buchheit: Make your site faster and cheaper to operate in one easy step&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Paul promotes gzip encoding using nginx as a proxy, and mentions that FriendFeed use a “custom, epoll-based python server” as their application server. Does that mean that they’re serving their real-time comet feeds directly from Python?


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/comet"&gt;comet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/epoll"&gt;epoll&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gzip"&gt;gzip&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/nginx"&gt;nginx&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/paul-buchheit"&gt;paul-buchheit&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="comet"/><category term="epoll"/><category term="friendfeed"/><category term="gzip"/><category term="nginx"/><category term="paul-buchheit"/><category term="python"/></entry><entry><title>How FriendFeed uses MySQL to store schema-less data</title><link href="https://simonwillison.net/2009/Feb/27/friendfeed/#atom-tag" rel="alternate"/><published>2009-02-27T14:33:35+00:00</published><updated>2009-02-27T14:33:35+00:00</updated><id>https://simonwillison.net/2009/Feb/27/friendfeed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://bret.appspot.com/entry/how-friendfeed-uses-mysql"&gt;How FriendFeed uses MySQL to store schema-less data&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The pain of altering/ adding indexes to tables with 250 million rows was killing their ability to try out new features, so they’ve moved to storing pickled Python objects and manually creating the indexes they need as denormalised two column tables. These can be created and dropped much more easily, and are continually populated by an off-line index building process.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bret-taylor"&gt;bret-taylor&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/databases"&gt;databases&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/mysql"&gt;mysql&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scaling"&gt;scaling&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sharding"&gt;sharding&lt;/a&gt;&lt;/p&gt;



</summary><category term="bret-taylor"/><category term="databases"/><category term="friendfeed"/><category term="mysql"/><category term="python"/><category term="scaling"/><category term="sharding"/></entry><entry><title>Simple Update Protocol: Update</title><link href="https://simonwillison.net/2008/Dec/18/friendfeed/#atom-tag" rel="alternate"/><published>2008-12-18T23:33:46+00:00</published><updated>2008-12-18T23:33:46+00:00</updated><id>https://simonwillison.net/2008/Dec/18/friendfeed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.friendfeed.com/2008/12/simple-update-protocol-update.html"&gt;Simple Update Protocol: Update&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Already implemented by more than five services, each of which now have near-real-time updates in to the FriendFeed syndication engine.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/realtime"&gt;realtime&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sup"&gt;sup&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/syndication"&gt;syndication&lt;/a&gt;&lt;/p&gt;



</summary><category term="friendfeed"/><category term="realtime"/><category term="sup"/><category term="syndication"/></entry><entry><title>FriendFeed launch a real-time API</title><link href="https://simonwillison.net/2008/Oct/22/friendfeed/#atom-tag" rel="alternate"/><published>2008-10-22T14:18:56+00:00</published><updated>2008-10-22T14:18:56+00:00</updated><id>https://simonwillison.net/2008/Oct/22/friendfeed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.friendfeed.com/2008/10/keeping-it-real-with-friendfeed-real_21.html"&gt;FriendFeed launch a real-time API&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
This is huge: JSONP plus long polling Comet, with “everything since X” tokens to ensure you don’t miss anything. This is the first open Comet API I’ve seen anywhere. Combine this with FriendFeed’s regular API (which allows arbitrary message posting) and you’ve got a really powerful tool for hackers who want to experiment with Comet without rigging up their own infrastructure.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/apis"&gt;apis&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/comet"&gt;comet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/json"&gt;json&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jsonp"&gt;jsonp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/realtime"&gt;realtime&lt;/a&gt;&lt;/p&gt;



</summary><category term="apis"/><category term="comet"/><category term="friendfeed"/><category term="javascript"/><category term="json"/><category term="jsonp"/><category term="realtime"/></entry><entry><title>View your FriendFeed in real-time</title><link href="https://simonwillison.net/2008/Oct/16/friendfeed/#atom-tag" rel="alternate"/><published>2008-10-16T14:06:16+00:00</published><updated>2008-10-16T14:06:16+00:00</updated><id>https://simonwillison.net/2008/Oct/16/friendfeed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.friendfeed.com/2008/10/view-your-friendfeed-in-real-time.html"&gt;View your FriendFeed in real-time&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
FriendFeed become the latest site to enable real-time updates using the long-polling variant of Comet. The real-time Web was something of a theme at this year’s FOWA, with talks on message queues, XMPP and scaling Comet at Meebo.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/comet"&gt;comet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/fowa2008"&gt;fowa2008&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/meebo"&gt;meebo&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/realtimeweb"&gt;realtimeweb&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xmpp"&gt;xmpp&lt;/a&gt;&lt;/p&gt;



</summary><category term="comet"/><category term="fowa2008"/><category term="friendfeed"/><category term="meebo"/><category term="realtimeweb"/><category term="xmpp"/></entry><entry><title>FriendFeed Blog: Simple Update Protocol</title><link href="https://simonwillison.net/2008/Aug/28/friendfeed/#atom-tag" rel="alternate"/><published>2008-08-28T12:16:38+00:00</published><updated>2008-08-28T12:16:38+00:00</updated><id>https://simonwillison.net/2008/Aug/28/friendfeed/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.friendfeed.com/2008/08/simple-update-protocol-fetch-updates.html"&gt;FriendFeed Blog: Simple Update Protocol&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
FriendFeed infamously poll RSS feeds on the 43 services they support millions of times an hour in an effort to keep their content as real-time as possible. SUP is a new proposal by FriendFeed for a sort of “master feed” of changes to a site—instead of hitting the Flickr feed for each of their users they would just poll Flickr’s SUP feed every minute or so to find out who had uploaded a new photo, and only retrieve the RSS feed for those users.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/atom"&gt;atom&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/feeds"&gt;feeds&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flickr"&gt;flickr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/polling"&gt;polling&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/rss"&gt;rss&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sup"&gt;sup&lt;/a&gt;&lt;/p&gt;



</summary><category term="atom"/><category term="feeds"/><category term="flickr"/><category term="friendfeed"/><category term="polling"/><category term="rss"/><category term="sup"/></entry><entry><title>Quoting Merlin Mann</title><link href="https://simonwillison.net/2008/Aug/26/merlin/#atom-tag" rel="alternate"/><published>2008-08-26T22:28:25+00:00</published><updated>2008-08-26T22:28:25+00:00</updated><id>https://simonwillison.net/2008/Aug/26/merlin/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://www.43folders.com/2008/08/26/pause-button"&gt;&lt;p&gt;As duplicitous and sad as "fake following" sounds - and let's be honest: the whole idea's pathetic on a number of levels - for a certain kind of user, I can see why there’s a desire for this functionality. Especially on a site like FriendFeed, which has quickly become the platform of choice for the web's least interesting narcissists - and the slow-witted woodland creatures who enjoy grooming their fur - this is a major breakthrough in the makebelieve friendship space. Yes, primate culture may be primitive, but it is not without its evolving needs.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://www.43folders.com/2008/08/26/pause-button"&gt;Merlin Mann&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/fakefollowing"&gt;fakefollowing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/friendfeed"&gt;friendfeed&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/funny"&gt;funny&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/merlinmann"&gt;merlinmann&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/slowwittedwoodlandcreatures"&gt;slowwittedwoodlandcreatures&lt;/a&gt;&lt;/p&gt;



</summary><category term="fakefollowing"/><category term="friendfeed"/><category term="funny"/><category term="merlinmann"/><category term="slowwittedwoodlandcreatures"/></entry></feed>