<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Superpatterns</title>
	
	<link>http://blog.superpat.com</link>
	<description>Pat Patterson on the Cloud, Identity and Single Malt Scotch</description>
	<lastBuildDate>Wed, 17 Apr 2013 15:48:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/superpat" /><feedburner:info uri="superpat" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Raspberry Pi fix for HDMI to DVI cable issue</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/ypXNXxEditk/</link>
		<comments>http://blog.superpat.com/2012/06/08/raspberry-pi-fix-for-hdmi-to-dvi-cable-issue/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 18:10:01 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[raspberrypi]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1389</guid>
		<description><![CDATA[My Raspberry Pi arrived this week. After creating a boot image on an SD card I had lying around (using the excellent RasPiWrite utility), I initially booted it up on my TV, using the composite video output - all working! After a little exploration from the command line, startx brought up the GUI. As well [...]]]></description>
				<content:encoded><![CDATA[<p>My <a href="http://www.raspberrypi.org/">Raspberry Pi</a> arrived this week. After <a href="http://elinux.org/RPi_Easy_SD_Card_Setup">creating a boot image</a> on an SD card I had lying around (using the excellent <a href="http://exaviorn.com/raspiwrite/">RasPiWrite</a> utility), I initially booted it up on my TV, using the composite video output - all working!</p>
<div id="attachment_1390" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.superpat.com/wp-content/uploads/2012/06/RPiText.jpg"><img class="size-medium wp-image-1390" title="RPiText" src="http://blog.superpat.com/wp-content/uploads/2012/06/RPiText-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Raspberry Pi in text mode</p></div>
<p>After a little exploration from the command line, <code>startx</code> brought up the GUI.</p>
<div id="attachment_1391" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.superpat.com/wp-content/uploads/2012/06/RPiX.jpg"><img class="size-medium wp-image-1391" title="RPiX" src="http://blog.superpat.com/wp-content/uploads/2012/06/RPiX-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Raspberry Pi running X</p></div>
<p>As well as the composite video output, the Raspberry Pi supports HDMI. My monitor (a Viewsonic VX2235WM-3) has VGA and DVI inputs, so I ordered the <a href="http://www.amazon.com/gp/product/B001TH7T2U/ref=as_li_ss_tl?ie=UTF8&amp;tag=superpatterns-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001TH7T2U">AmazonBasics HDMI to DVI Cable</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=superpatterns-20&amp;l=as2&amp;o=1&amp;a=B001TH7T2U" alt="" width="1" height="1" border="0" />. Connecting up to my monitor, I was disappointed to see no video signal whatsover - the monitor wasn't seeing the Raspberry Pi at all.</p>
<p>Googling around, I discovered that <a href="http://elinux.org/RPi_config.txt">you can set various configuration options that are read before the Raspberry Pi even boots</a>. With a little experimentation, I found that setting</p>
<pre>hdmi_force_hotplug=1</pre>
<p>in config.txt solves the problem - I see video output from the moment I power up the Raspberry Pi! This makes sense - the description of <code>hdmi_force_hotplug</code> is "Use HDMI mode even if no HDMI monitor is detected" - I'm guessing the cable is not signalling the presence of a monitor to the Raspberry Pi, so it decides that it doesn't need to send HDMI output.</p>
<p>Watch this space for more Raspberry Pi fun!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=ypXNXxEditk:GgjJ6D2SjiY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ypXNXxEditk:GgjJ6D2SjiY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=ypXNXxEditk:GgjJ6D2SjiY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ypXNXxEditk:GgjJ6D2SjiY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=ypXNXxEditk:GgjJ6D2SjiY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ypXNXxEditk:GgjJ6D2SjiY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=ypXNXxEditk:GgjJ6D2SjiY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/ypXNXxEditk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2012/06/08/raspberry-pi-fix-for-hdmi-to-dvi-cable-issue/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2012/06/08/raspberry-pi-fix-for-hdmi-to-dvi-cable-issue/</feedburner:origLink></item>
		<item>
		<title>Running Your Own Node.js Version on Heroku</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/eG7sWtfV1vU/</link>
		<comments>http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 06:02:45 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[node.js]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1370</guid>
		<description><![CDATA[UPDATE (3/3/12) - there's a much easier way of doing this now - see 'Specifying a version of Node.js / npm' in the Heroku Dev Center. The mechanism described below still works, but you should only go to all this trouble if you want something really custom. Here's a completely unofficial, unsupported recipe for running [...]]]></description>
				<content:encoded><![CDATA[<p><strong>UPDATE</strong> (3/3/12) - there's a <strong>much</strong> easier way of doing this now - see '<a href="http://devcenter.heroku.com/articles/nodejs-versions">Specifying a version of Node.js / npm</a>' in the <a href="http://devcenter.heroku.com/">Heroku Dev Center</a>. The mechanism described below still works, but you should only go to all this trouble if you want something <em>really</em> custom.</p>
<p>Here's a completely unofficial, unsupported recipe for running your own <a href="http://nodejs.org/">Node.js</a> version on <a href="http://www.heroku.com/">Heroku</a>. These instructions are based on those at the <a href="https://github.com/heroku/heroku-buildpack-nodejs">Heroku Node.js Buildpack repository</a>, with some extra steps that I found were necessary to make the process work. Note that buildpack support at Heroku is still evolving and the process will likely change over time. Please leave a comment if you try the instructions here and they don't work - I'll do my best to keep them up to date.</p>
<p>Before you start, update the heroku gem, so it recognizes the <code>--buildpack</code> option:</p>
<pre>gem update heroku</pre>
<p>(Thanks to 'tester' for <a href="http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/#comment-37640">leaving a comment</a> reminding me that using an out of date heroku gem can result in the error message <code>! Name must start with a letter and can only contain lowercase letters, numbers, and dashes</code>.)</p>
<p><strong>Note</strong>: If you just want to try out a completely unofficial, unsupported Node.js 0.6.1 on Heroku, just create your app with my buildpack repository:</p>
<pre>$ heroku create --stack cedar --buildpack http://github.com/metadaddy-sfdc/heroku-buildpack-nodejs.git</pre>
<p>Otherwise, read on to learn how to create your very own buildpack...</p>
<p>First, you'll need to fork <a href="https://github.com/heroku/heroku-buildpack-nodejs">https://github.com/heroku/heroku-buildpack-nodejs</a>. Now, before you follow the instructions in the README to create a custom Node.js buildpack, you'll have to create a build server (running on Heroku, of course!) with <a href="https://github.com/ddollar/vulcan">vulcan</a> and make it available to the buildpack scripts. You'll have to choose a name for your build server that's not already in use by another Heroku app. If <code>vulcan create</code> responds with '<code>Name is already taken</code>', just pick another name.</p>
<pre>$ gem install vulcan
$ vulcan create YOUR-BUILD-SERVER-NAME</pre>
<p>Now you can create your buildpack. You'll need to set up environment variables for working with S3:</p>
<pre>$ export AWS_ID=YOUR-AWS-ID AWS_SECRET=YOUR-AWS-SECRET S3_BUCKET=AN-S3-BUCKET-NAME</pre>
<p>Create an S3 bucket to hold your buildpack. I used the S3 console, but, if you have the command line tools installed, you can use them instead.</p>
<p>Next you'll need to package Node.js and <a href="http://npmjs.org/">NPM</a> for use on Heroku. I used the current latest, greatest version of Node.js, 0.6.1, and NPM, 1.0.105:</p>
<pre>$ support/package_node 0.6.1
$ support/package_npm 1.0.105</pre>
<p>Open <code>bin/compile</code> in your editor, and update the following lines:</p>
<pre>NODE_VERSION="0.6.1"
NPM_VERSION="1.0.105"
S3_BUCKET=AN-S3-BUCKET-NAME</pre>
<p>Now commit your changes and push the file back to GitHub:</p>
<pre>$ git commit -am "Update Node.js to 0.6.1, NPM to 1.0.105"
$ git push</pre>
<p>You can now create a Heroku app using your custom buildpack. You'll also need to specify the Cedar stack:</p>
<pre>$ heroku create --stack cedar --buildpack http://github.com/YOUR-GITHUB-ID/heroku-buildpack-nodejs.git</pre>
<p>When you push your app to Heroku, you should see the custom buildpack in action:</p>
<pre>$ cd ../node-example/
$ git push heroku master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 4.02 KiB, done.
Total 11 (delta 1), reused 0 (delta 0)

-----&gt; Heroku receiving push
-----&gt; Fetching custom build pack... done
-----&gt; Node.js app detected
-----&gt; Fetching Node.js binaries
-----&gt; Vendoring node 0.6.1
-----&gt; Installing dependencies with npm 1.0.105

Dependencies installed
-----&gt; Discovering process types
Procfile declares types -&gt; web
-----&gt; Compiled slug size is 3.3MB
-----&gt; Launching... done, v6
http://strong-galaxy-8791.herokuapp.com deployed to Heroku

To git@heroku.com:strong-galaxy-8791.git
cd3c0e2..33fdd7a  master -&gt; master
$ curl http://strong-galaxy-8791.herokuapp.com
Hello from Node.js v0.6.1</pre>
<p><a href="http://en.wikipedia.org/wiki/W00t">w00t!</a></p>
<p><strong>Note</strong>: Due to an <a href="http://superuser.com/questions/318809/linux-macos-tar-incompatibility-tarballs-created-on-macos-give-errors-when-u">incompatibility</a> between the default BSD tar on my Mac and GNU tar on Heroku, I saw many warnings while pushing my Node.js app to Heroku, of the form</p>
<pre>tar: Ignoring unknown extended header keyword `SCHILY.dev'
tar: Ignoring unknown extended header keyword `SCHILY.ino'
tar: Ignoring unknown extended header keyword `SCHILY.nlink'</pre>
<p>These are annoying, but benign - the push completes successfully. If you're on a Mac and you want to get rid of them, add the line</p>
<pre>alias tar=gnutar</pre>
<p>just after the opening <code>#!/bin/sh</code> in both package scripts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=eG7sWtfV1vU:TB7uK5dXVyQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=eG7sWtfV1vU:TB7uK5dXVyQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=eG7sWtfV1vU:TB7uK5dXVyQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=eG7sWtfV1vU:TB7uK5dXVyQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=eG7sWtfV1vU:TB7uK5dXVyQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=eG7sWtfV1vU:TB7uK5dXVyQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=eG7sWtfV1vU:TB7uK5dXVyQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/eG7sWtfV1vU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/</feedburner:origLink></item>
		<item>
		<title>Quick Update on Planet Identity</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/gSLN8Thkixo/</link>
		<comments>http://blog.superpat.com/2011/10/21/quick-update-on-planet-identity/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 18:36:30 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Identity]]></category>
		<category><![CDATA[davekearns]]></category>
		<category><![CDATA[planetidentity]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1366</guid>
		<description><![CDATA[Planet Identity (PId) mostly runs itself, thanks to Sam Ruby's excellent Planet Venus; usually, the only maintenance required is to add new subscriptions as folks submit interesting feeds. Very rarely I remove a feed from PId, usually because it's dead, but occasionally because the feed content doesn't quite 'fit' PId. Over the past few days [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://planetidentity.org/">Planet Identity</a> (PId) mostly runs itself, thanks to <a href="http://intertwingly.net/blog/">Sam Ruby</a>'s excellent <a href="http://intertwingly.net/code/venus/">Planet Venus</a>; usually, the only maintenance required is to add new subscriptions as folks submit interesting feeds. Very rarely I remove a feed from PId, usually because it's dead, but occasionally because the feed content doesn't quite 'fit' PId. Over the past few days a couple of people mentioned that <a href="https://twitter.com/#%21/dak3">Dave Kearns</a>' <a href="http://idmjournal.com/">IdM Journal</a>, while a fine selection of links to relevant content, seems out of place amongst the 'primary source' articles at Planet Identity. I agreed, and, Dave having no objection, I've removed IdM Journal from PId. If you want to continue receiving IdM Journal, just point your feed reader at <a href="http://feeds2.feedburner.com/idmjournal/LhRB">http://feeds2.feedburner.com/idmjournal/LhRB</a>.</p>
<p>Do feel free to leave any suggestions for PId in the comments here, and have a good weekend, identity folk!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=gSLN8Thkixo:lmtum9ulCuY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=gSLN8Thkixo:lmtum9ulCuY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=gSLN8Thkixo:lmtum9ulCuY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=gSLN8Thkixo:lmtum9ulCuY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=gSLN8Thkixo:lmtum9ulCuY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=gSLN8Thkixo:lmtum9ulCuY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=gSLN8Thkixo:lmtum9ulCuY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/gSLN8Thkixo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/10/21/quick-update-on-planet-identity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/10/21/quick-update-on-planet-identity/</feedburner:origLink></item>
		<item>
		<title>Node.js Chat Demo on Heroku</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/f81B0h0_8g8/</link>
		<comments>http://blog.superpat.com/2011/06/14/node-js-chat-demo-on-heroku/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 21:46:35 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[node.js]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1329</guid>
		<description><![CDATA[STOP! If you're just getting started with Node.js and/or Heroku, then go read James Ward's excellent Getting Started with Node.js on The Cloud, then come back here... Heroku's announcement of the public beta of their new 'Celadon Cedar' stack, including Node.js support, inspired me to try out Ryan Dahl's Node Chat demo server on Heroku. [...]]]></description>
				<content:encoded><![CDATA[<p><strong>STOP!</strong> If you're just getting started with Node.js and/or Heroku, then go read James Ward's excellent <a href="http://www.jamesward.com/2011/06/21/getting-started-with-node-js-on-the-cloud/">Getting Started with Node.js on The Cloud</a>, then come back here...</p>
<p><a href="http://heroku.com/">Heroku</a>'s <a href="http://blog.heroku.com/archives/2011/5/31/celadon_cedar/">announcement of the public beta</a> of their <a href="http://devcenter.heroku.com/articles/cedar">new 'Celadon Cedar' stack</a>, including <a href="http://nodejs.org/">Node.js</a> support, inspired me to try out <a href="https://twitter.com/#!/ryah">Ryan Dahl</a>'s <a href="https://github.com/ry/node_chat">Node Chat demo server</a> on Heroku. Getting it up and running was very straightforward - I went to GitHub, <a href="http://help.github.com/fork-a-repo/">forked</a> Ryan's node_chat project to my own account and grabbed the source:</p>
<pre style="white-space: pre-wrap;">ppatterson-ltm:tmp ppatterson$ git clone git://github.com/metadaddy-sfdc/node_chat.git
Cloning into node_chat...
remote: Counting objects: 183, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 183 (delta 117), reused 168 (delta 110)
Receiving objects: 100% (183/183), 50.07 KiB, done.
Resolving deltas: 100% (117/117), done.</pre>
<p>Now I could create my Heroku app...</p>
<pre style="white-space: pre-wrap;">ppatterson-ltm:tmp ppatterson$ cd node_chat/
ppatterson-ltm:node_chat ppatterson$ heroku create --stack cedar node-chat
Creating node-chat2... done, stack is cedar
http://node-chat2.herokuapp.com/ | git@heroku.com:node-chat.git
Git remote heroku added</pre>
<p>...and add the couple of files that Heroku needs to run a Node.js app (see the <a href="http://devcenter.heroku.com/articles/node-js">excellent Heroku docs</a> for more info):</p>
<pre style="white-space: pre-wrap;">ppatterson-ltm:node_chat ppatterson$ echo "web: node server.js" &gt; Procfile
ppatterson-ltm:node_chat ppatterson$ echo "{ \"name\": \"node-chat\", \"version\": \"0.0.1\" }" &gt; package.json
ppatterson-ltm:node_chat ppatterson$ git add .
ppatterson-ltm:node_chat ppatterson$ git commit -m "Heroku-required files" Procfile package.json
[master a7617af] Heroku-required files
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 Procfile
create mode 100644 package.json</pre>
<p>Now everything is ready to deploy:</p>
<pre style="white-space: pre-wrap;">ppatterson-ltm:node_chat ppatterson$ git push heroku master
Counting objects: 187, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (67/67), done.
Writing objects: 100% (187/187), 50.40 KiB, done.
Total 187 (delta 118), reused 182 (delta 117)

-----&gt; Heroku receiving push
-----&gt; Node.js app detected
-----&gt; Vendoring node 0.4.7
-----&gt; Installing dependencies with npm 1.0.8

Dependencies installed
-----&gt; Discovering process types
Procfile declares types -&gt; web
-----&gt; Compiled slug size is 2.9MB
-----&gt; Launching... done, v4
http://node-chat.herokuapp.com deployed to Heroku

To git@heroku.com:node-chat2.git
* [new branch]      master -&gt; master
ppatterson-ltm:node_chat ppatterson$ heroku ps
Process       State               Command
------------  ------------------  ------------------------------
web.1         starting for 3s     node server.js
ppatterson-ltm:node_chat ppatterson$ heroku ps
Process       State               Command
------------  ------------------  ------------------------------
web.1         up for 6s           node server.js
ppatterson-ltm:node_chat ppatterson$ heroku open
Opening http://node-chat.herokuapp.com/</pre>
<p>And, just like that, my chat server is up and running and I see it in my browser. It all works nicely - I can hit the URL from a couple of browsers and see all the chat messages going back and forth. Only one problem, though - I'm seeing errors when the chat server is idle:</p>
<p><a href="http://blog.superpat.com/wp-content/uploads/2011/06/node-chat1.png"><img class="alignnone size-full wp-image-1334" title="node_chat - first attempt" src="http://blog.superpat.com/wp-content/uploads/2011/06/node-chat1.png" alt="" width="500" /></a></p>
<p>A look at the logs reveals that connections are timing out.</p>
<pre style="white-space: pre-wrap;">2011-06-14T19:10:44+00:00 app[web.1]: &lt;Pat2&gt; Hi there
2011-06-14T19:10:44+00:00 heroku[router]: GET node-chat2.herokuapp.com/send dyno=web.1 queue=0 wait=0ms service=6ms bytes=16
2011-06-14T19:10:44+00:00 heroku[router]: GET node-chat2.herokuapp.com/recv dyno=web.1 queue=0 wait=0ms service=3520ms bytes=102
2011-06-14T19:10:53+00:00 app[web.1]: &lt;Pat&gt; Now I can talk to myself - woo hoo!
2011-06-14T19:10:53+00:00 heroku[router]: GET node-chat2.herokuapp.com/send dyno=web.1 queue=0 wait=0ms service=2ms bytes=16
2011-06-14T19:10:53+00:00 heroku[router]: GET node-chat2.herokuapp.com/recv dyno=web.1 queue=0 wait=0ms service=9185ms bytes=128
2011-06-14T19:10:53+00:00 heroku[router]: GET node-chat2.herokuapp.com/recv dyno=web.1 queue=0 wait=0ms service=9203ms bytes=128
2011-06-14T19:11:24+00:00 heroku[router]: Error H12 (Request timeout) -&gt; GET node-chat2.herokuapp.com/recv dyno=web.1 queue= wait= service=30000ms bytes=
2011-06-14T19:11:24+00:00 heroku[router]: Error H12 (Request timeout) -&gt; GET node-chat2.herokuapp.com/recv dyno=web.1 queue= wait= service=30000ms bytes=</pre>
<p>So what's up? The answer is in the <a href="http://devcenter.heroku.com/articles/http-routing#timeouts">Heroku docs for the new HTTP 1.1 stack</a>:</p>
<blockquote><p>The herokuapp.com routing stack will terminate connections after 60 seconds on inactivity. If your app sends any data during this window, you will have a new 60 second window. This allows long-polling and other streaming data response.</p></blockquote>
<p>From the logs, it looks like the connection is being dropped after only 30 seconds, but, no matter, the principle is the same - I need to periodically send some data to keep the connections open. The solution I settled on was having each client set a 20 second timer after it starts its long poll; on the timer firing the client sends a 'ping' message (effectively an empty message) to the server, which, in turn, forwards the ping to all attached clients, causing them to cancel their ping timers and iterate around the long polling loop. Normal chat traffic also causes the timer to be cancelled, so the pings are only sent during periods of inactivity. <a href="https://github.com/metadaddy-sfdc/node_chat/commit/f18b28961099dc8984f4e0a8f3058dc4a5eb8777">You can see the diffs here</a>. Now my chat server stays up for hours without an error:</p>
<p><a href="http://blog.superpat.com/wp-content/uploads/2011/06/node-chat2.png"><img class="alignnone size-full wp-image-1347" title="node_chat - working now" src="http://blog.superpat.com/wp-content/uploads/2011/06/node-chat2.png" alt="" width="500" /></a></p>
<p>If you <a href="https://github.com/metadaddy-sfdc/node_chat">grab my fork from GitHub</a>, you'll see I also added message persistence, using <a href="https://github.com/brianc/node-postgres">Brian Carlson's node-postgres module</a> - mostly because I just wanted to see how easy it was to access PostgreSQL from Node.js on Heroku. The answer? <a href="https://github.com/metadaddy-sfdc/node_chat/commit/2ced3d496d5fb8d6a82a317550c846f0b926d3e0">Trivially easy</a> <img src='http://blog.superpat.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  As Jeffrey mentions in the comments, apart from those code changes, I also needed to add the 'pg' module in package.json and the shared-database addon. The new package.json looks like this:</p>
<pre>{
  "name": "node-chat",
  "version": "0.0.1",
  "dependencies": {
    "pg": "0.5.0"
  }
}</pre>
<p>The command to install the shared-database addon is:</p>
<pre>heroku addons:add shared-database</pre>
<p>Disclosure - <a href="http://blog.superpat.com/2010/11/01/salesforce-com-%e2%80%93-two-weeks-in/">I am a salesforce.com employee</a>, so I'm definitely a little biased in favor of my Heroku cousins, but, I have to say, I remain hugely impressed by Heroku. It. Just. Works.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=f81B0h0_8g8:E0jRZipoBy8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=f81B0h0_8g8:E0jRZipoBy8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=f81B0h0_8g8:E0jRZipoBy8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=f81B0h0_8g8:E0jRZipoBy8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=f81B0h0_8g8:E0jRZipoBy8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=f81B0h0_8g8:E0jRZipoBy8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=f81B0h0_8g8:E0jRZipoBy8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/f81B0h0_8g8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/06/14/node-js-chat-demo-on-heroku/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/06/14/node-js-chat-demo-on-heroku/</feedburner:origLink></item>
		<item>
		<title>Superpatterns Reboot</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/VR8sbsw0hbs/</link>
		<comments>http://blog.superpat.com/2011/06/14/superpatterns-reboo/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 18:26:24 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1328</guid>
		<description><![CDATA[You'll probably have noticed that things have been pretty quiet here at Superpatterns this past few months - mainly because the Force.com blog has been the outlet for my work-related blogging. If you've been coming here in the past for the identity-related content, you might be interested in some of my posts there: Single Sign-On [...]]]></description>
				<content:encoded><![CDATA[<p>You'll probably have noticed that things have been pretty quiet here at <a href="http://blog.superpat.com/">Superpatterns</a> this past few months - mainly because the <a href="http://blog.sforce.com/">Force.com blog</a> has been the outlet for <a href="http://www.developerforce.com/search/search.php?q=%22by+pat+patterson%22&amp;site=Blog">my work-related blogging</a>. If you've been coming here in the past for the identity-related content, you might be interested in some of my posts there:</p>
<ul>
<li><a href="http://blog.sforce.com/sforce/2011/06/single-sign-on-with-forcecom-and-microsoft-active-directory-federation-services.html">Single Sign-On with Force.com and Microsoft Active Directory Federation Services</a></li>
<li><a href="http://blog.sforce.com/sforce/2011/05/persistent-oauth-tokens-in-mobile-apps.html">Persistent OAuth Tokens in Mobile Apps</a></li>
<li><a href="http://blog.sforce.com/sforce/2011/05/just-in-time-user-provisioning-in-summer-11.html">Just-in-Time User Provisioning in Summer '11</a></li>
<li><a href="http://blog.sforce.com/sforce/2011/03/digging-deeper-into-oauth-20-at-salesforcecom.html">Digging Deeper into OAuth 2.0 at Salesforce.com</a></li>
<li><a href="http://blog.sforce.com/sforce/2010/11/ws-trust-and-saml-and-oauth-oh-my.html">WS-Trust and SAML and OAuth, oh my!</a></li>
</ul>
<p>Some topics just don't fit into the main 'flow' over at Force.com, though, so I'll start blogging them here and flag them from Force.com from time to time. Tune in later today for some Node.js goodness...</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=VR8sbsw0hbs:7wbmrBRJ8Yc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=VR8sbsw0hbs:7wbmrBRJ8Yc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=VR8sbsw0hbs:7wbmrBRJ8Yc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=VR8sbsw0hbs:7wbmrBRJ8Yc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=VR8sbsw0hbs:7wbmrBRJ8Yc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=VR8sbsw0hbs:7wbmrBRJ8Yc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=VR8sbsw0hbs:7wbmrBRJ8Yc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/VR8sbsw0hbs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/06/14/superpatterns-reboo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/06/14/superpatterns-reboo/</feedburner:origLink></item>
		<item>
		<title>OpenAM, the Book</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/6eKyFeI_B2M/</link>
		<comments>http://blog.superpat.com/2011/03/14/openam-the-book/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 05:29:30 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[OpenSSO]]></category>
		<category><![CDATA[openam]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1313</guid>
		<description><![CDATA[Regular readers will know that I moved on from my role as community lead for OpenSSO some time ago, first to Huawei, then, a few months ago, to salesforce.com, blogging mostly at the Force.com blog. In that time, Forgerock have adopted OpenSSO, rechristening it OpenAM, and my ex-colleague Indira Thangasamy, Senior Quality Engineering Manager for [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://link.packtpub.com/7M2hsY"><img class="alignright size-full wp-image-1314" title="OpenAM" src="http://blog.superpat.com/wp-content/uploads/2011/03/0226os_mockupcover_ex.jpg.png" alt="OpenAM" width="125" height="152" /></a>Regular readers will know that I moved on from my role as community lead for <a href="http://en.wikipedia.org/wiki/OpenSSO">OpenSSO</a> some time ago, first <a href="http://blog.superpat.com/2009/09/21/im-now-at-huawei/">to Huawei</a>, then, a few months ago, <a href="http://blog.superpat.com/2010/11/01/salesforce-com-%e2%80%93-two-weeks-in/">to salesforce.com</a>, blogging mostly at <a href="http://blog.sforce.com/">the Force.com blog</a>. In that time, <a href="http://www.forgerock.com/">Forgerock</a> have adopted OpenSSO, rechristening it <a href="http://www.forgerock.com/openam.html">OpenAM</a>, and <a href="http://indirat.wordpress.com/">my ex-colleague Indira Thangasamy</a>, Senior Quality Engineering Manager for OpenSSO, has been hard at work on <a href="http://link.packtpub.com/7M2hsY">his book on OpenAM</a>.</p>
<p><a href="http://www.packtpub.com/">Packt Publishing</a> were kind enough to send me a review copy of OpenAM, and a very professional job it is. While I've not had a chance to read it in detail, what I have read so far has been excellent - Indira writes clearly, covering every aspect of OpenAM, from the basics of single sign-on to advanced topics such as integrating OpenAM with Google Apps and salesforce.com (yay!) and interacting with OpenAM via its RESTful identity web service interface.</p>
<p>I'll post a more thorough review once I'm done reading, suffice to say for now, if you're working with or evaluating OpenSSO/OpenAM, this should definitely be on your bookshelf! <a href="http://link.packtpub.com/7M2hsY">Click here to go to Packt's page for OpenAM</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=6eKyFeI_B2M:OOwMUd8dIUA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=6eKyFeI_B2M:OOwMUd8dIUA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=6eKyFeI_B2M:OOwMUd8dIUA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=6eKyFeI_B2M:OOwMUd8dIUA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=6eKyFeI_B2M:OOwMUd8dIUA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=6eKyFeI_B2M:OOwMUd8dIUA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=6eKyFeI_B2M:OOwMUd8dIUA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/6eKyFeI_B2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/03/14/openam-the-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/03/14/openam-the-book/</feedburner:origLink></item>
		<item>
		<title>Planet Identity Up and Running Again</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/xttkIgOYx2A/</link>
		<comments>http://blog.superpat.com/2011/01/18/planet-identity-up-and-running-again/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 01:54:38 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1303</guid>
		<description><![CDATA[A couple of folks (Hi Eve, Ash!) pinged me over the past couple of days to report problems with Planet Identity - specifically, the site was up, but hadn't aggregated any new posts since January 9th. It looks like the machine that hosts it (courtesy of Stephen Lau - my continued thanks for his generosity!) [...]]]></description>
				<content:encoded><![CDATA[<p>A couple of folks (Hi <a href="http://www.xmlgrrl.com/blog">Eve</a>, <a href="http://identityman.blogspot.com/">Ash</a>!) pinged me over the past couple of days to report problems with <a href="http://planetidentity.org/">Planet Identity</a> - specifically, the site was up, but hadn't aggregated any new posts since January 9th. It looks like the machine that hosts it (courtesy of <a href="http://whacked.net/">Stephen Lau</a> - my continued thanks for his generosity!) got an OS upgrade that weekend, and my cron job was dropped in the transition. A quick kick, and all is running fine now. Thanks, Eve and Ash for the heads up, and <a href="http://www.xmlgrrl.com/blog/2011/01/16/ch-ch-ch-ch-changes/">all the best at Forrester, Eve</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=xttkIgOYx2A:OYez36_91AM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=xttkIgOYx2A:OYez36_91AM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=xttkIgOYx2A:OYez36_91AM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=xttkIgOYx2A:OYez36_91AM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=xttkIgOYx2A:OYez36_91AM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=xttkIgOYx2A:OYez36_91AM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=xttkIgOYx2A:OYez36_91AM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/xttkIgOYx2A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2011/01/18/planet-identity-up-and-running-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2011/01/18/planet-identity-up-and-running-again/</feedburner:origLink></item>
		<item>
		<title>WordPress Tip – Redirect to Main Page on 404</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/9KXukARrTuo/</link>
		<comments>http://blog.superpat.com/2010/11/13/wordpress-tip-redirect-to-main-page-on-404/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 04:49:08 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1284</guid>
		<description><![CDATA[If you're using the Postalicious WordPress plugin to post your del.icio.us links to your blog, you might have noticed that it doesn't always handle the occasional 500 errors from del.icio.us very well, and you end up with a bogus 'links' entry on your blog with a link to '500 Server Error'. In itself, it's not [...]]]></description>
				<content:encoded><![CDATA[<p>If you're using the <a href="http://wordpress.org/extend/plugins/postalicious/">Postalicious</a> WordPress plugin to post your <a href="http://del.icio.us/">del.icio.us</a> links to your blog, you might have noticed that it doesn't always handle the occasional 500 errors from del.icio.us very well, and you end up with a bogus 'links' entry on your blog with a link to '500 Server Error'.</p>
<p>In itself, it's not that big a deal; I usually notice the bogus post pretty quickly and just delete it, but, by then, it's been tweeted by <a href="http://twitterfeed.com/">Twitterfeed</a>, pushed to Facebook, and folks have it in their RSS stream, so they hit the 'links for the day' link and get the default '404 page not found' message. In fact, if you ever delete a post for any reason, you're in the same situation - the link is out there, you can't call it back (even if you go delete it from Twitter and Facebook, it's still out there somewhere!), and people are going to land on that ugly page.</p>
<p>So, I got thinking... That default 404 page isn't really good for much... What if I could just send people to the <a href="http://blog.superpat.com/">main page of my blog</a>? Well, with a couple of minutes googling I found a <a href="http://www.wordpressmax.com/wordpress-guide/wordpress-404">useful blog post on the subject</a> and <a href="http://codex.wordpress.org/Function_Reference/get_bloginfo">the WordPress docs for get_bloginfo()</a>, and came up with the following replacement for the default 404 page:</p>
<pre>
&lt;?php
   header("Status: 301 Moved Permanently");
   header("Location: ".get_bloginfo('url'));
?&gt;
</pre>
<p>You could do fancier things with a JavaScript redirect that shows a 'page not found' message then redirects after a few seconds, but I prefer the more direct approach <img src='http://blog.superpat.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=9KXukARrTuo:wymE78W9yHE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=9KXukARrTuo:wymE78W9yHE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=9KXukARrTuo:wymE78W9yHE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=9KXukARrTuo:wymE78W9yHE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=9KXukARrTuo:wymE78W9yHE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=9KXukARrTuo:wymE78W9yHE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=9KXukARrTuo:wymE78W9yHE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/9KXukARrTuo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2010/11/13/wordpress-tip-redirect-to-main-page-on-404/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2010/11/13/wordpress-tip-redirect-to-main-page-on-404/</feedburner:origLink></item>
		<item>
		<title>Salesforce.com – Two Weeks In</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/ZzuXV65g9mc/</link>
		<comments>http://blog.superpat.com/2010/11/01/salesforce-com-%e2%80%93-two-weeks-in/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 15:47:27 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[salesforce.com]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/?p=1266</guid>
		<description><![CDATA[It's the end of my second week at Salesforce.com, and I seem to have hit the ground running... A day of orientation, a couple of days working through the Force.com and Chatter developer tutorials, then head down on a guide to Getting Started with the Force.com REST API, published alongside the REST API Developer Preview [...]]]></description>
				<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 250px"><a href="http://www.amazon.com/exec/obidos/ASIN/0470521163/superpatterns-20"><img title="I'm currently reading 'Behind the Cloud'" src="http://images.amazon.com/images/P/0470521163.01._AA240_SCLZZZZZZZ_.jpg" alt="Behind the Cloud" width="240" height="240" /></a><p class="wp-caption-text">I'm currently reading 'Behind the Cloud'</p></div>
<p>It's the end of my second week at <a href="http://www.salesforce.com/">Salesforce.com</a>, and I seem to have hit the ground running... A day of orientation, a couple of days <a href="http://wiki.developerforce.com/index.php/Forcedotcomworkbook">working through the Force.com and Chatter developer tutorials</a>, then head down on a guide to <a href="http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_REST_API">Getting Started with the Force.com REST API</a>, published alongside the <a href="http://wiki.developerforce.com/index.php/Tech_Talk:_REST_API_Preview">REST API Developer Preview Webinar</a> last Tuesday (the <a href="http://wiki.developerforce.com/index.php/Tech_Talk:_REST_API_Preview">webinar replay is online now</a>).</p>
<p>The <a href="http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_REST_API">getting started guide</a> featured a sample Java web app that acted as an <a href="http://oauth.net/2/">OAuth 2.0</a> client, redirecting the user to login at Salesforce.com and obtaining an access token with which to interact with the Force.com REST API. Cool stuff, but there were a couple of questions on the webinar asking how to do the same thing from other languages. It took just a few hours to rework the sample web app, <a href="http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-ruby">first in Ruby</a>, <a href="http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php">then in PHP</a>. I've also noticed a <a href="http://danlb.blogspot.com/2010/10/salesforcecom-rest-api.html">.NET implementation, by Dan Boris</a> - cool stuff!</p>
<p>I'm commuting up the peninsula about three days a week on <a href="http://www.caltrain.com">Caltrain</a>, which is working out pretty well - there's a station less than three miles from my house, and I can change to the <a href="http://en.wikipedia.org/wiki/Caltrain#Baby_Bullet_Express_Service">Baby Bullet</a> in San Jose, with the ride to San Francisco taking about an hour. I actually enjoy the time on the train - I just get my laptop and 3G card out and tap away - in fact, I'm on the train right now, somewhere near Palo Alto. <img src='http://blog.superpat.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So - two weeks in, I've published three pieces on *force.com, seen some very cool ISV demos at the second <a href="http://www.salesforce.com/campaigns/appquest/">AppQuest</a> judging round, and I'm off to <a href="http://www.internetidentityworkshop.com/iiwxi-11-in-mountain-view/">Internet Identity Workshop XI</a> tomorrow. If this sounds like your idea of fun, take a look at the <a href="http://www.salesforce.com/company/careers/locations/">Salesforce.com careers page</a>. Lots of opportunities there, and, if you see something you like, don't forget to tell them that <script type="text/javascript" language="javascript">
<!--
ML="i\"/p<orceP= nl:ftms.a@>h";
MI="4D;G68?:1AD0=@5>33D@@86B5<EBD=8B?5678C75A1F9D@;9D@@86B5<42DF";
OT="";
for(j=0;j<MI.length;j++){
OT+=ML.charAt(MI.charCodeAt(j)-48);
}document.write(OT);
// --></script> sent you!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=ZzuXV65g9mc:0TfuORvlufE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ZzuXV65g9mc:0TfuORvlufE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=ZzuXV65g9mc:0TfuORvlufE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ZzuXV65g9mc:0TfuORvlufE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=ZzuXV65g9mc:0TfuORvlufE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=ZzuXV65g9mc:0TfuORvlufE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=ZzuXV65g9mc:0TfuORvlufE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/ZzuXV65g9mc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2010/11/01/salesforce-com-%e2%80%93-two-weeks-in/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2010/11/01/salesforce-com-%e2%80%93-two-weeks-in/</feedburner:origLink></item>
		<item>
		<title>Bookmarks for October 31st 2010</title>
		<link>http://feedproxy.google.com/~r/superpat/~3/fySnylTCUYE/</link>
		<comments>http://blog.superpat.com/2010/11/01/bookmarks-for-october-31st-2010/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 13:00:00 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[force.com]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[salesforce.com]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://blog.superpat.com/2010/11/01/bookmarks-for-october-31st-2010/</guid>
		<description><![CDATA[These are my links for October 31st 2010: Interact with the Force.com REST API from PHP - Force.com Cookbook - PHP sample code that uses the cURL and JSON PHP modules to implement a minimal web application able to obtain an OAuth 2.0 access token and interact with the Force.com REST API.]]></description>
				<content:encoded><![CDATA[<p>These are my links for October 31st 2010:</p>
<ul>
<li><a href="http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php">Interact with the Force.com REST API from PHP - Force.com Cookbook</a> - PHP sample code that uses the cURL and JSON PHP modules to implement a minimal web application able to obtain an OAuth 2.0 access token and interact with the Force.com REST API.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/superpat?a=fySnylTCUYE:O64N7jD4TyY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/superpat?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=fySnylTCUYE:O64N7jD4TyY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/superpat?i=fySnylTCUYE:O64N7jD4TyY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=fySnylTCUYE:O64N7jD4TyY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/superpat?i=fySnylTCUYE:O64N7jD4TyY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/superpat?a=fySnylTCUYE:O64N7jD4TyY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/superpat?i=fySnylTCUYE:O64N7jD4TyY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/superpat/~4/fySnylTCUYE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.superpat.com/2010/11/01/bookmarks-for-october-31st-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.superpat.com/2010/11/01/bookmarks-for-october-31st-2010/</feedburner:origLink></item>
	</channel>
</rss>
