<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7067202814937947569</id><updated>2010-04-29T15:23:13.055+01:00</updated><title type='text'>Liminal Existence</title><subtitle type='html'></subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://romeda.org/blog/atom.xml'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-6372870411700724925</id><published>2010-04-29T15:23:00.001+01:00</published><updated>2010-04-29T15:23:13.068+01:00</updated><title type='text'>This blog has moved</title><content type='html'>
       This blog is now located at http://blog.romeda.org/.
       You will be automatically redirected in 30 seconds or you may click &lt;a href='http://blog.romeda.org/'&gt;here&lt;/a&gt;.

       For feed subscribers, please update your feed subscriptions to
       http://blog.romeda.org/feeds/posts/default.
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-6372870411700724925?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/6372870411700724925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2010/04/this-blog-has-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6372870411700724925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6372870411700724925'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2010/04/this-blog-has-moved.html' title='This blog has moved'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-912250231816689116</id><published>2010-04-26T23:15:00.002+01:00</published><updated>2010-04-29T13:48:26.020+01:00</updated><title type='text'>Identity</title><content type='html'>&lt;p&gt;The web is facing a serious identity crisis. Many have written about it but, having thought a lot about this problem over the past few years, I can't help but feel that something important has been missed in most discussions.&lt;/p&gt;

&lt;p&gt;Aza Raskin &lt;a href="http://www.azarask.in/blog/post/identity-in-the-browser-firefox/"&gt;cuts to the heart&lt;/a&gt; of the matter:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;&amp;ldquo;Your identity is too important to be owned by any one company.&lt;br/&gt;
Your friends are too important to be owned by any one company.&amp;rdquo;&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;I'll go one step further, and say that &lt;strong&gt;the centralisation of identity is stifling innovation on the web&lt;/strong&gt;. &lt;a href="http://laughingmeme.org/2010/04/25/sunday-morning-thoughts-facebook-graph-api-and-open-graph/"&gt;Kellan recounts&lt;/a&gt; a quote from a friend, on the subject of Facebook's f8 announcements: &amp;ldquo;Well, [Facebook] gave Foursquare a 6 month reprieve.&amp;rdquo; This is not a hopeful view.&lt;/p&gt;

&lt;p&gt;So what's the alternative? What's missing from the conversation? I think it's important to take a view from the perspective of usability; &lt;em&gt;how are &lt;strong&gt;we&lt;/strong&gt; going to &lt;strong&gt;use&lt;/strong&gt; this new conception of identity&lt;/em&gt;? The answer is simple: exactly as we do today. The fundamentals of social networking haven't changed from day one. There's a website, you log on, and you add friends so that you can share content with them. This basic model applies to every successful social internet technology, from email to IM to Friendster to Facebook to FourSquare.&lt;/p&gt;

&lt;h2&gt;Logging On&lt;/h2&gt;

&lt;p&gt;Logging on is easy. Whether it's a password, OpenID, @anywhere, Firefox Contacts, or Facebook Connect, the principle remains the same: the user proves to their server that they are a particular individual. In that sense, any protocols or approaches beyond username and password are just icing on the cake. They're ways to make logging in &lt;em&gt;easier&lt;/em&gt;, to increase conversion rates (at least, in theory), but they don't fundamentally change what we can do on the web.&lt;/p&gt;

&lt;p&gt;So once we've logged on, how do we add friends?&lt;/p&gt;

&lt;h2&gt;Adding Friends&lt;/h2&gt;

