<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Life in Pain &#187; technology</title>
	<atom:link href="http://blog.ericw.org/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ericw.org</link>
	<description>live, love, hurt</description>
	<lastBuildDate>Wed, 18 May 2011 02:37:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Deploying Rack Apps With Cherokee and RVM</title>
		<link>http://blog.ericw.org/2011/02/rack-cherokee-rvm/</link>
		<comments>http://blog.ericw.org/2011/02/rack-cherokee-rvm/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 15:22:06 +0000</pubDate>
		<dc:creator>Eric Will</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[thin]]></category>
		<category><![CDATA[unicorn]]></category>

		<guid isPermaLink="false">http://blog.ericw.org/?p=140</guid>
		<description><![CDATA[A very long effort to document my rails/rack deployment using cherokee and RVM.</p]]></description>
			<content:encoded><![CDATA[<p>I recently spent three days trying to get <a href="http://www.cherokee-project.com/">cherokee</a>-1.0.19 (the version in <a href="http://www.freebsd.org/">FreeBSD</a> ports as of this writing) to serve up a variety of custom web apps (mostly <a href="http://www.rubyonrails.org/">rails</a>-2.3.8) partitioned and <a href="http://rvm.beginrescueend.com/">RVM</a>. I had pretty much zero success Googling for help during this exercise so I thought I might compile my experience here for future Googlers.</p>

<p>Before this I had them deployed using <a href="http://httpd.apache.org/">apache</a>22 and <a href="http://www.modrails.com/">Phusion Passenger</a> (without <a href="http://rvm.beginrescueend.com/">RVM</a>). This set up wasn&#8217;t working well for me. I&#8217;m not saying it&#8217;s the wrong way to go (I&#8217;m also not going to say a zillion rails users can&#8217;t be wrong) but it wasn&#8217;t performing well for me and it wasn&#8217;t really my style. I&#8217;ve been using apache forever, and piling more and more crap on top of it was just getting frustrating. It really just wasn&#8217;t built for this.</p>

<p>So I start to hear about all these young httpds like <a href="http://www.lighttpd.net/">lighttpd</a>, <a href="http://nginx.org/en/">nginx</a>, and <a href="http://www.cherokee-project.com/">cherokee</a>. I poked around a bit, and I decided cherokee&#8217;s graphical configuration interface sounded nice for a change. At this point I should inform you that I did not at all download or look much into <a href="http://www.lighttpd.net/">lighttpd</a> or <a href="http://nginx.org/en/">nginx</a>. They could be just as good for this, but that&#8217;s another blog entry on another blog.</p>

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

<h3>Mongrel or Unicorn or Thin or WEBrick or&#8230;</h3>

<p>One of the first things you need to decide is which back end you want to run. Cherokee needs to know about these processes as this is how it&#8217;ll speak to your app (see the cherokee section below). By default, rails (and almost any rack app) uses WEBrick. WEBrick is great for development, but it&#8217;s pure ruby and pretty slow. I don&#8217;t think you want it serving up your production sites. Historically, a mongrel cluster has been the method of choice for deploying rails. However, mongrel doesn&#8217;t run on ruby-1.9 which is what I use to deploy. <a href="http://code.macournoyer.com/thin/">Thin</a> is a great little server that combines mongrel&#8217;s parser with EventMachine (a fast event-based code system) with rack. Thin can run just about any kind of rack app (rack, rails2, rails3, <a href="http://ramaze.net/">ramaze</a>, probably more) and is really easy to use. However, cherokee isn&#8217;t great at maintaining a thin cluster for you. If one of your instances dies, you&#8217;re going to end up handing someone a 502 error at least once. I personally decided to go with unicorn. <a href="http://unicorn.bogomips.org/">Unicorn</a> can&#8217;t really handle being a front-facing server because it has no KeepAlive support. It acknowledges this, and expects you to use nginx (or in our case, cherokee) in front of it. The great thing about unicorn is that it spawns a management process and then a cluster of workers. The management process does the listening, and decides which worker is best suited to handle your request. If any of the workers die, or need to be killed, the management process will restart them. This means you only need one information source in cherokee (since it manages its own workers it only needs one port, whereas something like thin will need a separate port and thus a separate information source per server in a cluster). I ended up going with unicorn for my big production rails apps with 2-4 workers, and a single thin instance for small <a href="http://www.sinatrarb.com/">sinatra</a> apps that don&#8217;t get a lot of load.</p>

<p>When it comes down to it, this decision is up to you. If you like thin be prepared to juggle as many information sources in cherokee as you have thin servers per cluster. Also be prepared for 502 errors while cherokee spawns thin if it&#8217;s not running. Once spawned, thin will stay running even if cherokee exits (not the case with unicorn, which will exit if cherokee exits or restarts). I don&#8217;t have personal experience with mongrel, but it probably goes something along the same path as thin. WEBrick&#8230; well&#8230; I guess if that&#8217;s how you roll.</p>

<h3>Cherokee and RVM</h3>

<p>Cherokee was the relatively easy part. Aside from the fact that the neat wizards it uses to add virtual servers don&#8217;t usually work right (it seems to assume you&#8217;re using rails-2.2 from the ancient times), the process is pretty simple. You can use the rails wizard to get started. After that, go to the information sources it creates. Here is where you need to tweak. It creates three by default. Depending on which back end you decided on earlier, you&#8217;ll have to tweak these to your pleasure. Most important is the spawning command. This is the command cherokee executes if it can&#8217;t find the interpreter running where it&#8217;s supposed to be. First, however, each information source has to have an environment. You can inherit the environment from cherokee (probably not what you want) or you can set up a fresh one. Since we&#8217;re using RVM we&#8217;re going to need bash, because RVM is written in bash shell script. One of the maddening things that happened to me was that I was executing the right commands without realizing there was no <code>PATH</code> and so RVM couldn&#8217;t work because bash couldn&#8217;t be found. So if nothing else, create an environment variable named <code>PATH</code> with some value along the lines of:</p>

<pre><code>/bin:/usr/bin:/usr/local/bin:/usr/local/www/.rvm/bin
</code></pre>

<p>You should change that last bit there to the location of the RVM installation you&#8217;re using. Other pertinent environment variables might be things such as <code>RAILS_ENV</code> and <code>RACK_ENV</code> (for &#8220;production&#8221;, &#8220;development&#8221;, etc).</p>

<p>The starting point and probably most intensive part of this is <a href="http://rvm.beginrescueend.com/">RVM</a>. RVM is a set of shell scripts and environment trickery that allows you to install and manage multiple versions of ruby. In addition to this it allows you to separate gems into &#8220;gemsets&#8221; which are unique to each version of ruby you have managed. The gemsets allow you to install a fresh set of gems for each gemset. This was why I was determined to use RVM with my deployment. I don&#8217;t really need multiple versions of ruby itself, but doing that would work just fine with how I did things as well. I installed a limited set of gems that appear in all gemsets (the &#8220;global&#8221; gemset) such as <code>rake</code> and <code>bundler</code> and <code>thin</code> and <code>unicorn</code>. After that, each app has its own gemset with its own local version of rails, rack, and whatever else it needs. This keeps things nicely partitioned and even acts as a sandbox to some degree (to really get sandboxing, <code>bundler</code> offers just superb possibilities).</p>

<p>However, RVM also proved to be the most difficult part of this setup to get working properly. When you&#8217;re working with RVM in your shell you have environment variables and your shell loads RVM&#8217;s magic into itself when you first start the shell. Of course, cherokee isn&#8217;t going to execute your <code>~/.profile</code> when it runs the interpreter for requests. So how do you get RVM&#8217;s magic in there? RVM provides a set of &#8220;wrappers&#8221; that set up all of its environment and magic. These are in <code>~/.rvm/wrappers/</code> by default. So in cherokee&#8217;s information source you need to set up <code>PATH</code> as described above. After that, it&#8217;s really just a matter of perfecting your spawn command. I use unicorn, which only requires a single information source, and my RVM is installed in <code>/usr/local/www/.rvm/</code>, so my spawn command looks something like:</p>

<pre><code>/usr/local/www/.rvm/wrappers/ruby-1.9.2-p180@NameOfApp/ruby /usr/local/www/.rvm/gems/ruby-1.9.2-p180@global/bin/unicorn_rails -c /usr/local/www/NameOfApp/unicorn.conf -E production
</code></pre>

<p>Wow, that&#8217;s a mess. Unfortunately they&#8217;re probably all going to be pretty messy like this. So let&#8217;s break that down:</p>

<pre><code>/path/to/rvm/wrapper/ruby-version@gemset/ruby /path/to/backend --args
</code></pre>

<p>The first command is your ruby executable. Since cherokee doesn&#8217;t know about RVM, in order to allow RVM to set up its magic you have to execute a bash script in the <code>wrappers/</code> directory. This script sets up the necessary magic for the gemset you selected (in this case, <code>NameOfApp</code>) and executes the ruby binary with those gems. The second part is the back end you&#8217;re using. In my case, I execute <code>unicorn_rails</code> which I&#8217;ve installed as a gem in the <code>global</code> gemset (which appears in all gemsets for that ruby version) and pass it a configuration file that tells it what app it&#8217;s serving and how to serve it. Let&#8217;s say you&#8217;re using the default rails server:</p>

<pre><code>/path/to/rvm/wrapper/ruby-version@gemset/ruby /path/to/rails_app/script/server -p port
</code></pre>

<p>This is a little easier, right? In rails-2.3.x (use <code>rails server</code> or <code>script/rails server</code> for rails-3) this would probably launch WEBrick listening on the port that your cherokee information source is expecting (cherokee asks us not to pass any flags to make the server daemonize as cherokee takes care to route the input/output/error streams to useful places and manages other aspects that forking would break). The bit that makes others installed as a gem ugly looking is that you have to find the binary they installed and you have to figure out how to tell them &#8220;go in /path/to/rails_app and run that app in there.&#8221; With unicorn, you can tell it that (and much more) with a unicorn.conf (that doesn&#8217;t need to be in the same directory as the app). With thin, you can tell it that with a configuration file that thin can output using <code>thin config</code> or you can simply run <code>thin start -c /path/to/rails_app</code>. While mine in particular is kind of ugly, it isn&#8217;t as complex as it appears.</p>

<p>Once you figure out the right spawning command, and the RVM scripts can figure out everything they need to run from <code>PATH</code>, you should be good to go. Depending on what back end you&#8217;re using, the first time you try to visit the app&#8217;s address you might get a 502 error from cherokee while it launches the spawning process (typically happens with thin but not with unicorn, and sometimes with <code>script/server</code>) so if you get a 502 try refreshing the page immediately.</p>

<h3>Troubleshooting</h3>

<p>A lot can go wrong. I think probably just about all of it went wrong for me at some point.</p>

<h4>502 Bad Gateway</h4>

<p>This is the error cherokee tosses out if it can&#8217;t get one of your information sources on the phone. This can be because they&#8217;re all busy, but more likely if you&#8217;re reading this it&#8217;s because your spawn command is broken. The best way to investigate this is to set up an error log in the virtual server using the information source that isn&#8217;t working. Cherokee will log the output from the spawn command here. If you see something like <code>ruby not found</code> it&#8217;s because you&#8217;ve gotten the first part of your spawn command wrong. First off, use full paths. Don&#8217;t assume <code>ruby-1.9.2-p180@NameOfApp</code> is in the PATH you set. Sometimes even if it is, it still won&#8217;t run right without a full path. If you see something like <code>env: bash not found</code> it&#8217;s because something or another wasn&#8217;t found in your <code>PATH</code>. Make sure the <code>PATH</code> you set includes anything ruby, RVM, or your back end needs to run.</p>

<p>Another chance is that your spawn command is right but the app you&#8217;re trying to run is having an error. Maybe you&#8217;re missing a gem, or there&#8217;s a syntax error, or any other ruby-level error that&#8217;d cause a backtrace in ruby. You can examine your back end or app logs to find this. Another good way to make sure that your app runs fine is running an equivalent of the spawn command in your shell. Try <code>thin start</code> in an app you&#8217;re running with thin. If it&#8217;s a ruby backtrace you&#8217;ll see it here. Same goes for <code>unicorn_rails</code> or <code>script/server</code>. Generally, if your app runs in your development environment and it doesn&#8217;t run here, it&#8217;s because you forgot something like a gem or other dependency. Also make sure you&#8217;re using the right ruby/gemset in RVM. Running the back end by hand before allowing cherokee to spawn it automatically is always a good idea.</p>

<h4>504 Gateway Timeout</h4>

<p>This usually happens because, while cherokee can get one of your information sources on the phone, it doesn&#8217;t answer in a timely fashion. This can be because you&#8217;re getting slammed and they&#8217;re just running slowly, or more likely because one of the back end processes is attempting to process a request that&#8217;s taking a while. This can be anything from something CPU-intensive to something database-intensive. Examine your SQL queries. check your back end or app logs. For me, this is most often a network or database issue.</p>

<h3>The End</h3>

<p>I hope this helps. If not, and you&#8217;re using cherokee, RVM, and rack apps, my contact information is all over this blog. Feel free to get in touch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ericw.org/2011/02/rack-cherokee-rvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Comcast is Lying</title>
		<link>http://blog.ericw.org/2010/12/why-comcast-is-lying/</link>
		<comments>http://blog.ericw.org/2010/12/why-comcast-is-lying/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 02:27:44 +0000</pubDate>
		<dc:creator>Eric Will</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[comcast]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[net neutrality]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://pain.ericw.org/?p=122</guid>
		<description><![CDATA[A brief essay on how Comcast is breaking all the rules in order get paid twice for the same thing.</p]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s currently a big debate going on about Comcast, Netflix, and Level 3. Level 3 is saying that Comcast is forcing them to pay them money that really serves Comcast, and Comcast is saying this is a simple peer dispute and not only is Level 3 lying, but Comcast has &#8220;bent over backwards&#8221; to accommodate Level 3.</p>

<p>Comcast&#8217;s argument goes along the lines of a peering dispute. Level 3 is sending much more traffic to Comcast&#8217;s network than Comcast is sending to Level 3&#8242;s network, thus Level 3 must pay (let&#8217;s ignore that this is Comcast&#8217;s very business model: their customers are allotted much more download bandwidth than upload bandwidth, but Comcast feigns surprise). This happened just a few years ago when Cogent was passing much more traffic onto Level 3&#8242;s network than Level 3 was onto Cogent&#8217;s network. Cogent refused to pay up, and Level 3 terminated their peering arrangement. The case of Level 3 vs Cogent was right, and the case of Comcast vs Level 3 is wrong, and here&#8217;s why.</p>

<h3>The Simple Explanation</h3>

<p>Comcast is wrong, because Level 3 isn&#8217;t sending traffic over Comcast&#8217;s network in order to reach a destination on the other side of Comcast&#8217;s network (called <strong>transmit</strong> traffic). Level 3 is delivering Netflix content from its network directly to Comcast customers, because Comcast customers have asked for this content (&#8220;I want to watch this movie, stream it to my face please&#8221;). Comcast&#8217;s subscribers are paying Comcast for this. What Comcast is doing is turning around and making Level 3 pay for the same thing again. They are double-dipping, just as they have in the past. When it was Level 3 vs Cogent, Cogent was <strong>transmitting</strong> traffic <em>over</em> Level 3&#8242;s network to another end point. They were using Level 3 to cut their own costs because, at the time, Level 3 was directly peering with Cogent&#8217;s end destination, and it was saving Cogent money while costing Level 3 money. This is not the same thing. Level 3 is <strong>delivering</strong> traffic directly to Comcast, not using Comcast&#8217;s network to <strong>transmit</strong> traffic to a different end point. Comcast&#8217;s customers are paying Comcast to deliver this content to them, and the people that are doing the actual delivering shouldn&#8217;t only <em>not</em> have to pay Comcast, they should actually be <em>getting paid by</em> Comcast. You pay the UPS driver, not the other way around.</p>

<h3>The Not-As-Simple Explanation</h3>

<p>It&#8217;s a little more complicated than that.</p>

<p>The way the Internet works is that you buy access from your ISP (e.g. Comcast), they in turn (perhaps through some number of additional intermediaries) <strong>buy</strong> access to the Internet&#8217;s core backbone from a Tier 1 provider (like Level 3). If you were a big enough network, you could &#8220;peer&#8221; without paying anything (since there was no particular reason for one network to pay the other or vice versa so long as they exchange roughly the same amount of traffic in both directions). The way it worked in the Old Days was that content providers (like Netflix) would always be uploading more than they download, so the rule of thumb became that if you upload too much data without downloading, you can&#8217;t peer for free. This rule of thumb existed to distinguish content providers from ISPs and make them pay. It is <strong>unheard of</strong> for a backbone provider to pay an ISP. ISPs like Comcast always used to have approximately symmetrical load to their uplink providers: their customers would download more than they upload, which means they would have &#8220;surplus&#8221; upload bandwidth &#8220;for free&#8221; which they could sell to local content providers. Selling to content providers like this is efficient because otherwise the surplus upload bandwidth is lost (&#8220;use it or lose it&#8221;).</p>

<p>Some of these content providers in modern times turned into content delivery networks (CDNs) like Akamai. The CDNs kind of messed with the model. Instead of buying Comcast&#8217;s surplus upload bandwidth to the backbone, they connected to Comcast&#8217;s network directly to serve content only to Comcast&#8217;s customers. In other words, they evened out Comcast&#8217;s uplink to Level 3 not by increasing upload traffic as was the traditional model, but by decreasing download traffic from the backbone. This still works.</p>

<p>So now what&#8217;s happening with Level 3? Netflix is moving from Akamai to a data center operated by Level 3 which is only connected to Comcast through Level 3&#8242;s backbone. What this does from Comcast&#8217;s perspective is both deprive them of the money Akamai was paying them and give them a huge amount of &#8220;free&#8221; upload bandwidth. What Comcast is then supposed to do is shop this surplus bandwidth around to content providers; or, sell Comcast Business customers higher upload rates (or just about anything else) They&#8217;re supposed to sell it, because they can sell it most efficiently; there is a pipe going into Comcast which is only full in one direction and the only way to fill it is to put something which uploads a lot on the Comcast side.</p>

<p>Comcast apparently doesn&#8217;t want to do that. I can really only think of two possible reasons for this. First, there is so much upload bandwidth that no one would possibly want to buy it. I find this to be pretty unfathomable. Supply and demand says that if the price is right, someone will pay. Second, Comcast is double-dipping and trying to sell access to their customers as a scarce resource; in other words they&#8217;re trying to force Level 3 to pay more for the bandwidth than it would sell for on the open market, because buying it from Comcast is the only way to get access to Comcast&#8217;s customers. Comcast has a monopoly on its customers (who already pay them, mind you).</p>

<p>As for Cogent, they were sending traffic over Level 3&#8242;s network to third party networks. That is, they weren&#8217;t delivering traffic to Level 3 customers, they were delivering content to people Level 3 isn&#8217;t getting paid by, while not paying Level 3 themselves. So Cogent was <strong>making</strong> money, and Level 3 was <strong>losing</strong> money. In Comcast&#8217;s case, Level 3 is delivering content to Comcast customers, who <strong>are</strong> paying Comcast for that content.</p>

<p>Level 3 has no monopoly on access to third party networks; there are other backbone providers. Comcast has a monopoly over access to Comcast customers. This is the main difference.</p>

<h3>Why You Should Care</h3>

<p>The people that are calling this a net neutrality issue aren&#8217;t far off: Comcast isn&#8217;t filtering based on content; it&#8217;s actually much worse than that: Comcast is <em>charging content providers</em> in order to allow them to send their content to Comcast&#8217;s customers. This is absurd. If this is allowed to continue (which all of the ISPs are hoping for judging by Time Warner&#8217;s recent endorsement of the Comcast/Level 3 deal) then you&#8217;ll only be able to get Netflix from Sprint, and you&#8217;ll only be able to get Hulu on Comcast, and you&#8217;ll only be able to get to YouTube from, well, whomever YouTube decides to pay. Because ISPs are so large they have the only pipe leading to tens of millions of people and they&#8217;ve decided they should be able to charge the rest of the world to send those people the content those people want to see, which is in fact the very reason those people pay those ISPs to begin with.</p>

<h3>So Why Pay Comcast?</h3>

<p>Level 3 is alleging they agreed to the deal under duress, and are complaining about it now because now is the only time they reasonably could. If they had said &#8220;suck it&#8221; and disconnected from Comcast, any traffic that Level 3 needs to send to Comcast customers (namely Netflix, which they have a contracted obligation to do) would have to be <em>transmitted</em> over one of Level 3&#8242;s peers, and then routed to Comcast.</p>

<p>Ignore that Comcast would march over to the new peer and demand the same thing they&#8217;ve demanded from Level 3. Ignore that Level 3 would undoubtedly have to pay quite a bit of money to this peer to <em>transmit</em> their Netflix traffic to Comcast&#8217;s customers. Doing this would seriously degrade the quality of the video Level 3 is transmitting because now it has to take (at minimum) one more step between Level 3 and the customers that are paying both Comcast <strong>and</strong> Netflix for high quality video. You can bet that Comcast knew they couldn&#8217;t say &#8220;blow us&#8221; without violating their contract with Netflix.</p>

<h3>Not-A-Car Analogy</h3>

<p>Say you rent a DSL line from the telephone company, but (because you&#8217;re currently free to do so) you use an ISP that is not the telephone company. You&#8217;re assigned a bandwidth of 1000Kbps downstream and 256Kbps upstream. You download 200GiB per month, and you upload 50GiB per month from the ISP (which doesn&#8217;t own your line). In this case, your ISP is sending your line far more traffic than you&#8217;re sending back to their lines. Under Comcast&#8217;s new logic, the ISP should be paying you in this situation. You own the line, it costs you money for them to send data to you (never mind you&#8217;ve requested it, just like Comcast&#8217;s customers), and it&#8217;s not balanced because you&#8217;re not costing them the same amount.</p>

<p>Does this make any sense at all to any sane person? Of course it doesn&#8217;t. The ISP would laugh your invoice all the way to the trash.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ericw.org/2010/12/why-comcast-is-lying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Research Relieves</title>
		<link>http://blog.ericw.org/2010/02/research-relieves/</link>
		<comments>http://blog.ericw.org/2010/02/research-relieves/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 03:55:06 +0000</pubDate>
		<dc:creator>Eric Will</dc:creator>
				<category><![CDATA[medication]]></category>
		<category><![CDATA[pharmacology]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://pain.ericw.org/?p=38</guid>
		<description><![CDATA[A quick look at how rodent research has led to understanding and relief of various clinical pain states.</p]]></description>
			<content:encoded><![CDATA[<p>Recently my <a href="http://blog.xzion.net/">friend</a> and I have been going <a href="http://blog.xzion.net/2009/11/06/research-saves-marketing-failure/">back</a> and <a href="http://blog.xzion.net/2010/02/01/more-about-researchsaves-org/">forth</a> on a campaign called <a href="http://www.researchsaves.org/">ResearchSaves.org</a>, which is a campaign that promotes medical animal testing. My friend is an avid vegetarian and PETA-type guy, and I&#8217;m a medical type guy who also enjoys steak. I don&#8217;t advocate for the needless suffering of animals, but I frequently leave comments on his blog defending animal research in certain circumstances, such as the following.</p>

<p>The spinal action of opioids is an excellent example of how basic research in animals can lead to improvements in the clinical relief of pain. The knowledge gained from basic animal studies showing an opioid inhibition of nociceptive spinal neurons and the direct analgesia following epidural and intrathecal opioids was soon applied to humans. Importantly, the use of various different models of clinical pain states has led to animal studies addressing the extent and mechanisms of plasticity in opioid spinal function, since pathological and physiological and pharmacological events can alter the degree of opioid antinociception. It is noteworthy that opioid receptors originally cloned from rats and mice allowed much <em>in vivo</em> research, and ultimately it was discovered that the animal opioid receptors are <em>identical</em> biochemically, and pharmacologically, to human opioid receptors.</p>

<p>These animals were used to develop pain and suffering relief in humans. If a couple of massively overpopulated rodent had to die for me to be pain free, I have to tell you that I&#8217;m not that upset by it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ericw.org/2010/02/research-relieves/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Homeostasis</title>
		<link>http://blog.ericw.org/2009/11/homeostasis/</link>
		<comments>http://blog.ericw.org/2009/11/homeostasis/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 04:06:58 +0000</pubDate>
		<dc:creator>Eric Will</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[coping]]></category>

		<guid isPermaLink="false">http://pain.ericw.org/?p=49</guid>
		<description><![CDATA[On depression, the past, present, and future of the status quo.</p]]></description>
			<content:encoded><![CDATA[<p>Been feeling down lately. Wait, what am I talking about? I&#8217;ve been down for a long time. Every now and then I&#8217;ll get into a little episode of depression, just like most of us humans. It&#8217;s normally inexplicable, and equally harmless. Most times homoeostasis is returned within mere days, but I&#8217;m starting to think I may actually have a depression problem.</p>

<p>At first, I thought it was just a bout of homesickness. I don&#8217;t particularly care for my life at the moment. So far I&#8217;ve managed to convince myself it&#8217;s merely a transition&#8211;I must simply &#8220;hang in there&#8221; as it were, while my beloved girlfriend completes nursing school, which will allow us to move anywhere we please&#8211;or so the theory goes. The problem with this is I can only convince myself for so long. The cold hard truth is that there is a big difference between plans and reality, and reality has never seemed to have much of a predisposition for conforming to my plans&#8211;in fact, it seems to almost have its own plan for my life. I would prefer it left it to me. I find that reality is almost always wrong.</p>

<p>My friends from back home ask me what I&#8217;m doing in Baltimore, and when I tell them I work for an engineering company that has me write computer software for the government they&#8217;re pretty impressed&#8211;if only I were also. I&#8217;ve been doing this for a long time, and I&#8217;m no longer particularly interested in it. In fact, when I coded as a hobby I vowed I would never rely on it for a paycheck, simply because I cannot maintain an interest in some arbitrary project. I have the &#8220;open source itch,&#8221; as it&#8217;s come to be known. That is, I have an urge to code particular things I&#8217;m interested in, and not something that a project manager tells me to code. Fortunately I&#8217;m not in that situation&#8211;I get to code however I want, with whatever method, style, or language I prefer&#8211;but I still don&#8217;t get to pick what I code. When I first started this job I ran at full speed; I completed two major projects in the first three months, one of which had been in limbo for nearly three years. I am good at what I do, I just don&#8217;t like what I do.</p>

<p>So what do I <em>want</em> to do? Due to various encounters&#8211;positive and negative&#8211;with the healthcare profession, I would very much like to attend medical school and work as a pain management physician. I don&#8217;t know if I&#8217;m smart enough, and I don&#8217;t think I&#8217;m young enough. If I wait until my girlfriend has finished nursing school I will be&#8211;at the minimum&#8211;three years shy of thirty before I can even start pre-med. I just can&#8217;t convince myself this is a realistic thing to do, especially seeing as how we have plans to start a family around that time.</p>

<p>I dreadfully find that I have fallen into the exact same predicament most members of our society do&#8211;one that I promised myself I would never be trapped into: not achieving my dreams. Most of us have something happen in their early twenties, and you think &#8220;oh, I&#8217;ll just wait a year until I can figure this out,&#8221; or &#8220;I&#8217;ll just take a few years to get this right,&#8221; and then you turn around and it&#8217;s been five, seven, ten years. I&#8217;ve spent a mere twenty-three years on this planet&#8211;four of them taken away by intractable pain that isn&#8217;t stopping anytime soon&#8211;and already I feel the pressure of time slowly pushing me farther and farther from my dreams, and closer and closer to mediocrity.</p>

<p>I see my friends saving money, buying houses, having families; I see me stuck, as if running in a dream: never quite able to catch what you&#8217;re chasing (or running from). No matter how hard and fast you run, it only gets farther anyway. I&#8217;m very afraid that I&#8217;ll become like so many blue-collar families&#8211;like my own parents: spending their entire lives attempting to ensure a better one for their children. That&#8217;s simply not what my life was made for. It was made for greater things than these.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ericw.org/2009/11/homeostasis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