&lt;p&gt;This is the part that's missing from the conversation. How does it work today? Well, you have two options: either you find someone's profile page and click "add" (which doesn't work across sites, or if you can't find your friend's profile page), or you find other users on the site by entering their email address. Often the latter approach is achieved by the site opening up your email address book and looking for friends in bulk, but fundamentally it boils down to "Find email address of friend, search users database for that email address, add friend."&lt;/p&gt;

&lt;p&gt;OpenID doesn't help, because I don't even know my OpenID URL, let alone my &lt;em&gt;friends'&lt;/em&gt; OpenID URLs. The "ID" in OpenID is a bit of a misnomer. OAuth doesn't help – Twitter and Facebook use OAuth under the covers for @anywhere and Facebook Connect, but that only helps me, the site using @anywhere/FB Connect, and Twitter and/or Facebook themselves. It also doesn't help us get away from Aza's point, that your identity remains in the hands of a single company.&lt;/p&gt;

&lt;p&gt;The solution, as &lt;a href="http://twitter.com/blaine/status/12762632425"&gt;I said&lt;/a&gt; to &lt;a href="http://twitter.com/timoreilly/status/12760857499"&gt;Tim O'Reilly&lt;/a&gt;, is Webfinger. Indeed, webfinger was born out of struggling with exactly this problem of representing multi-faceted identity on the web in a way that can't be controlled by any one company. The approach is essentially to invert the currently-closed user databases, and put social network affiliation in the hands of the users, &lt;em&gt;in our hands&lt;/em&gt;, all while keeping the &lt;em&gt;user experience&lt;/em&gt; the same as with current and past social software.&lt;/p&gt;

&lt;p&gt;I won't go into the technical details here, but in essence the workflow from a site builder's perspective looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Kate (kate@inktopaper.com) meets Fiona (fiona_z_342@gmail.com) at &lt;a href="http://www.comic-con.org/ape/"&gt;APE&lt;/a&gt;, and the two exchange email (re: webfinger) addresses.&lt;/li&gt;
&lt;li&gt;Kate wants to stay in touch with Fiona, so she logs on to her social network of choice ("ZineSpace"), and enters Fiona's address.&lt;br/&gt;
&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 256px;" src="http://romeda.org/blog/uploaded_images/sketchr-765107.png" border="0" alt="" /&gt;&lt;/li&gt;
&lt;li&gt;ZineSpace supports photos, microblogging, and calendaring, and discovers via a webfinger lookup that Fiona has a photostream at Sketchr, tweets at identi.ca, but doesn't share a calendar. ZineSpace uses PubSubHubbub to send subscribe requests to Sketchr and identi.ca on behalf of kate@inktopaper.com.&lt;/li&gt;
&lt;li&gt;Sketchr and identi.ca look up Kate's webfinger profile, and use her published photo to show the incoming friend/follow request to Fiona.&lt;br/&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 206px;" src="http://romeda.org/blog/uploaded_images/zinespace-765056.png" border="0" alt="" /&gt;&lt;/li&gt;
&lt;li&gt;Fiona uses her identi.ca microblog for work, so she declines that invitation, but approves the friend request on Sketchr, and  adds Kate as a friend (asymmetric follow) on Sketchr.&lt;/li&gt;
&lt;li&gt;Even though she declined the identi.ca request, Fiona wants to keep up with Kate's life, and has a personal Tweetter account that's not published on her public webfinger profile. She logs in there and adds fiona_z_342@gmail.com as a friend.&lt;/li&gt;
&lt;li&gt;Tweetter sends a subscribe request to ZineSpace (discovered via the webfinger profile) on behalf of kate@inktopaper.com. ZineSpace knows that Fiona wants to see Kate's microblog posts, so auto-approves the request and sends a reverse-follow request (which is again automatically approved).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, five things are important to keep in mind when thinking about this process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Shareable Addresses&lt;/strong&gt; are what make this exchange possible. Kate and Fiona can't be reasonably expected to remember all of their various profile URLs, nor can they be expected to remember &lt;em&gt;each other's&lt;/em&gt; profile URLs. Their webfinger addresses act as mnemonics for their &lt;strong&gt;distributed identities&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Webfinger is just a discovery mechanism. &lt;strong&gt;HTTP remains the transport mechanism&lt;/strong&gt; for this approach, which means that everyone can participate.&lt;/li&gt;
&lt;li&gt;We &lt;strong&gt;have not exposed any personal information&lt;/strong&gt; about Kate or Fiona, and more importantly, we haven't exposed any information about Kate or Fiona's relationships. They can do that if they wish (e.g., by linking to a FoAF or XFN profile from their Webfinger profiles), but the &lt;em&gt;approach&lt;/em&gt; doesn't make any assumptions about what information must or must not be shared.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://confusedofcalcutta.com/2010/04/25/of-push-and-pull/"&gt;Subscription = Relationship&lt;/a&gt;&lt;/strong&gt;. The underlying approach doesn't say &lt;em&gt;what kind&lt;/em&gt; of relationship the two are creating, but rather allows protocols or data transports on top of the exchange to do so. Fiona could decide that she doesn't like Kate's sketches, or that Kate posts too much, and simply tell Sketchr to hide Fiona's posts. As far as Kate's concerned, Fiona is still subscribed, and still viewing her photos. Alternatively, Fiona could send an unsubscribe request to Kate, signalling that the relationship no longer exists. &lt;em&gt;The semantics are up to the application developer at either end.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Passwords&lt;/strong&gt; are involved in the exchange. Kate and Fiona don't need to exchange PGP keys, either, or rely on some complicated "Web Of Trust." All they need to do is trust the servers they use (zinespace, sketchr, identi.ca, and their email providers); if they can't do that, then they have bigger problems. This one's really important, because RSS and Atom were meant to be the future of content exchange. &lt;strong&gt;RSS and Atom have completely failed to enable private feeds&lt;/strong&gt;, because they require passwords to do so. That sucks, and webfinger offers a workable solution to this persistent problem.
&lt;/ol&gt;

&lt;h2&gt;Sharing Content&lt;/h2&gt;

&lt;p&gt;Once relationships have been established, sharing content is entirely up to the individuals and sites involved. Obviously, we need common protocols for this, but we can use Atom and PubSubHubbub, some domain-specific protocol (e.g., Portable Contacts/ActivityStreams), or we'll figure it out as we go along. Direct or private messages are just special forms of general distribution content (i.e., the subscriber has asked to receive content from the publisher, whether that content was broadcast or is a directed message).&lt;/p&gt;

&lt;p&gt;There are a lot of things that I haven't covered in this post. The technology is simple, but not trivial, and it is still very new. There aren't yet tools that make this easy (if you'd like to work on building them, &lt;a href="mailto:romeda@gmail.com"&gt;contact me&lt;/a&gt;!)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-912250231816689116?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/912250231816689116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2010/04/identity.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/912250231816689116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/912250231816689116'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2010/04/identity.html' title='Identity'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-3661757932560989342</id><published>2010-01-30T23:56:00.005Z</published><updated>2010-01-31T01:21:30.456Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='node.js'/><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='servers'/><title type='text'>Hot Code Loading in Node.js</title><content type='html'>&lt;p&gt;Reading through &lt;a href="http://feedafever.com/"&gt;Fever&lt;/a&gt; today, &lt;a href="http://metajack.im/2010/01/29/erlangstyle-hot-code-swapping-in-other-languages/"&gt;this post&lt;/a&gt; by Jack Moffitt caught my eye. In it, he discusses a hack to allow a running Python process to &lt;a href="http://www.codexon.com/posts/hot-code-swapping-for-servers-not-written-in-erlang"&gt;dynamically reload code&lt;/a&gt;. While the hack itself, shall we say, lacks subtlety, Jack's post got me thinking. It's true, Erlang's &lt;a href="http://en.wikipedia.org/wiki/Erlang_(programming_language)#Hot_code_loading_and_modules"&gt;hot code loading&lt;/a&gt; is a great feature, enabling Erlang's 99.9999999% uptime claims. It occurred to me that it wouldn't be terribly difficult to implement for node.js' CommonJS-based module loader.&lt;/p&gt;

&lt;p&gt;A few hours (and a tasty home-made Paella later), here's my answer: &lt;a href="http://github.com/blaine/node/tree/hotload"&gt;Hotload node branch&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Umm… What does it do?&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;var requestHandler = require('./myRequestHandler');

process.watchFile('./myRequestHandler', function () {
  module.unCacheModule('./myRequestHandler');
  requestHandler = require('./myRequestHandler');
}

var reqHandlerClosure = function (req, res) {
  requestHandler.handle(req, res);
}

http.createServer(reqHandlerClosure).listen(8000);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, any time you modify &lt;code&gt;myRequestHandler.js&lt;/code&gt;, the above code will notice and replace the local requestHandler with the new code. Any existing requests will continue to use the old code, while any new incoming requests will use the new code. All without shutting down the server, bouncing any requests, prematurely killing any requests, or even relying on an intelligent load balancer.&lt;/p&gt;

&lt;h3&gt;Awesome! How does it work?&lt;/h3&gt;

&lt;p&gt;Basically, all node modules are created as sandboxes, so that as long as you don't use global variables, you can be sure that any modules you write won't stomp on others' code, and vice versa, you can be sure that others' modules won't stomp on your code.&lt;/p&gt;

&lt;p&gt;Modules are loaded by &lt;code&gt;require()&lt;/code&gt;ing them and assigning the return to a local variable, like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var http = require('http');&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The important insight is that the return value of &lt;code&gt;require()&lt;/code&gt; is a self-contained closure. There's no reason it has to be the same each time. Essentially, &lt;code&gt;require(file)&lt;/code&gt; says "read &lt;code&gt;file&lt;/code&gt;, seal it in a protective case, and return that protective case." &lt;code&gt;require()&lt;/code&gt; is smart, though, and caches modules so that multiple attempts to &lt;code&gt;require()&lt;/code&gt; the same module don't waste time (synchronously) reading from disk. Those caches don't get invalidated, though, and even though we can detect when files change, we can't just call &lt;code&gt;require()&lt;/code&gt; again, since the cached version takes precedence.&lt;/p&gt;

&lt;p&gt;There are a few ways to fix this, but the subtleties rapidly complicate matters. If the ultimate goal is to allow an already-executing module (e.g., an http request handler) to continue executing while new code is loaded, then automatic code reloading is out, since changing one module will change them all. In the approach I've taken here, I tried to achieve two goals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make minimal changes to the existing node.js &lt;code&gt;require()&lt;/code&gt; logic.&lt;/li&gt;
&lt;li&gt;Ensure that any &lt;code&gt;require()&lt;/code&gt; calls &lt;em&gt;within&lt;/em&gt; an already-loaded module will return functions corresponding to the pre-hot load version of the code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The latter goal is important because a module expects a specific set of behaviour from the modules on which it depends. Hot loading only works so long as modules have a consistent view of the world.&lt;/p&gt;

&lt;p&gt;To accomplish these goals, all I've done is move the module cache from a global one into the module itself. Reloading is minimised by copying parent's caches into child modules (made fast and efficient thanks to V8's approach to variable handling). Any module can load a new version of any loaded modules by first removing that module from its local cache. This doesn't affect any other modules (including dependent modules), but will ensure that any sub-modules are reloaded, as long as they're not in the parent's cache.&lt;/p&gt;

&lt;p&gt;By taking a relatively conservative approach to module reloading, I believe this is a flexible and powerful approach to hot code reloading. Most server applications have a strongly hierarchical code structure; as long as code reloading is done at the top-level, before many modules have been required, it can be done simply and efficiently.&lt;/p&gt;

&lt;p&gt;While I hope this patch or a modified one will make it into node.js, this approach can be adapted to exist outside of node's core, at the expense of maintaining two &lt;code&gt;require()&lt;/code&gt; implementations.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-3661757932560989342?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/3661757932560989342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2010/01/hot-code-loading-in-nodejs.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3661757932560989342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3661757932560989342'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2010/01/hot-code-loading-in-nodejs.html' title='Hot Code Loading in Node.js'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-2681467766314186530</id><published>2009-05-05T21:49:00.006+01:00</published><updated>2009-05-06T12:53:12.403+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='cookbook'/><category scheme='http://www.blogger.com/atom/ns#' term='phones'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Easy Android</title><content type='html'>&lt;p&gt;Let me start by saying that I'm very impressed with Android, and the ease with which I was able to scratch an itch was impressive. The fact that I'm not locked into Apple's app store world is nice; I don't know what the specific terms are for Google's marketplace (I haven't signed up yet), but frankly I trust them more than I do Apple.&lt;/p&gt;

&lt;p&gt;Full Disclosure: at Social Web Foo, &lt;a href="http://joshua.schachter.org/"&gt;Joshua&lt;/a&gt; very kindly gave me (and about 50 others) a free &lt;a href="http://developer.android.com/"&gt;Android&lt;/a&gt; &lt;a href="http://developer.android.com/guide/developing/device.html"&gt;Dev Phone&lt;/a&gt;. He gave strict instructions to actually write something for it, and I probably wouldn't have bought a dev phone (nor written &amp;lt;shudder&amp;gt; the Java against the emulator), so the fact that I have done so worked out.&lt;/p&gt;

&lt;p&gt;I hadn't written a line of Java before. Shock, horror. It's just as annoying as everyone always said, but developing for Android with Eclipse is pretty straightfoward. The documentation is good. I started with &lt;a href="http://developer.android.com/guide/tutorials/hello-world.html"&gt;the basics&lt;/a&gt;, and pretty quickly moved to example code. Most notably, the NotePad application that comes bundled with the Android SDK.&lt;/p&gt;

&lt;p&gt;Once the Eclipse and the SDK was downloaded and installed, it only took about five minutes to get my first app up and running. Getting a list view of hard-coded data took another ten minutes, and modifying the code to display a different view when one of the items was clicked took about two hours (keep in mind that I was learning Java with the patience of a Ruby programmer here).&lt;/p&gt;

&lt;h2&gt;The Bad&lt;/h2&gt;

&lt;p&gt;Honestly, there's not a lot that I was upset by. Coming from Rails, defining table structures and setters and getters and all the explicit typing is pretty annoying. Cutting and pasting code meant that I had a few mismatched data structure definitions, and the error messages were less than useful, since all that fancy type matching means that when something doesn't match up in your XML configuration file, Java can't tell you where to go to fix it. Figuring out where I had mismatched strings in XML config files easily took another couple of hours, which sucked, but it seems like the kind of thing that you'd get used to. Functional brain damage, I suppose.&lt;/p&gt;

&lt;h2&gt;The Good&lt;/h2&gt;

&lt;p&gt;Android is a developer's platform. The way that content, and well, everything is addressed is &lt;em&gt;fantastic&lt;/em&gt;. There are hooks for &lt;em&gt;everything&lt;/em&gt;, and the tutorials encourage you to do the right thing out of the box. The documentation really only makes sense once you get it, but for the really simple app I've been working on, the examples were more than sufficient to get things going.&lt;/p&gt;

&lt;p&gt;Basically, every data source is addressable through a "&lt;tt&gt;content://&lt;/tt&gt;" URI scheme. What that means is that any application can provide hooks (if they know about your data source) to view, edit, or list bits of data. I expose a set of short recipes (from &lt;a href="http://twitter.com/cookbook"&gt;@cookbook&lt;/a&gt;) at &lt;tt&gt;content://org.romeda.provider.Cookbook/recipes&lt;/tt&gt;. That means that as long as, say, Tweetie knows that there's the provider exists, they could add a hook to allow people to add any tweet as a recipe. It also provides hooks for other applications to know when new recipes are published (or, for example, I could tie into a Twitter provider on the phone and piggyback discovery of new updates to that, rather that running my own polling process), in addition to hooks to view, edit, or any action you can imagine.&lt;/p&gt;

&lt;p&gt;The best thing about this is that the whole system works the same way. You register an "Intent", and the OS lets you know when something in the system is relevant. The simplest (but seriously awesome) example of this is if you want to intercept an outgoing call and rewrite the number (or just make the call over a voip stack, for example). You just register your intent to handle &lt;a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_NEW_OUTGOING_CALL"&gt;ACTION_NEW_OUTGOING_CALL&lt;/a&gt;, and away you go. A simple data passing interface lets you receive and attach data to the messages.&lt;/p&gt;

&lt;p&gt;The other thing that's great about Android that I noticed right away is that the default views are extremely simple to use and customize, and they save their own state. Without writing any special code to remember where a user is in the scroll buffer, and without doing any work to remember which view a user was in (e.g., list or item view, edit, etc), the default behaviour is to remember. It's the embodiment of everything Google's been doing on the web lately &amp;#8212; don't save, ever, because saving is stupid. Either you've published/archived/sent/deleted something, or it's in a draft form. The draft is implicitly persistent, and avoids the user ever &lt;a href="http://twitter.com/blaine/status/1622593046"&gt;losing work&lt;/a&gt;. This is in stark contrast to the iPhone, where Safari's horrible constant reloading of pages boggles the mind, and burns through roaming data minutes like there's no tomorrow.&lt;/p&gt;

&lt;h2&gt;The Code&lt;/h2&gt;

&lt;p&gt;So it's not fancy, and it doesn't even fetch the recipes yet, but I'm posting &lt;a href="http://github.com/blaine/cookbook/tree/master"&gt;the code&lt;/a&gt; here since it's pretty damned simple at this point, and demonstrates making an app with two views. I'll update it as time allows.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-2681467766314186530?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/2681467766314186530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2009/05/easy-android.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2681467766314186530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2681467766314186530'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2009/05/easy-android.html' title='Easy Android'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-1098330781631418127</id><published>2009-05-05T17:05:00.003+01:00</published><updated>2009-05-06T08:59:12.208+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swfoo09'/><category scheme='http://www.blogger.com/atom/ns#' term='messaging'/><category scheme='http://www.blogger.com/atom/ns#' term='webfinger'/><category scheme='http://www.blogger.com/atom/ns#' term='addressing'/><category scheme='http://www.blogger.com/atom/ns#' term='osmosoft'/><category scheme='http://www.blogger.com/atom/ns#' term='cuttlefish'/><title type='text'>Simple Addressing for the Web, Part 1</title><content type='html'>&lt;p&gt;Addressing is important. It's something that &lt;a href="http://en.wikipedia.org/wiki/I-name"&gt;many&lt;/a&gt; &lt;a href="http://www.projectliberty.org/resource_center/specifications/liberty_alliance_id_wsf_2_0_specifications_including_errata_v1_0_updates"&gt;people&lt;/a&gt; &lt;a href="http://www.w3.org/Submission/ws-addressing/"&gt;have&lt;/a&gt; &lt;a href="http://www.eclipse.org/higgins/"&gt;tried&lt;/a&gt; &lt;a href="http://pamelaproject.com/"&gt;to&lt;/a&gt; &lt;a href="http://informationcard.net/"&gt;solve&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm interested in addressing because it's an important piece of web-scale messaging, and of the federated social networks that are an emergent property of verified cross-site communication. In order to communicate with someone, you need to be able to route your communications to them.&lt;/p&gt;

&lt;h2&gt;The URL is the thing. Except when it's not.&lt;/h2&gt;

&lt;p&gt;The URL was supposed to become the way that we negotiated identity. We were supposed to have a "home page," a place on the internet to call our own. It didn't quite work out that way, and at the same time as Geocities is shutting down, we're finally facing the need for a strong conception of identity on the web.&lt;/p&gt;

&lt;p&gt;It goes without saying these days that everything we do, everything we interact with, has an associated URL. I can give you my blog URL so that you can read my posts, or my calendar URL so that you can invite me to events. However, for the vast majority of users, URLs aren't a viable option. Fundamentally, it's a lack of consistency (or, put another way, unbridled diversity) that makes URLs unusable as identity markers. Take the following URLs as a proof-by-example:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;twitter.com/blaine&lt;/li&gt;
  &lt;li&gt;myspace.com/romeda&lt;/li&gt;
  &lt;li&gt;flickr.com/lattice&lt;/li&gt;
  &lt;li&gt;search.twitter.com/search?q=%22Swine+Flu%22+OR+Flu&lt;/li&gt;
  &lt;li&gt;home.myspace.com/index.cfm?fuseaction=user&lt;/li&gt;
  &lt;li&gt;blogger.com/post-create.g?blogID=6135683561277543562&lt;/li&gt;
  &lt;li&gt;amazon.com/gp/pdp/profile/A1GUHSGP27QA4W&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of the above are URLs which I see while interacting with sites on the web. Unlike postal addressing, phone numbers, or email, there's no consistency. The path part of the domain may as well be line noise in the latter four examples. By association, the pattern used by Flickr, MySpace, and Twitter is a fluke. Beyond that, my username doesn't match across the three social networking sites, and as such it's nearly impossible for a friend, relative, or co-worker to guess what my URL is, even given a domain.&lt;/p&gt;

&lt;p&gt;I don't see a way to fix URLs across the web so that we can encourage people to use them as identifiers. OpenID has tried, and the &lt;a href="http://blog.crowdvine.com/2009/04/02/declining-openid-usage/"&gt;results&lt;/a&gt; are nothing short of abysmal.&lt;/p&gt;

&lt;h2&gt;Back to the Future&lt;/h2&gt;

&lt;p&gt;If not URLs, what should our new web addressable identities look like? The simplest answer is "like an email address." They're universally recognizable. Billions of people have email addresses and know how to use them. All the major IM providers have moved towards email-like addresses as identifiers (gone are the integers of ICQ). Most importantly, email addresses are easy to construct and resolve.&lt;/p&gt;

&lt;p&gt;The net result of this line of thought is that instead of &lt;tt&gt;@blaine&lt;/tt&gt; for my Twitter address, I'd be &lt;tt&gt;blaine@twitter.com&lt;/tt&gt;, and on &lt;a href="http://identi.ca/"&gt;Identi.ca&lt;/a&gt; I'd be &lt;tt&gt;blaine@identi.ca&lt;/tt&gt;. I could share my Myspace identity as &lt;tt&gt;romeda@myspace.com&lt;/tt&gt;, and on Facebook I could be &lt;tt&gt;blaine.cook@facebook.com&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The problem is that those addresses conflict with an already-existing namespace, specifically &lt;strong&gt;email&lt;/strong&gt;. Which isn't surprising, but it is problematic. Can you send me an email at &lt;tt&gt;blaine@twitter.com&lt;/tt&gt; or &lt;tt&gt;romeda@myspace.com&lt;/tt&gt;? What happens when you do? Unfortunately, there aren't clear answers for those questions, and while some social networks might choose to make "Social Network Addresses" work as email addresses, it would be an uphill battle to convince all providers to do so.&lt;/p&gt;

&lt;h2&gt;Use What's Already There&lt;/h2&gt;

&lt;p&gt;I've been thinking about this problem a lot lately, and while the approach of re-using email semantics to provide human-readable web addresses/identities is very attractive, the proliferation of addresses (one for each network) and namespace collisions are less than ideal. After having extensive conversations with &lt;a href="http://twitter.com/monadic"&gt;Alexis Richardson&lt;/a&gt; and &lt;a href="http://twitter.com/leastfixedpoint"&gt;Tony Garnock-Jones&lt;/a&gt;, the general approach for discovery became clear to me, but I didn't have a more generally applicable form for the addresses themselves.&lt;/p&gt;

&lt;p&gt;Eventually, talking over the problem with &lt;a href="http://www.johnpanzer.com/"&gt;John Panzer&lt;/a&gt; and &lt;a href="http://brenodemedeiros.com/"&gt;Breno de Medeiros&lt;/a&gt; at &lt;a href="http://swfoo09.pbworks.com/"&gt;Social Web Foo&lt;/a&gt;, the solution was there, blazing as bright as the California Sun; &lt;a href="http://www.google.com/profiles"&gt;Google Profiles&lt;/a&gt; means that Google is now providing links to all my social network profiles. They're also my email provider.&lt;/p&gt;

&lt;p&gt;My email address is &lt;tt&gt;romeda@gmail.com&lt;/tt&gt;. If you transform that to &lt;a href="http://www.google.com/profiles/romeda"&gt;http://www.&lt;strong&gt;google.com&lt;/strong&gt;/profiles/&lt;strong&gt;romeda&lt;/strong&gt;&lt;/a&gt;, you get my profile data, and away we go. Every email provider these days has a website, and Eran's &lt;a href="http://tools.ietf.org/html/draft-hammer-discovery"&gt;LRDD&lt;/a&gt;, new on the scene, provides a discovery mechanism that everyone (i.e., every mail provider, even if they're only hosting static content) can implement in just a few minutes.&lt;/p&gt;

&lt;p&gt;This is an important, exciting transformation. Now, with one identifier, I can share all the social bits of myself to anyone I please.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Where are my photos?&lt;/em&gt; &lt;span style="font-size: 150%;"&gt;romeda@gmail.com&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Where's my calendar?&lt;/em&gt; &lt;span style="font-size: 150%;"&gt;romeda@gmail.com&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What's my phone number?&lt;/em&gt; Look it up with &lt;span style="font-size: 150%;"&gt;romeda@gmail.com&lt;/span&gt;, and I'll give you permission to see it and store it in your address book.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;They're all the same.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If I want to share a different set of social interactions, say, my work identity, I can give my &lt;a href="http://osmosoft.com/"&gt;Osmosoft&lt;/a&gt; or &lt;a href="http://bt.com/"&gt;BT&lt;/a&gt; addresses, blaine@osmosoft.com and blaine.cook@bt.com, respectively. Now just photos of conferences come up, and the calendar that you'll find is my work calendar, not my social calendar.&lt;/p&gt;

&lt;p&gt;Talking about this problem with others unearthed a post last year by &lt;a href="http://brad.livejournal.com/2357444.html"&gt;Brad Fitzpatrick&lt;/a&gt; and &lt;a href="http://eaut.org/"&gt;&lt;abbr title="Email Address to URL Translation"&gt;EAUT&lt;/abbr&gt;&lt;/a&gt;, which were both aimed at solving the OpenID problem, but both take the same approach as the one that I outline here. EAUT seems to have been lost in the swamps of XRDS-Simple, and Brad's post was probably too early to the races, in true Brad style (if you want to know what's coming to the internet in five years, just read his blog posts).&lt;/p&gt;

&lt;p&gt;With a swift and general agreement-in-principle, there's been some very positive movement towards promoting this concept as a way to bring the power of strong identity that email provides to the web. John has an &lt;a href="http://www.abstractioneer.org/2009/04/personal-web-discovery.html"&gt;excellent post&lt;/a&gt; on the subject, and it seems like a name for the project has emerged: &lt;a href="http://code.google.com/p/webfinger/"&gt;WebFinger&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Part Two (coming tomorrow) goes in depth about how this all works on the tech side. &lt;a href="http://www.tbray.org/ongoing/When/200x/2009/04/29/Model-and-Syntax"&gt;Bits on the wire&lt;/a&gt;, as Tim Bray says.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-1098330781631418127?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/1098330781631418127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2009/05/simple-addressing-for-web-part-1.html#comment-form' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1098330781631418127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1098330781631418127'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2009/05/simple-addressing-for-web-part-1.html' title='Simple Addressing for the Web, Part 1'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-1649872776592878945</id><published>2009-04-13T09:54:00.004+01:00</published><updated>2009-04-13T21:04:14.185+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rev=canonical'/><category scheme='http://www.blogger.com/atom/ns#' term='bitly'/><category scheme='http://www.blogger.com/atom/ns#' term='tinyurl'/><category scheme='http://www.blogger.com/atom/ns#' term='appengine'/><title type='text'>Automatic Bootstrapping of rev=canonical</title><content type='html'>&lt;p&gt;Kellan's &lt;a href="http://laughingmeme.org/2009/04/03/url-shortening-hinting/"&gt;work&lt;/a&gt; on &lt;a href="http://revcanonical.wordpress.com/"&gt;making URL shortening&lt;/a&gt; not &lt;a href="http://joshua.schachter.org/2009/04/on-url-shorteners.html"&gt;suck&lt;/a&gt; is great, but killing bit.ly and tinyurl just isn't going to happen. Sadly for Joshua, this is the way the internet works, and if he doesn't like it, tough shit.&lt;/p&gt;

&lt;p&gt;So far I've only seen one site that (awesomely) shortens URLs with rev=canoncial (I'm sure there are more, but I haven't seen them. So there.) Simon Willison has done some great work on his blog, and throwing &lt;a href="http://simonwillison.net/2009/Apr/11/revcanonical/"&gt;http://simonwillison.net/2009/Apr/11/revcanonical/&lt;/a&gt; at Kellan's shortener results in &lt;a href="http://swtiny.eu/EZa"&gt;http://swtiny.eu/EZa&lt;/a&gt;. Brilliant!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Except&lt;/em&gt; no one will use it, because, well, &lt;a href="http://bit.ly/"&gt;bit.ly&lt;/a&gt; is &lt;em&gt;useful&lt;/em&gt; for doing things like tracking how far that link you sent got, and there's a degree of muscle memory involved. This is the sort of vi-versus-emacs argument that just isn't going to go away. Also, here's the same post shortened by &lt;a href="http://bit.ly/398FW8"&gt;bit.ly&lt;/a&gt;, &lt;a href="http://tinyurl.com/d8bb68"&gt;tinyurl&lt;/a&gt; and this &lt;a href="http://romeda.org/swr.php"&gt;Simon-Willison's-post-about-rev=canonical specific URL shortener&lt;/a&gt; that I just linked to in the previous paragraph. So why fight it? You really can't win.&lt;/p&gt;

&lt;p&gt;There is hope, though. I live in the dark ages, and Blogger publishes my posts as static HTML over SCP or FTP or some other totally inappropriate protocol. Since there's no &amp;lt;$BlogItemShortURL$&amp;gt; tag in Blogger's template syntax, I'm completely unable to do what Simon's done, without migrating to a self-hosted blogging system (contrary to popular belief, not all programmers are compelled to write their own blogging systems (erm, on second thought, ignore twitter)).&lt;/p&gt;

&lt;span style="text-decoration: line-through"&gt;&lt;p&gt;Anyhow, it turns out that I can be as cool as Simon, just with one step of indirection:&lt;/p&gt;&lt;/span&gt;

&lt;pre&gt;&lt;code&gt;
&amp;lt;link rev="canonical" href="http://bit.ly/?url=&lt;$BlogItemPermalinkURL$&gt;"/&amp;gt;
&amp;lt;link rev="canonical" href="http://tinyurl.com/create.php?url=&lt;$BlogItemPermalinkURL$&gt;"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Strike that, Blogger fucking sucks and so I've created a shell script that converts a placeholder into rev=canonical links. Man, that was a pain in the ass. Why do I still use Blogger? Anyhow, the point stands if your blogging software doesn't totally suck and will give you a permalink anywhere in the template engine. Which is probably true unless you're using Blogger. Ugh.&lt;/p&gt;

&lt;p&gt;So this is great. Now my blog posts are rev=canonical™ compliant, and &lt;span style="text-decoration: line-through"&gt;I&lt;/span&gt; you didn't have to change anything at all, beyond shoving a couple of lines of HTML into your blog template. People that use bit.ly and tinyurl are happy, because they don't need to change their behaviour, and people that use rev=canonical are happy, because they can just by following the links provided for them.&lt;/p&gt;

&lt;p&gt;Now of course this doesn't address two of Joshua's concerns. First, I still have no idea where my traffic is coming from, because I don't run my own URL shortener. I don't &lt;em&gt;want&lt;/em&gt; to run my own URL shortener. What I see here is an opening for bit.ly and/or tinyurl to allow me to see the stats of redirects (Dear &lt;span style="text-decoration: line-through"&gt;FeedBurner&lt;/span&gt;Google: Please purchase bit.ly or tinyurl or build your own), which they should be able to do easily since all I would need to do is prove that I own romeda.org by sticking some secretly named file at the domain root or otherwise.&lt;/p&gt;

&lt;p&gt;The second concern that remains unaddressed is what happens when the URL shorteners go away? Well, we have the same problem on the web. The answer to that was/is &lt;a href="http://archive.org"&gt;The Internet Archive&lt;/a&gt;, so herewith &lt;a href="http://tinyarchive.org/"&gt;The (Tiny) Internet Archive&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Currently it's just a proof-of-concept. I don't guarantee in any way that the links posted there will persist. That said, the free quotas that come with Google App Engine allow enough space to store around two million links, and $0.15 per month for every additional two million links, so I'm sure it won't be a problem. Who knows, maybe archive.org will take it over?&lt;/p&gt;

&lt;p&gt;The code that's up is available on github here: &lt;a href="http://github.com/blaine/tinyarchive"&gt;TinyArchive&lt;/a&gt;. If you have suggestions, please send them my way or fork the code and send me patches. It was just a pre-coffee morning hack, my first stab at App Engine, and my first Python code in what seems like forever.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-1649872776592878945?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/1649872776592878945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2009/04/automatic-bootstrapping-of-revcanonical.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1649872776592878945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1649872776592878945'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2009/04/automatic-bootstrapping-of-revcanonical.html' title='Automatic Bootstrapping of rev=canonical'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-8478427619614269290</id><published>2009-02-17T11:30:00.000Z</published><updated>2009-02-17T11:48:48.376Z</updated><title type='text'>Facebook is Closed for Anything</title><content type='html'>&lt;p&gt;From &lt;a href="http://blog.facebook.com/blog.php?post=54434097130"&gt;Mark Zuckerberg's post&lt;/a&gt; responding to the criticisms of their new ToS:&lt;/p&gt;

&lt;blockquote style='font-style: italic'&gt;&amp;ldquo;We think this is the right way for Facebook to work, and it is consistent with how other services like email work.&amp;rdquo;&lt;/blockquote&gt;

&lt;p&gt;If that's the case, then why the onerous licensing? I'm quite sure that people running email servers don't need to negotiate licenses to send and receive email to and from one another. Asymmetrical persistence is a feature, not a bug, of email.&lt;/p&gt;

&lt;p&gt;Facebook couldn't figure out how to replicate email in a closed, centrally controlled corporate environment (hint: you can't). Resorting to legalese is a by-product of their broken closed model (yes, this includes their support of OpenID and their Facebook &lt;span style="text-decoration: line-through"&gt;Platform&lt;/span&gt;Plantation).&lt;/p&gt;

&lt;blockquote style="font-style: italic;"&gt;&amp;ldquo;There is no system today that enables me to share my email address with you and then simultaneously lets me control who you share it with and also lets you control what services you share it with.&amp;rdquo;&lt;/blockquote&gt;

&lt;p&gt;That's because you &lt;em&gt;can't&lt;/em&gt; control such things. At the end of the day, I can write down a phone number from a screen, and paste it up on telephone poles anywhere I please, shout it out at the top of my lungs. There's no law that prevents me from doing that, and even if there were, it would be completely unenforceable.&lt;/p&gt;

&lt;p&gt;The music and film industries have been fighting this losing battle for years, and frankly it's depressing to see a major web property co-opting the notion of openness while playing essentially the same DRM game.&lt;/p&gt;

&lt;p&gt;With legalese like this, I'm expecting the big announcement at f8 to be OpenFacebookHappyDRM. Code name: &lt;a href="http://hitherto.net/2007/10/18/facebook-the-hotel-california-of-social-networks/"&gt;Hotel California&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote style="font-style: italic"&gt;You can OpenID in any time of day, but you can never leave&amp;hellip;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-8478427619614269290?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/8478427619614269290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2009/02/facebook-is-closed-for-anything.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8478427619614269290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8478427619614269290'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2009/02/facebook-is-closed-for-anything.html' title='Facebook is Closed for Anything'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-2025046817298270591</id><published>2008-05-12T16:53:00.000+01:00</published><updated>2008-05-12T17:04:49.886+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='reliability'/><category scheme='http://www.blogger.com/atom/ns#' term='velocity'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='jesse robbins'/><title type='text'>Velocity</title><content type='html'>&lt;p&gt;If you're interested in scalability and performance as it pertains to internet applications, or if you're involved in or looking to build a reliable internet-based system, go to &lt;a href="http://en.oreilly.com/velocity2008/public/content/home"&gt;Velocity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I was fortunate enough to attend the O'Reilly &lt;a href="http://lethargy.org/~jesus/archives/106-A-job,-a-mission,-a-career-all-without-a-path-or-a-name..html"&gt;Velocity Summit&lt;/a&gt; back in January, which was a Foo-Style event designed to provide some context leading into the actual conference in June. If the conference is one tenth as good as the summit, it will be amazing. &lt;a href="http://radar.oreilly.com/jesse/"&gt;Jesse&lt;/a&gt; is an amazing organizer and a man with a vision.&lt;/p&gt;

&lt;p&gt;Anyhow, instead of reading my &lt;a href="http://romeda.org/blog/2008/05/scalability.html"&gt;off-the-cuff posts&lt;/a&gt; about obvious things that are much more fun to talk about while &lt;a href="http://www.futureofwebapps.com/2008/miami/"&gt;drinking in Miami&lt;/a&gt;, go to Velocity and learn this stuff for real.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-2025046817298270591?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/2025046817298270591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2008/05/velocity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2025046817298270591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2025046817298270591'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2008/05/velocity.html' title='Velocity'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-1187948019010202083</id><published>2008-05-12T02:57:00.000+01:00</published><updated>2008-05-12T20:27:43.374+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='tcsh'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Scalability</title><content type='html'>&lt;p&gt;&lt;b&gt;Updated:&lt;/b&gt; Go read Steve's &lt;a href="http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html"&gt;Dynamic Languages Strike Back&lt;/a&gt;. It's a longer read, but it's much more interesting, and he's much smarter than I am.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://ola-bini.blogspot.com/2008/05/just-add-scaling.html"&gt;LOL.&lt;/a&gt; &amp;lt;-- this is a link. Read Ola's post, first.&lt;/p&gt;

&lt;p&gt;For all those who don't get it, &lt;i&gt;languages don't scale, architectures do.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Now, some languages are &lt;i&gt;faster&lt;/i&gt; than others. That means that to complete a given operation, it &lt;i&gt;costs less&lt;/i&gt;, everything else being equal. Costing less is a good thing. But developers also cost money, so if you have to spend money on developers' time porting from one language to another then you might not be saving any money at all, and really you're just treading water.&lt;/p&gt;

&lt;p&gt;Once upon a time, &lt;i&gt;Shell Scripts&lt;/i&gt; were used to &lt;a href="http://docs.rinet.ru/UNIXi/ch18.htm"&gt;write CGI applications&lt;/a&gt;. With the correct architecture, and enough money, you could build &lt;a href="http://google.com"&gt;Google&lt;/a&gt; with &lt;a href="http://www.tcsh.org/Welcome"&gt;tcsh&lt;/a&gt;. No, really. It wouldn't be fun, and you'd be dumb, because there are &lt;b&gt;much&lt;/b&gt; &lt;i&gt;cheaper&lt;/i&gt; ways to do it. But then again, if you stuck with it, perhaps you'd optimize tcsh to be really fast at spawning and serving up web requests. Faster than Java, faster than &amp;lt;insert your favourite language here&amp;gt;. Faster means &lt;i&gt;cheaper&lt;/i&gt;, it doesn't mean more &lt;i&gt;scalable&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;I point to &lt;a href="http://www.tbray.org/ongoing/When/200x/2007/10/30/WF-Results"&gt;exhibit A&lt;/a&gt;. Perl used to be &lt;a href="http://furryland.org/~mikec/bench/"&gt;slow&lt;/a&gt;. Now it beats JoCaml with the bestest concurrency (re: &amp;ldquo;Scalability&amp;rdquo;) around. What was Perl built for? Parsing text. Lots of it. All the time. It's fast. Does it mean that you can't build Wide Finder with another language? Absolutely not. Does it mean that you couldn't build Wide Finder to scale out to a trillion documents with gawk? If you answered &amp;ldquo;yes&amp;rdquo;, go back to the start of this post and read again! :-) If you're still answering &amp;ldquo;yes,&amp;rdquo; try reading some more. &lt;a href="http://randomfoo.net/blog/id/4171"&gt;Leonard&lt;/a&gt;, &lt;a href="http://teddziuba.com/2008/04/im-going-to-scale-my-foot-up-y.html"&gt;Ted&lt;/a&gt;, &lt;a href="http://www.joestump.net/2008/04/its-not-the-language-stupid.html"&gt;Joe&lt;/a&gt;, &lt;a href="http://www.amazon.com/Building-Scalable-Web-Sites-applications/dp/0596102356/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1210561240&amp;sr=8-1"&gt;Cal&lt;/a&gt;, and &lt;a href="http://www.amazon.com/Scalable-Internet-Architectures-Developers-Library/dp/067232699X/ref=pd_sim_b_img_1"&gt;Theo&lt;/a&gt; are good places to start.

&lt;p&gt;If you answered &amp;ldquo;no,&amp;rdquo; congratulations! Pat yourself on the back for knowing what &lt;a href="http://en.wikipedia.org/wiki/Scalability"&gt;scalability&lt;/a&gt; means. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-1187948019010202083?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/1187948019010202083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2008/05/scalability.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1187948019010202083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1187948019010202083'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2008/05/scalability.html' title='Scalability'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-6940345678945766594</id><published>2008-03-08T14:59:00.000Z</published><updated>2008-03-09T15:25:28.581Z</updated><title type='text'>FoWA Miami Rocked.</title><content type='html'>&lt;p&gt;I've been busy getting [Twitter] ready for SXSW, and have completely failed at email and, well, everything except work, since then. Before I &lt;span style="text-decoration: line-through"&gt;actually land&lt;/span&gt; get drunk in Austin, I wanted to make a quick post about how great &lt;a href="http://www.futureofwebapps.com/2008/miami/"&gt;FoWA Miami&lt;/a&gt; was.&lt;/p&gt;

&lt;p&gt;After giving my workshop, I attended &lt;a href="http://www.joestump.net/"&gt;Joe's&lt;/a&gt; workshop on scalability, which was an amazingly thorough discussion, and I highly recommend attending anything that Joe does in the future (including the panel that he, Cal, and others are on at SxSW. I didn't catch many of the session talks on Friday, as I spent much of my time talking to attendees, but  the "Building a Web App in 45 minutes" panel was a fun experiment, and both &lt;a href="http://iamcal.com/"&gt;Cal&lt;/a&gt; and &lt;a href="http://tv.winelibrary.com/"&gt;Gary&lt;/a&gt; were energetic, brilliant, amazing, all that good stuff. If you get a chance to see either of them speak, don't pass it up. Especially Gary, as you're likely to get free wine, even if he makes you eat dirt beforehand.&lt;/p&gt;

&lt;p&gt;I had some hiccups during the demo / discussion portion of my workshop, but the first part went well, I think, and I'm looking forward to some great applications that incorporate Jabber soon. My talk, "Bringing your web app to the masses" went well, except for the part where Twitter went down in the middle of it, and I got a call from work (which I waited until after the talk to answer).&lt;/p&gt;

&lt;p&gt;Some heckling ensued, but I was happy to be able to address the audience's questions about Twitter in an open and honest way. The atmosphere that Carsonified has managed to foster at FoWA helped a ton.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://randommel.com/"&gt;Mel&lt;/a&gt;, &lt;a href="http://ryancarson.com/"&gt;Ryan&lt;/a&gt;, &lt;a href="http://www.carsonified.com/about-us"&gt;Lisa&lt;/a&gt;, &lt;a href="http://www.fiveandlime.com/"&gt;Keir&lt;/a&gt;, and &lt;a href="http://elliotjaystocks.com/blog"&gt;Elliot&lt;/a&gt; did a fantastic job organizing everything, and &lt;a href="http://tantek.com/"&gt;Tantek&lt;/a&gt; and &lt;a href="http://brianoberkirch.com/"&gt;Brian&lt;/a&gt; put together an amazing lineup of speakers and workshops. Seriously inspiring stuff.&lt;/p&gt;

&lt;p&gt;If they'll have me, I'll definitely be going to any conferences they hold in the future. They've come a long way since the FoWA San Francisco in Fall 2006, and it looks like they'll just keep getting better.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-6940345678945766594?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/6940345678945766594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2008/03/ive-been-busy-getting-twitter-ready-for.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6940345678945766594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6940345678945766594'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2008/03/ive-been-busy-getting-twitter-ready-for.html' title='FoWA Miami Rocked.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-8254929934401606469</id><published>2008-02-21T18:51:00.000Z</published><updated>2008-02-21T19:43:53.337Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='jabber'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='health'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='privacy'/><title type='text'>Google Entaglement</title><content type='html'>&lt;p&gt;I've done a &lt;a href="http://resist.ca/"&gt;fair&lt;/a&gt; bit of &lt;a href="http://oauth.net/"&gt;security&lt;/a&gt; work, and generally try to care about the &lt;a href="http://citp.princeton.edu/memory/"&gt;finer details&lt;/a&gt; of privacy and security. However, one of the things that I've learned is that more often than not, no amount of digital security past a certain point is going to help, since usually the &lt;a href="http://en.wikipedia.org/wiki/Green_Scare"&gt;threat model&lt;/a&gt; isn't an advanced technological attack, it's a social one.&lt;/p&gt;

&lt;p&gt;Thus far, Google has done a pretty good job of keeping private things private and public things public. I've spoken to people on the Google Reader team, and the main reason they haven't added support for private feeds is their acute concern for privacy.&lt;/p&gt;

&lt;p&gt;Today Google announced a &lt;a href="http://bits.blogs.nytimes.com/2008/02/21/google-health-begins-its-preseason-at-cleveland-clinic/?ref=technology"&gt;limited trial of storing health records&lt;/a&gt; online. This seems reasonable and doable in a secure way, but I'm sure they'll get lots of unwarranted flak for the long-awaited project.&lt;/p&gt;

&lt;p&gt;However, there will and should be some warranted flak. It turns out that they're using your regular Google account to store this information, and will provide access to it using your regular password, no doubt through yet another Google login page. I've heard concerns that &lt;a href="http://oauth.net/"&gt;OAuth&lt;/a&gt; supports phishing (from Google people), but project infighting and power struggles at Google that result in &lt;a href="http://gmail.com/"&gt;tens&lt;/a&gt; of &lt;a href="http://blogger.com/"&gt;login&lt;/a&gt; &lt;a href="https://www.google.com/accounts/ServiceLogin?service=dodgeball&amp;amp;ltmpl=duallogin"&gt;pages&lt;/a&gt;, all slightly (or dramatically) different, all using the same credentials supports phishing much moreso.&lt;/p&gt;

&lt;p&gt;I strongly support patients' rights to access their medical information, and Google is probably one of just a handful of organizations that can do the necessary coordination work and stand up to invasive organizations at scale. However, they need to stop thinking of this data as &lt;span style="font-weight: bold;"&gt;theirs&lt;/span&gt;, because it's not — it's &lt;span style="font-weight: bold;"&gt;your&lt;/span&gt; data. Using the same password as your &lt;span style="font-style: italic;"&gt;email&lt;/span&gt; to access your &lt;span style="font-style: italic;"&gt;health records&lt;/span&gt; is something that should be actively discouraged. If Google wants to present a unified interface, they should expose an API and use OAuth or AuthSub, just like any other third party that would consume the data.&lt;/p&gt;

&lt;p&gt;Now, I may be over-reacting, but I had an interaction yesterday that suggests to me that I'm not. Someone using GTalk sent a chat request to blaine@twitter.com; this email address has an MX record that resolves to mail.twitter.com, and the corresponding JID resolves to jabber01.twitter.com. However, I have claimed my blaine@twitter.com address on GMail, and associated it with my primary GTalk ID (romeda@gmail.com). When I accepted the chat request, the response came from my GTalk account, romeda@gmail.com.&lt;/p&gt;

&lt;p&gt;In effect, Google had done something clever, and in so doing broke the Jabber spec, ignored my own self-hosted Jabber server, and&lt;span style="font-style: italic;"&gt; exposed my personal email address&lt;/span&gt; without asking my permission.&lt;/p&gt;

&lt;p&gt;In this case, it wasn't a big deal, I don't care, etc. Others might, though, and I only knew that it was happening because the person on the other end of the chat was tech-savvy enough to realize what had happened. Also, email addresses and connections between them are hardly closely-guarded secrets. The thing I take away from this is that Google is being sloppy. There's a lot going on, and it's hard to keep track of it all. That your health records are being tied to your Google account just reeks of some power struggle where the Google account people want to bolster their product's internal importance (or have managed to do so that they get veto power where they shouldn't have it), and it's simply not a pragmatic choice. There's a reason your health records aren't stored at the DMV, and it's not out of convenience. Just sayin'.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-8254929934401606469?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/8254929934401606469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2008/02/google-entaglement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8254929934401606469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8254929934401606469'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2008/02/google-entaglement.html' title='Google Entaglement'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-632258650818085448</id><published>2008-01-21T07:19:00.000Z</published><updated>2008-01-21T07:51:45.705Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fowa miami'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp'/><category scheme='http://www.blogger.com/atom/ns#' term='fowa'/><category scheme='http://www.blogger.com/atom/ns#' term='february'/><category scheme='http://www.blogger.com/atom/ns#' term='talk'/><title type='text'>FoWA Miami</title><content type='html'>&lt;p&gt;Just a quick note that I'll be giving a &lt;a href="http://futureofwebapps.com/2008/miami/workshops.php"&gt;workshop&lt;/a&gt; on building real-time web applications using Jabber at the &lt;a href="http://futureofwebapps.com/2008/miami/"&gt;Future of Web Apps&lt;/a&gt; in Miami, on February 28th. The conference runs from the 28th to the 1st of March, and should be a lot of fun.
&lt;/p&gt;&lt;p&gt;We've been gradually improving the Jabber stack on Twitter, and we're now sending millions of messages every day, doing things that just don't fit into the polling-based world of Atom feeds. There are a ton of extremely awesome things that can be built, and so far we've just scratched the surface.&lt;/p&gt;More to come; if I don't start blogging these things in small pieces, they'll never come.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-632258650818085448?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/632258650818085448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2008/01/fowa-miami.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/632258650818085448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/632258650818085448'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2008/01/fowa-miami.html' title='FoWA Miami'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-4992983206982500025</id><published>2007-09-02T02:39:00.000+01:00</published><updated>2007-09-02T02:51:06.580+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter scaling rails ruby'/><title type='text'>Stability</title><content type='html'>&lt;p&gt;Most of the Twitter team's work in the weeks  leading up to launching &lt;a href="http://explore.twitter.com/blocks/"&gt;Blocks&lt;/a&gt; was to ensure that it wouldn't fall over as soon as we released it. It's an extremely punishing application, loading 10 timelines on every occasion that someone looks at it. So far, the servers haven't even noticed.&lt;/p&gt;

&lt;p&gt;There have been a number of Twitter hiccups in the past few weeks, but they've all been weird, random bugs. Which is not to make excuses, but rather to say that in spite of (very time-consuming) challenges along the way, we've been myopically focused on making the site faster and more reliable. As evidence, here's a graph of page load times, as seen from an external observer:&lt;/p&gt;

&lt;img src="http://romeda.org/blog/uploaded_images/twitter.com-.rrd-Load-times-for-one-month-780093.png" alt="Twitter Load Times, as monitored by an external observer, over the past month."&gt;

&lt;p&gt;We're going to keep building a faster and more reliable Twitter. We're also going to add some awesome new features, and soon. Possibly better than contact search and GMail, even! Finally, we'll have more visualizations from the Stamen folks. &lt;a href="http://lukewarmtapioca.com/"&gt;Britt&lt;/a&gt; is off to Berlin for &lt;a href="http://www.railsconfeurope.com/"&gt;RailsConf&lt;/a&gt; mid-September. We'll then have more details about what we're doing to push Rails and Twitter.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-4992983206982500025?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/4992983206982500025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/09/stability.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4992983206982500025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4992983206982500025'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/09/stability.html' title='Stability'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-6359957087413047189</id><published>2007-09-01T23:58:00.000+01:00</published><updated>2007-09-02T02:28:57.929+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='folly blocks twitter stamen schulze webb jane mcgonigal design fun architecture'/><title type='text'>These are the people ...</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Folly"&gt;Folly&lt;/a&gt;: "In architecture, a folly is an extravagant, frivolous or fanciful building, designed more for artistic expression than for practicality." &amp;#8211; via &lt;a href="http://del.icio.us/url/844681fe17e3f7db16043e6028f714e1"&gt;Tom Coates&lt;/a&gt;, by way of &lt;a href="http://tom-carden.co.uk/"&gt;Tom Carden&lt;/a&gt;.

&lt;p&gt;We just released &lt;a href="http://explore.twitter.com/blocks/"&gt;Twitter Blocks&lt;/a&gt;, a nice little visualisation done by the good folks at &lt;a href="http://stamen.com/"&gt;Stamen Design&lt;/a&gt;. It's fun! Go play!&lt;/p&gt;

&lt;p&gt;Stamen's recent work highlights the playfulness inherent to Twitter. I can't wait to release more of these interfaces, and hope that it inspires similar work. Sam Ruby, Tim Bray and others have recently weighed in with their long bets. I'm willing to put down that playfulness &amp;#8212; of the sort that Stamen, &lt;a href="http://schulzeandwebb.com/"&gt;Schulze &amp;amp; Webb&lt;/a&gt; and &lt;a href="http://avantgame.com/"&gt;Jane McGonigal&lt;/a&gt; explore and invent daily &amp;#8212; is so important to who we are as people that the tech world won't be able to ignore it for much longer.&lt;/p&gt;

&lt;p&gt;Not exactly a risky bet, but too often the tech industry just ignores these things, so there it is, just for kicks.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-6359957087413047189?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/6359957087413047189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/09/these-are-people.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6359957087413047189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/6359957087413047189'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/09/these-are-people.html' title='These are the people ...'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-5304701516772212913</id><published>2007-06-21T20:44:00.000+01:00</published><updated>2007-06-21T22:48:28.363+01:00</updated><title type='text'>SELECT * FROM everything, or why databases are awesome.</title><content type='html'>&lt;p&gt;I've just committed a &lt;a href="http://dev.rubyonrails.org/ticket/8713"&gt;patch&lt;/a&gt; to ActiveRecord that prevents a large number of very, very bad queries from hitting your database. Go update your code, ASAP.&lt;/p&gt;

&lt;p&gt;We've made some pretty significant progress towards scaling Twitter, and we're now at the point where the majority of requests that hit our site complete in less than 70 ms (mostly API requests), and the really complicated front-end pages that we display complete in less than 160 ms. There are still a lot of hiccups, so the average is higher than that, but we're constantly working on getting it down.&lt;/p&gt;

&lt;p&gt;One of the consistent problems we've been facing is errant queries. We've been seeing (off and on) queries like:&lt;br/&gt;&lt;br/&gt;
&lt;tt&gt;SELECT * FROM statuses WHERE user_id = 234223 ORDER BY created_at&lt;/tt&gt;
&lt;br/&gt;&lt;br/&gt;
If you know anything about relational databases, this is a &lt;b&gt;very bad thing&lt;/b&gt;, especially when you have users that have more than 20,000 statuses.&lt;/p&gt;

&lt;p&gt;One major downside of having an object-relational mapper is that you don't always control what goes on behind the scenes. In tracking down this problem, first we investigated all our code, and weren't able to find the source of these problems. Switching tactics, we isolated some test cases that replicated the problem and brought out the big guns: &lt;a href="http://www.tbray.org/ongoing/When/200x/2004/06/17/DeDebPrint"&gt;print&lt;/a&gt;. This pretty quickly brought us to an obscure corner of the ActiveRecord source (three cheers for source code!), where it became apparent that Rails was doing these gigantic loads from the database every time we saved even a single field in a related object. There are a bunch of mitigating circumstances that mean that this bug doesn't get triggered all the time, but it's still really really bad.&lt;/p&gt;

&lt;p&gt;Thankfully, the patch &lt;strike&gt;will be committed soon&lt;/strike&gt; has been committed (32 minutes patch-to-commit!), and no-one will have to deal with, as &lt;a href="http://blog.codahale.com/"&gt;Coda&lt;/a&gt; put it: "Arg stabby stab stab stabbity fuck stab" anymore. The fact that no-one noticed really speaks to how freaking awesome relational databases (in our case, MySQL) are these days.&lt;/p&gt;

&lt;p&gt;Perhaps underlying all of this is the simple fact that most of the time, ActiveRecord and Rails in general is pretty solid, and Ruby underneath is a fully sound language with which to build high-volume services. &lt;a href="http://glu.ttono.us/articles/2007/06/21/powerset-to-launch-front-end-on-ruby"&gt;Kevin&lt;/a&gt; over at PowerSet has more on the topic - they've recently announced that they'll be doing their front-end development in Ruby (up until now, it's just been a glue language internally).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-5304701516772212913?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/5304701516772212913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/06/select-from-everything-or-why-databases.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/5304701516772212913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/5304701516772212913'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/06/select-from-everything-or-why-databases.html' title='SELECT * FROM everything, or why databases are awesome.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-5563285600741733265</id><published>2007-05-18T11:30:00.000+01:00</published><updated>2007-05-18T11:36:24.867+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter railsconf ruby al3x britt pdx'/><title type='text'>Twitter at RailsConf</title><content type='html'>&lt;p&gt;Sadly, I won't be attending RailsConf in Portland this weekend. I'll be finishing up at XTech, followed by a (well-deserved) week relaxing / adventuring in Morocco. Photos will follow.&lt;/p&gt;

&lt;p&gt;In the meantime, if you're one of the lucky &lt;strike&gt;few&lt;/strike&gt; many attending RailsConf, &lt;a href="http://al3x.net/"&gt;Alex&lt;/a&gt; and &lt;a href="http://lukewarmtapioca.com/"&gt;Britt&lt;/a&gt; will be speaking 10:45 AM on Sunday. They may or may not being doing a reprise of my &lt;a href="http://www.slideshare.net/Blaine/scaling-twitter/"&gt;Scaling Twitter&lt;/a&gt; talk, but I'm sure it will be fantastic in any event.&lt;/p&gt;

&lt;/p&gt;Wish I were there, have fun all!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-5563285600741733265?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/5563285600741733265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/05/twitter-at-railsconf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/5563285600741733265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/5563285600741733265'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/05/twitter-at-railsconf.html' title='Twitter at RailsConf'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-4991931993759430822</id><published>2007-05-17T09:58:00.000+01:00</published><updated>2007-05-17T12:09:04.305+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xtech2007 xtech kellan jabber paris'/><title type='text'>Social Software for Robots Slides Up</title><content type='html'>&lt;p&gt;I've uploaded the &lt;a href="http://www.slideshare.net/Blaine/social-software-for-robots/"&gt;Social Software for Robots&lt;/a&gt; slides for the messaging/jabber talk that &lt;a href="http://laughingmeme.org/"&gt;Kellan&lt;/a&gt; and I gave yesterday at &lt;a href="http://2007.xtech.org"&gt;XTech 2007&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I think the talk went well, aside from a hiccup getting all the stars aligned to show the visualization that &lt;a href="http://www.tom-carden.co.uk/"&gt;Tom&lt;/a&gt; helped us put together. For those who missed it, I'm hoping that Kellan or I or both will give reprises at other upcoming conferences. There's a lot of potential here, and things are finally reaching the point where real-time APIs are not only becoming a reality, but a necessity.&lt;/p&gt;

&lt;p&gt;XTech has been great fun so far, and there are a number of talks that I'm looking forward to today and tomorrow. Huge thanks to Edd and everyone else who's helped put it together.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-4991931993759430822?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/4991931993759430822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/05/social-software-for-robots-slides-up.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4991931993759430822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4991931993759430822'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/05/social-software-for-robots-slides-up.html' title='Social Software for Robots Slides Up'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-3499843118609470360</id><published>2007-04-22T20:49:00.000+01:00</published><updated>2007-04-22T21:13:46.088+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter scaling presentation sdforum rails ruby xtech jabber xmpp kellan'/><title type='text'>Slides for Scaling Twitter talk, XTech next up.</title><content type='html'>&lt;p&gt;The slides from the talk are &lt;a href="http://www.slideshare.net/Blaine/scaling-twitter/"&gt;available on SlideShare&lt;/a&gt;. They don't spell out the talk, so if you have questions, please do ask.&lt;/p&gt;

&lt;p&gt;I'm really excited about &lt;a href="http://2007.xtech.org/"&gt;XTech&lt;/a&gt;, coming up in a few weeks (May 15th-18th) in Paris. I'll be speaking with &lt;a href="http://laughingmeme.org/"&gt;Kellan&lt;/a&gt; about using &lt;a href="http://2007.xtech.org/public/schedule/detail/197"&gt;Jabber to build Social Software for Robots&lt;/a&gt;. Lots of awesome people and talks there, should be a lot of fun.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-3499843118609470360?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/3499843118609470360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/04/slides-for-scaling-twitter-talk-xtech.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3499843118609470360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3499843118609470360'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/04/slides-for-scaling-twitter-talk-xtech.html' title='Slides for Scaling Twitter talk, XTech next up.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-7863582060092630231</id><published>2007-04-13T20:51:00.000+01:00</published><updated>2007-04-13T20:54:14.092+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter scaling presentation sdforum rails ruby'/><title type='text'>Scaling Twitter, The Talk.</title><content type='html'>&lt;p&gt;Simon Willison &lt;a href="http://simonwillison.net/2007/Apr/12/question/"&gt;linked&lt;/a&gt; to &lt;a href="http://www.radicalbehavior.com/5-question-interview-with-twitter-developer-alex-payne/"&gt;an interview with Alex Payne&lt;/a&gt;, one of my co-workers on Twitter. This &lt;a href="http://www.loudthinking.com/arc/000608.html"&gt;caused&lt;/a&gt; &lt;a href="http://lucasjosh.com/blog/2007/04/13/twitter-rails-and-scaling/"&gt;a&lt;/a&gt; &lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.479387"&gt;bit&lt;/a&gt; &lt;a href="http://www.alexrudloff.com/2007/04/12/twitter-developer-calls-out-ruby-on-rails/
"&gt;of&lt;/a&gt; &lt;a href="http://rc3.org/2007/04/twitter_develop.php"&gt;a&lt;/a&gt; &lt;a href="http://tomayko.com/weblog/2007/04/13/rails-multiple-connections"&gt;stir&lt;/a&gt;, so &lt;a href="http://www.agenturblog.de/2007-04/ruby-is-slow/"&gt;apparently&lt;/a&gt; there's some &lt;a href="http://laughingmeme.org/2007/04/12/twitter-ruby-and-scaling/"&gt;interest&lt;/a&gt; in our experience scaling Twitter, and Rails.&lt;/p&gt;

&lt;p&gt;We've been extremely happy with Rails, and make use of the multitude of helpers that it offers us - like any application on any stack, though, providing fast response times to a (rapidly) growing number of users is a challenge. The solutions are often tightly coupled to the application and its characteristics, and while scaling the most trafficked Rails site in the world, we've run into situations where existing solutions weren't enough.&lt;/p&gt;

&lt;p&gt;This process has led us to build a number of tools that help us deal with our load, and just as soon as we find some spare time, we'll be releasing many of them. In the meantime, you can find out first what sorts of challenges we've encountered and solutions we've come up with at my talk at the SDForum &lt;a href="http://www.sdforum.org/SDForum/Templates/CalendarEvent.aspx?CID=2135&amp;mo=4&amp;yr=2007"&gt;Silicon Valley Ruby Conference&lt;/a&gt; next weekend (April 21-22nd).&lt;/p&gt;

&lt;p&gt;I'll be focusing on ActiveRecord and database optimization, caching, and of course, Messaging. I'll also touch on some areas where we haven't had great successes (yet), and hopefully someone from the audience will shout out that there's some totally obvious and awesome thing that we haven't thought of, and it'll save us weeks of work (no, I'm serious. Does someone want to take bets?).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-7863582060092630231?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/7863582060092630231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/04/scaling-twitter-talk.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/7863582060092630231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/7863582060092630231'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/04/scaling-twitter-talk.html' title='Scaling Twitter, The Talk.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-7550755293606991790</id><published>2007-04-01T19:48:00.000+01:00</published><updated>2007-04-02T02:39:18.618+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mapreduce ruby code'/><title type='text'>MapReduce in 36 lines of Ruby</title><content type='html'>This has been burning a hole in my head since August, after &lt;a href="http://www.joelonsoftware.com/items/2006/08/01.html"&gt;Joel's post&lt;/a&gt; made it blindingly obvious that Ruby is the perfect language for distributed programming. I have some code that properly implements partitioning, etc, but never got around to finishing it sufficiently for a proper release. Here's the core idea; if anyone wants the partitioning code, ping me at romeda@gmail.com.

mapreduce_enumerable.rb:

&lt;pre&gt;&lt;code&gt;
require 'rubygems'
require 'ringy_dingy'
require 'ruby2ruby'

module Enumerable
  def dmap(&amp;block)
    self.each_with_index do |element,idx|
      ring_server.write([:dmap, Process.pid, block.to_ruby, element, idx])
    end

    results = []
    while results.size &lt; self.size
      result, idx = ring_server.take([:dmap, Process.pid, nil, nil]).last(2)
      results[idx] = result
    end

    results
  end

  def ring_server
    return @ring_server if @ring_server

    ringy_dingy = RingyDingy.new nil
    @ring_server = ringy_dingy.ring_server
  end
end
&lt;/code&gt;&lt;/pre&gt;

mapreduce_runner.rb:

&lt;pre&gt;&lt;code&gt;
require 'rubygems'
require 'ruby2ruby'
require 'ringy_dingy'

ringy_dingy = RingyDingy.new nil
ring_server = ringy_dingy.ring_server

loop do
  pid, block, element, idx = ring_server.take([:dmap, nil, nil, nil, nil]).last(4)
  begin
    result = eval(block).call(element)
  rescue Object =&gt; err
    result = err
  end
  puts "Got #{result} from #{element} for #{pid}."
  ring_server.write([:dmap, pid, result, idx])
end
&lt;/code&gt;&lt;/pre&gt;

From the shell:

&lt;pre&gt;
$ sudo gem install RingyDingy
$ sudo gem install ruby2ruby
$ ring_server &amp;
$ ruby mapreduce_runner &amp;
$ ruby mapreduce_runner &amp;
&lt;/pre&gt;

From irb:

&lt;pre&gt;&lt;code&gt;
&gt; require 'mapreduce_enumerable'
&gt; (1..100).to_a.dmap { |v| v * 2 }
&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-7550755293606991790?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/7550755293606991790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2007/04/mapreduce-in-36-lines-of-ruby.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/7550755293606991790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/7550755293606991790'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2007/04/mapreduce-in-36-lines-of-ruby.html' title='MapReduce in 36 lines of Ruby'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-3443846622792335540</id><published>2006-12-22T21:32:00.001Z</published><updated>2006-12-22T21:32:00.210Z</updated><title type='text'>Google Code Love</title><content type='html'>&lt;div style="float: right; margin-left: 10px; margin-bottom: 10px;"&gt; &lt;a href="http://www.flickr.com/photos/lattice/330350557/" title="photo sharing"&gt;&lt;img src="http://farm1.static.flickr.com/129/330350557_1eac167eaa_m.jpg" alt="" style="border: solid 2px #000000;" /&gt;&lt;/a&gt; &lt;br /&gt; &lt;span style="font-size: 0.9em; margin-top: 0px;"&gt;  &lt;a href="http://www.flickr.com/photos/lattice/330350557/"&gt;Google Code Love&lt;/a&gt;  &lt;br /&gt;  Originally uploaded by &lt;a href="http://www.flickr.com/people/lattice/"&gt;liminalists&lt;/a&gt;. &lt;/span&gt;&lt;/div&gt;&lt;p&gt;My &lt;a href="http://code.google.com/p/xmpp4r-simple/"&gt;Jabber::Simple&lt;/a&gt; project, extracted from &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt;'s Jabber/IM support, got some love today from Google Code (thanks, &lt;a href="http://vedana.net/"&gt;eric&lt;/a&gt;!)&lt;/p&gt;&lt;br clear="all" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-3443846622792335540?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/3443846622792335540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2006/12/google-code-love.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3443846622792335540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/3443846622792335540'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2006/12/google-code-love.html' title='Google Code Love'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-4568669228261390045</id><published>2006-12-22T00:06:00.000Z</published><updated>2006-12-22T01:02:28.968Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='travel cities meme 2006'/><title type='text'>The Year in Cities, 2006.</title><content type='html'>&lt;p&gt;Here's the list of cities I stayed in during the course of 2006. Memes away. I've only included cities in which I spent at least one day and one night. I've preemptively added a few spots I'll be visiting over Christmas, too.&lt;/p&gt;

&lt;p&gt;
San Francisco, CA&lt;br/&gt;
Fresno (FresYES!), CA&lt;br/&gt;
Tahoe, CA/NV&lt;br/&gt;
Seattle, WA&lt;br/&gt;
Vancouver, BC&lt;br/&gt;
White Rock, BC&lt;br/&gt;
Victoria, BC&lt;br/&gt;
Whistler, BC&lt;br/&gt;
Reykjavik, Iceland&lt;br/&gt;
Ólafsvík, Iceland&lt;br/&gt;
Belfast, Northern Ireland&lt;br/&gt;
Aberystwyth, Wales&lt;br/&gt;
Norwich, East Anglia&lt;br/&gt;
London, England&lt;br/&gt;
Lewes (Brighton &amp; Hove), East Sussex&lt;br/&gt;
Barcelona, Spain&lt;br/&gt;
Portland, OR&lt;br/&gt;
Grande Prairie, AB&lt;br/&gt;
Santa Cruz, CA&lt;br/&gt;
Mojave Desert &amp; Las Vegas, CA &amp; NV&lt;br/&gt;
Zion National Monument, UT&lt;br/&gt;
Tucson, AZ&lt;br/&gt;
[Near] Calistoga, CA&lt;br/&gt;
Chilliwack, BC
&lt;/p&gt;

&lt;p&gt;All in all, pretty good, though I'm hoping for maybe somewhere more less-European for 2007. We'll see.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-4568669228261390045?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/4568669228261390045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2006/12/year-in-cities-2006.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4568669228261390045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/4568669228261390045'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2006/12/year-in-cities-2006.html' title='The Year in Cities, 2006.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-1369790222674825121</id><published>2006-12-20T21:12:00.000Z</published><updated>2006-12-20T21:34:39.362Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter weather presence jabber source attention'/><title type='text'>The Weather, by Twitter.</title><content type='html'>&lt;p&gt;A few weeks ago, &lt;a href="http://laughingmeme.org/"&gt;Kellan&lt;/a&gt; and I whipped up what is tentatively known as "WeatherBot". It's a simple tool to provide weather updates to &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt; users. Every morning at 7:00 AM and 3:45 PM (local time, that's 07h00 and 15h45 for those of you across the pond), our fleet of WeatherBots will send a weather update to Twitter.&lt;/p&gt;

&lt;p&gt;If you follow these bots, you'll receive those updates wherever you normally get your Twitters; IM, Phone, RSS, or just on the web. So far, we have bots for the following cities (links are to the bots' twitter profiles, for easy friending action): &lt;a href="http://twitter.com/wxboston"&gt;Boston&lt;/a&gt;, &lt;a href="http://twitter.com/wxbrighton"&gt;Brighton&lt;/a&gt;, &lt;a href="http://twitter.com/wxchicago"&gt;Chicago&lt;/a&gt;, &lt;a href="http://twitter.com/wxhelsinki"&gt;Helsinki&lt;/a&gt;, &lt;a href="http://twitter.com/wxlondon"&gt;London&lt;/a&gt;, &lt;a href="http://twitter.com/wxla"&gt;Los Angeles&lt;/a&gt;, &lt;a href="http://twitter.com/wxnyc"&gt;New York&lt;/a&gt;, &lt;a href="http://twitter.com/wxparis"&gt;Paris&lt;/a&gt;, &lt;a href="http://twitter.com/wxpdx"&gt;Portland&lt;/a&gt;, &lt;a href="http://twitter.com/wxsf"&gt;San Francisco&lt;/a&gt;, &lt;a href="http://twitter.com/wxseattle"&gt;Seattle&lt;/a&gt;, &lt;a href="http://twitter.com/wxsingapore"&gt;Singapore&lt;/a&gt;, and &lt;a href="http://twitter.com/wxyvr"&gt;Vancouver&lt;/a&gt;. If you'd like to see another city, just ask and we'll provide.&lt;/p&gt;

&lt;p&gt;The source code is available over on Google Code as &lt;a href="http://code.google.com/p/twitter-weather/"&gt;Twitter Weather&lt;/a&gt;. Kellan and I will be providing follow-up posts (and hopefully talks!) about how we built this, and updates on future improvements, so watch this space, and if you're not already on Twitter, sign up already! We're building an awesome space, and want you to have as much fun as we are.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-1369790222674825121?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/1369790222674825121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2006/12/weather-by-twitter.html#comment-form' title='55 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1369790222674825121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/1369790222674825121'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2006/12/weather-by-twitter.html' title='The Weather, by Twitter.'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>55</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-2448859883994036211</id><published>2006-12-08T19:55:00.000Z</published><updated>2006-12-08T23:45:38.134Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter identity happiness productivity kathysierra continuous attention singularity'/><title type='text'>On Twitter</title><content type='html'>&lt;p&gt;Kathy Sierra has a great post, talking about &lt;a href="http://headrush.typepad.com/creating_passionate_users/2006/12/httpwww37signal.html"&gt;Continuous Partial Attention and Twitter&lt;/a&gt;. Before you read my response, go read Kellan's excellent &lt;a href="http://laughingmeme.org/articles/2006/12/08/twitter-curve"&gt;post&lt;/a&gt; on the matter.&lt;/p&gt;

&lt;p&gt;Twitter is really nothing new, it's just new to the web (and IM/SMS). IRC has been around for ages, and functions in much the same way. Campfire, 37signals' group chat application is a similar application, but more task-focused. So to say that 2006 is the year of the singularity is probably too much of an exaggeration.&lt;/p&gt;

&lt;p&gt;I held off on using Twitter for a long time, even though I work at Obvious, because it was too much of an attention drain for me. I have a 5 year old &lt;a href="http://www.nokiausa.com/phones/8390"&gt;Nokia cell phone&lt;/a&gt;, and the SMS experience is one of mind-numbing pain when you receive 15 or 20 SMSes per day (not to mention expensive!). IM, on the other hand, is seamless. Like Kellan, I have verging-on-sub-conscious Growl notifications for IM, and as such I spend less than a second processing each incoming Twitter message.&lt;/p&gt;

&lt;p&gt;A phone call, on the other hand, can easily eat half an hour for me, because I don't "do" the phone very often. I find it intimidating, because most of the time the interactions involve long hold times, anti-human menus, horrible bureaucracy, etc. Email is more distracting than IM or Twitter, and so on. Calling friends and family is also a major time commitment, especially if we haven't talked in a while.&lt;/p&gt;

&lt;p&gt;I'm more than willing to put up with certain levels of interruption in order to have that sense that I "know" what's going on around me. I have friends who live far away, and whom I don't speak to on the phone, email, or see regularly. Twitter perfectly fills the gap, and allows us to keep each-other "in the loop", bringing us closer overall.&lt;/p&gt;

&lt;p&gt;Sure, I could close myself off, and just work all day - but I feel like all these emerging (emergent?) "ambient" communication technologies actually help to make me happier, and feel less alone in our highly abstract and disconnected world. Having "community" is extremely important; far more so than our productivity. Maybe it's just sad that we allow ourselves to live in this paradoxically disconnected online world, "cyberspace" as it were. I like to think of it as just another progression of human adaptation. To say that people are lonelier or happier, more or less fulfilled, busier, or more productive than they were 10, 50, 100, or 500 years ago is a falsehood. We're different, and we're all just trying to &lt;a href="http://www.danah.org/papers/AAAS2006.html"&gt;make the best of where we find ourselves&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-2448859883994036211?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/2448859883994036211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2006/12/on-twitter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2448859883994036211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/2448859883994036211'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2006/12/on-twitter.html' title='On Twitter'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7067202814937947569.post-8547267024392133330</id><published>2006-11-09T20:14:00.000Z</published><updated>2006-11-12T19:27:15.721Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='jabber'/><category scheme='http://www.blogger.com/atom/ns#' term='xmpp'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>Announcing Jabber::Simple</title><content type='html'>Jabber::Simple [&lt;a href="http://code.google.com/p/xmpp4r-simple/"&gt;src&lt;/a&gt;, &lt;a href="http://xmpp4r-simple.rubyforge.org/"&gt;doc&lt;/a&gt;] is a simple (duh!) Ruby library that aims to make the implementation of basic Jabber functionality trivial. It is an extraction of the Jabber support that was added to &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt;, and is released under the GPL by &lt;a href="http://obvious.com/"&gt;Obvious&lt;/a&gt;. A line of code is worth a thousand words, so here is the complete code for sending a simple message to a Jabber user:

&lt;pre&gt;&lt;code&gt;
jabber = Jabber::Simple.new('rex@friendosaurus.com', 'password')
jabber.deliver("bront@friendosaurus.com", "Hey! I'm thinking of going Vegetarian - Any suggestions?")
&lt;/code&gt;&lt;/pre&gt;

Getting incoming messages is just as easy:

&lt;pre&gt;&lt;code&gt;
jabber.received_messages do |msg|
  puts "#{msg.body}" if msg.type == :chat
end
&lt;/code&gt;&lt;/pre&gt;

You can also set your status, and get information about your friends' statuses:

&lt;pre&gt;&lt;code&gt;
jabber.status(:away, "Eating at the Tree Cafe. I need a ladder.")

jabber.presence_updates do |update|
  friend = update[0]
  presence = update[2]
  puts "#{friend.jid} is #{presence.status}"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Installation&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;
sudo gem install xmpp4r-simple
&lt;/pre&gt;&lt;/code&gt;

or download the package from &lt;a href="http://rubyforge.org/projects/xmpp4r-simple/"&gt;RubyForge&lt;/a&gt;. Source code is also &lt;a href="http://code.google.com/p/xmpp4r-simple/"&gt;available&lt;/a&gt;, licensed under the GPLv2.

&lt;h3&gt;Yet Another Jabber Library?&lt;/h3&gt;

There are a number of existing Jabber libraries for Ruby (&lt;a href="http://jabber4r.rubyforge.org/"&gt;jabber4r&lt;/a&gt;, &lt;a href="http://home.gna.org/xmpp4r/"&gt;xmpp4r&lt;/a&gt;, and &lt;a href="http://netxmpp-ruby.jabberstudio.org/"&gt;Net::XMPP&lt;/a&gt;), so why Jabber::Simple?

First off, Jabber::Simple does not aim to replicate any core XMPP protocol functionality present in these libraries &amp;#8212; in fact, Jabber::Simple depends on &lt;a href="http://home.gna.org/xmpp4r/"&gt;xmpp4r&lt;/a&gt; and the &lt;code&gt;Jabber::Simple#client&lt;/code&gt; and &lt;code&gt;Jabber::Simple#roster&lt;/code&gt; methods expose all of xmpp4r's awesome functionality.

When I started building in Jabber support for &lt;a href="http://twitter.com/"&gt;Twitter&lt;/a&gt; I'd used &lt;a href="http://adiumx.com/"&gt;various&lt;/a&gt; &lt;a href="http://apple.com/ichat/"&gt;Jabber&lt;/a&gt; &lt;a href="http://google.com/talk/"&gt;clients&lt;/a&gt;, and even set up a simple Jabber server. Writing my own client, however, was a bit more complex. It turns out that the seamless experience of "adding a friend" and chatting with them is (unsurprisingly) comprised of a series of disjoint steps, and fraught with the peril of threads, XML streams, and arcane magic. The available libraries handle these tasks and many more admirably, but lack in elegance. My hope is that Jabber::Simple provides a sufficiently &lt;a href="http://obvious.com/"&gt;obvious&lt;/a&gt; interface with which to develop tools that use the Jabber protocol.


&lt;h3&gt;But Wait! There's More!&lt;/h3&gt;

Now, you might shy away from writing that really cool chat-bot you've been meaning to write, saying "Wow, this is great, but setting up a Jabber server is a pain." --- but fear not! Go over to &lt;a href="http://google.com/talk/"&gt;Google Talk&lt;/a&gt; and sign up for an account. Once you're done, use your Google Talk username and password, and start Jabbering. No really, it's that simple.

&lt;pre&gt;&lt;code&gt;
jabber = Jabber::Simple.new("you@gmail.com", "password")
&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7067202814937947569-8547267024392133330?l=romeda.org%2Fblog' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/8547267024392133330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://romeda.org/blog/2006/11/announcing-jabbersimple.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8547267024392133330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7067202814937947569/posts/default/8547267024392133330'/><link rel='alternate' type='text/html' href='http://romeda.org/blog/2006/11/announcing-jabbersimple.html' title='Announcing Jabber::Simple'/><author><name>Blaine</name><uri>http://www.blogger.com/profile/12260514541117400711</uri><email>romeda@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14313198997491368566'/></author><thr:total>12</thr:total></entry></feed>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
