<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Depth-First: Tag rest</title>
    <link>http://depth-first.com/articles/tag/rest</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Just a Flesh Wound</title>
      <description>&lt;blockquote&gt;
    &lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Black_Knight_(Monty_Python)"&gt;&lt;img src="http://depth-first.com/demo/20080430/black_knight.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;&lt;strong&gt;SEMANTIC KNIGHT&lt;/strong&gt;: None shall pass without formally defining the ontological
    meta-semantic thingies of their domain something-or-others!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; What?&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; None shall pass without using all sorts of semantic
    meta-meta-meta-stuff that we will invent Real Soon Now!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; I have no quarrel with you, good Sir Knight, but I must get my
    work done on the Web. Stand aside!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; None shall  find anything on the Internet without semantic metadata!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; So be it!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER and SEMANTIC KNIGHT:&lt;/strong&gt; Aaah!, hiyaah!, etc.&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[HACKER chops the SEMANTIC KNIGHT's first argument off by building efficent statistical/heuristic search engines]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Now stand aside, worthy adversary.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; 'Tis but a scratch.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; A scratch? Your argument has been cut off!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; No, it isn't.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Well, what's that, then?&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; I've had worse.  None shall have an effective syndication network without RDF Site Summaries!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[clang]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;Hiyaah!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[clang]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;Aaaaaaaah!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[HACKER chops the SEMANTIC KNIGHT's second argument off by building the blogs/RSS/Aggregators/Bloglines/etc. network ]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Victory is mine!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Have at you!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[kick]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Eh. You are indeed brave, Sir Knight, but the fight is mine.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Oh, had enough, eh?&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Look, you stupid &amp;amp;^%$# You've got no arguments left.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Yes, I have.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Look!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Just a flesh wound.&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[kick]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Look, stop that.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; You won't be able to get machine-machine services without an
    ontology to formally describe all the relationships!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[kick]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Right!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[whop]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[HACKER chops the SEMANTIC KNIGHT's third argument off by building
    SOAPy and RESTful services with only implicit semantic descriptions]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Right. I'll do you for that!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; You'll what?&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Come here!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; What are you going to do, bleed on me?&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; I'm invincible!&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; You're a looney.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; The SEMANTIC Knight always triumphs! Have at you! Come on, then. I have an battalion of KR theorists on my side!&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[whop]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;em&gt;[HACKER chops the SEMANTIC KNIGHT's last argument off with an army of actual code writers]&lt;/em&gt;&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Oh? All right, we'll call it a draw.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;HACKER:&lt;/strong&gt; Come on, folks, let's go.&lt;/p&gt;
    
    &lt;p&gt;&lt;strong&gt;SEMANTIC KNIGHT:&lt;/strong&gt; Oh. Oh, I see. Running away, eh? You yellow ^&amp;amp;^%$s! Come back here and take what's coming to you. I'll bite your legs off! &lt;/p&gt;
    
    &lt;p&gt;-&lt;cite&gt;Michael Champion, &lt;a href="http://lists.xml.org/archives/xml-dev/200504/msg00260.html"&gt;xml-dev list&lt;/a&gt;&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <pubDate>Wed, 30 Apr 2008 18:24:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:4e8cb57c-4704-4385-9832-6fada8248d82</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/04/30/just-a-flesh-wound</link>
      <category>Tools</category>
      <category>semanticweb</category>
      <category>designingtheobvious</category>
      <category>rest</category>
    </item>
    <item>
      <title>Streamlining Cheminformatics on the Web: Let InChI Do the Heavy Lifting and Get Some REST</title>
      <description>&lt;p&gt;&lt;a href="http://chemspider.com"&gt;&lt;img src="http://depth-first.com/demo/20070917/chemspider.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;A recent Depth-First article discussed the advantages of &lt;a href="http://depth-first.com/articles/2007/08/13/the-best-api-may-be-no-api-at-all-pubchem-and-pdb"&gt;minimal Web APIs in Cheminformatics&lt;/a&gt;. Recently, Antony Williams unveiled some &lt;a href="http://www.chemspider.com/blog/?p=179"&gt;simplified ChemSpider URL schemes&lt;/a&gt;, mainly from the perspective of enabling Google indexing. However, it's possible to take this scheme much, much further. Here I present a proposal for radically simplifying (and unifying) the development of cheminformatics Web APIs and the software that interacts with them.&lt;/p&gt;

&lt;h4&gt;The New ChemSpider URLs&lt;/h4&gt;

&lt;p&gt;ChemSpider now has several new kinds of URLs. For the purposes of this article, the most interesting of these are of the format:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.chemspider.com/InChIKey=DEIYFTQMQPDXOT-RERXVCSDCZ"&gt;http://www.chemspider.com/InChIKey=DEIYFTQMQPDXOT-RERXVCSDCZ &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.chemspider.com/InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H"&gt;http://www.chemspider.com/InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These URLs may seem unremarkable, but there's much more than meets the eye. They let anonymous developers query ChemSpider about specific substances - without needing to know much at all about how ChemSpider itself works. Goodbye API. Goodbye API support. Goodbye API documentation. Goodbye angle brackets. Hello to getting stuff done. It's all very &lt;a href="http://depth-first.com/articles/2007/05/30/restful-cheminformatics"&gt;RESTful&lt;/a&gt;. Well, at least it could be that way with some minor modification.&lt;/p&gt;

&lt;h4&gt;Some Recommendations&lt;/h4&gt;

&lt;p&gt;ChemSpider hasn't quite reached that place where the API &lt;a href="http://wwmm.ch.cam.ac.uk/blogs/downing/?p=128"&gt;just disappears&lt;/a&gt;. The problem is that the ChemSpider URLs listed above point to query results pages, not compound summary pages. Were these URLs to redirect to a summary page, we could construct the following URLs to extract ChemSpider resources (I've replaced the '=' sign with a '/' for simplicity):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;.../InChIKey/DEIYFTQMQPDXOT-RERXVCSDCZ&lt;/strong&gt; Get all resources for the molecule identified by the given InChIKey - i.e., "Compound summary page"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;.../InChIKey/DEIYFTQMQPDXOT-RERXVCSDCZ/molfile.mol&lt;/strong&gt; Get the molfile for the molecule identified by the given InChIKey&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;.../InChIKey/DEIYFTQMQPDXOT-RERXVCSDCZ/small_image.png&lt;/strong&gt; Get the small image for the molecule indentified by the given InChIKey.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;.../InChIKey/DEIYFTQMQPDXOT-RERXVCSDCZ/large_image.png&lt;/strong&gt; Get the large image for the molecule identified by the given InChIKey.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;.../InChIKey/DEIYFTQMQPDXOT-RERXVCSDCZ/citations.xml&lt;/strong&gt; Get the list of citations for the molecule identified by the given InchIKey, in XML format.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Jane, a developer building Web applications on top of this new ChemSpider API, would immediately notice that things just work. Let's say her online database stores IC&lt;sub&gt;50&lt;/sub&gt;s at the dopamine D&lt;sub&gt;2&lt;/sub&gt; receptor. On the summary page for each molecule, she wants to link out to the ChemSpider compound summary page, if available. She would simply construct the InChIKey on her server, build the needed ChemSpider URL and GET it. An HTTP 404 would indicate no molecule with that Key exists on ChemSpider and so no link would be shown. An HTTP 200 would indicate ChemSpider has the molecule, and so the link would appear.&lt;/p&gt;

&lt;h4&gt;Conclusions&lt;/h4&gt;

&lt;p&gt;It would be interesting enough if ChemSpider adopted a system like that described here. But the real power of this approach would emerge if multiple Web services were to adopt it. By following a simple set of conventions, these services would enable third party developers to elegantly &lt;a href="http://depth-first.com/articles/2006/09/23/mashups-for-fun-and-profit"&gt;mashup&lt;/a&gt; all manner of cheminformatics resources into applications unimaginable today.&lt;/p&gt;

&lt;p&gt;Technically, there's nothing that prevents this system from being implemented on every &lt;a href="http://depth-first.com/articles/2007/01/24/thirty-two-free-chemistry-databases"&gt;free chemistry database&lt;/a&gt; in existence today. However, doing so would transfer a significant degree of control from service operators to third-party developers. Not all providers will be comfortable with that idea.&lt;/p&gt;

&lt;p&gt;Cheminformatics Web service providers need to carefully consider whether they're trying to develop a &lt;a href="http://depth-first.com/articles/2007/07/04/pubchem-is-a-platform"&gt;platform or an integrated service&lt;/a&gt;. As history has shown, the strategies, and upside potential, for each approach can differ dramatically.&lt;/p&gt;</description>
      <pubDate>Mon, 01 Oct 2007 10:53:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:e3caeb1b-58a7-4a3a-b215-131825ee9f2e</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/10/01/streamlining-cheminformatics-on-the-web-let-inchi-do-the-heavy-lifting-and-get-some-rest</link>
      <category>Meta</category>
      <category>chemspider</category>
      <category>rest</category>
      <category>inchi</category>
      <category>inchikey</category>
      <category>web</category>
    </item>
    <item>
      <title>The Best API May Be No API At All: PubChem and PDB</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/druclimb/325661568/"&gt;&lt;img src="http://depth-first.com/demo/20070813/invisible.jpg" align="right" border="0"&gt;&lt;/img&gt;&lt;/a&gt;Both &lt;a href="http://pubchem.ncbi.nlm.nih.gov/"&gt;PubChem&lt;/a&gt; and the &lt;a href="http://www.rcsb.org/pdb/home/home.do"&gt;Protein Data Bank&lt;/a&gt; (PDB) maintain vast collections of molecular data. Individual users are free to view and search these collections via standard Web browsers. But what are the options if you're developing software to interact with these databases?&lt;/p&gt;

&lt;p&gt;Various application programming interfaces (APIs) are available for accessing PubChem and PDB records. For example, PubChem recently introduced its &lt;a href="http://depth-first.com/articles/tag/pug"&gt;Power User Gateway&lt;/a&gt; (PUG), an XML-based query language. But writing APIs is extremely difficult; reconciling the need for simplicity with the need for rich functionality is a tough balancing act. Where do you draw the line?&lt;/p&gt;

&lt;p&gt;Recently, &lt;a href="http://boscoh.com/"&gt;Bosco&lt;/a&gt; described a &lt;a href="http://boscoh.com/protein/fetching-pdb-files-remotely-in-pure-python-code"&gt;remarkably short method&lt;/a&gt; to retrieve PDB records using nothing more than standard Python. Given the similarities between Python and Ruby, it seemed reasonable that his method could be adapted to Ruby.&lt;/p&gt;

&lt;p&gt;The following Ruby library accepts a PDB identifier and returns the corresponding PDB record:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;net/http&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

&lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;PDB&lt;/span&gt;
  &lt;span class="comment"&gt;# Returns a PDB record for the given id&lt;/span&gt;
  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.get_record&lt;/span&gt; &lt;span class="ident"&gt;id&lt;/span&gt;
    &lt;span class="constant"&gt;Net&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;HTTP&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;get_response&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;www.rcsb.org&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/pdb/files/&lt;span class="expr"&gt;#{id}&lt;/span&gt;.pdb&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;).&lt;/span&gt;&lt;span class="ident"&gt;body&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

Notice how the business end of this library is nothing more than a single line of Ruby code.

The library can be tested by saving it in a file called &lt;strong&gt;pdb.rb&lt;/strong&gt; and invoking interactive Ruby (irb):

&lt;div class="console"&gt;
&lt;pre&gt;
$ irb
irb(main):001:0&gt; require 'pdb'
=&gt; true
irb(main):002:0&gt; puts PDB::get_record('1hpn')
HEADER    GLYCOSAMINOGLYCAN                       17-JAN-95   1HPN
TITLE     N.M.R. AND MOLECULAR-MODELLING STUDIES OF THE SOLUTION
TITLE    2 CONFORMATION OF HEPARIN

[truncated]
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Several months ago, a D-F article described a related, but somewhat lengthier approach to &lt;a href="http://depth-first.com/articles/2006/08/30/hacking-pubchem-with-ruby"&gt;retrieving PubChem molfiles&lt;/a&gt;. Using the same approach we used for PDB, we can create the world's shortest PubChem library:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;net/http&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

&lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;PubChem&lt;/span&gt;
  &lt;span class="comment"&gt;# Returns a molfile for the given PubChem CID&lt;/span&gt;
  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.get_molfile&lt;/span&gt; &lt;span class="ident"&gt;cid&lt;/span&gt;
    &lt;span class="constant"&gt;Net&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;HTTP&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;get_response&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;pubchem.ncbi.nlm.nih.gov&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/summary/summary.cgi?cid=&lt;span class="expr"&gt;#{cid}&lt;/span&gt;&amp;amp;disopt=DisplaySDF&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;).&lt;/span&gt;&lt;span class="ident"&gt;body&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

This library can be tested by saving it in a file called &lt;strong&gt;pubchem.rb&lt;/strong&gt; followed by running irb:

&lt;div class="console"&gt;
&lt;pre&gt;
$ irb
irb(main):001:0&gt; require 'pubchem'
=&gt; true
irb(main):002:0&gt; puts PubChem::get_molfile('969472') #eszopiclone (Lunesta)
969472
  -OEChem-08130700422D

 44 47  0     1  0  0  0  0  0999 V2000
    9.2619   -2.2732    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0

[truncated]
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Both of these Ruby libraries leverage one the most versatile and robust protocols ever developed: plain old http. The last few years have witnessed a renaissance in using bare http as platform for building simplified yet powerful Web APIs with less software. Referred to as &lt;a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm"&gt;REST&lt;/a&gt;, the approach has gained traction partly in response to the wasteful complexities introduced by various XML-based approaches. Although &lt;a href="http://depth-first.com/articles/2007/05/30/restful-cheminformatics"&gt;slow to catch on in cheminformatics&lt;/a&gt;, REST has enormous potential in unifying &lt;a href="http://depth-first.com/articles/2007/01/24/thirty-two-free-chemistry-databases"&gt;a diverse array&lt;/a&gt; of isolated database systems.&lt;/p&gt;

&lt;p&gt;One limitation of the approach described here is that the PubChem (or PDB) folks may get upset if you use it a lot. For example, if you examine the &lt;a href="http://pubchem.ncbi.nlm.nih.gov/robots.txt"&gt;PubChem robots.txt file&lt;/a&gt;, you'll notice that access to the &lt;tt&gt;summary.cgi&lt;/tt&gt; resource, which our library makes use of, is prohibited to robots:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_robots "&gt;...

User-agent: *

...
Disallow: /summary/summary.cgi
...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What makes a "robot" and does your software qualify for exclusion? The answer is not enirely clear-cut, especially in the era of browser-side scripting.&lt;/p&gt;

&lt;p&gt;Regardless, it looks like PubChem's policy was put in place in 2004, long before PubChem had experience with usage patterns for its service. It may be that this restriction could be relaxed without adversely affecting PubChem's ability to operate efficiently. It may even be possible to offer a low-level http retrieval method alongside PubChem's PUG interface on a machine dedicated to automated queries (i.e., &lt;a href="http://eutils.ncbi.nlm.nih.gov/entrez/query/static/eutils_help.html"&gt;Entrez eUtils&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;As developers, our mission is to deliver functionality, not to write software. We should extract every possible ounce of value from established protocols and APIs before writing a single line of additional code. REST, and the creative use of good old http, are powerful tools to do so.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit &lt;a href="http://flickr.com/photos/druclimb/"&gt;Dru!&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 13 Aug 2007 07:55:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0632ab5e-4c6a-4bb5-b898-5606e7743230</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/08/13/the-best-api-may-be-no-api-at-all-pubchem-and-pdb</link>
      <category>Tools</category>
      <category>pubchem</category>
      <category>pdb</category>
      <category>pug</category>
      <category>xml</category>
      <category>rest</category>
      <category>http</category>
      <category>ruby</category>
    </item>
    <item>
      <title>RESTful Cheminformatics</title>
      <description>&lt;p&gt;Names are powerful. For example, if you work in a field that has a well-recognized title, it's easy to talk to non-experts about what you do. Doctors, lawyers, NASCAR drivers, actors, and airline pilots all fall into this category. If, on the other hand, you're a medicinal chemist - well, you've got your work cut out for you.&lt;/p&gt;

&lt;p&gt;Names are especially important in software design. Many of the toughest design problems occur because we fail to see an underlying concept and name it. Unfortunately, our natural impulse in these situations is to get busy creating complexity (or just give up). But if we allow ourselves to take a few steps back, more often than not we find a central concept waiting to be named.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm"&gt;Representational State Transfer&lt;/a&gt; (REST) has received a lot of attention lately, and for good reason. REST is fundamentally about discovering, naming, and exposing the elements of a problem domain. Object-Oriented designers have been doing this for decades. With REST it's possible to do the same thing with Internet resources, and achieve many of the same benefits.&lt;/p&gt;

&lt;p&gt;To draw an analogy between REST and Object-Oriented design, &lt;strong&gt;resources&lt;/strong&gt; are to the Internet what &lt;strong&gt;objects&lt;/strong&gt; are to software. Resources have names. They have capabilities and well-defined behavior. They can be nested, extended, created, queried, and destroyed. They act as nouns upon which a limited number of verbs can act. Most importantly, resources have consistent and discoverable behavior.&lt;/p&gt;

&lt;p&gt;REST's "big idea" is that the HTTP protocol already provides all the verbs necessary to operate on resources: GET, PUT, POST, and DELETE. If you're willing to accept the notion that (almost) everything in the world can be modeled as resources being acted on by those four verbs, your life as a Web developer suddenly gets much simpler.&lt;/p&gt;

&lt;p&gt;The technical aspects of REST have been covered in many excellent blogs, articles, and talks. In particular, the release of Ruby on Rails 1.2 has lead to a flood of excellent material. Two works I've found especially helpful are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.scribemedia.org/2006/07/09/dhh/"&gt;David Heinemeier Hanson's 2006 Rails Conf Presentation&lt;/a&gt;:  The &lt;a href="http://media.rubyonrails.org/presentations/worldofresources.pdf"&gt;slide deck&lt;/a&gt; for this presentation is essential.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.b-simple.de/documents"&gt;RESTFul Rails Development&lt;/a&gt;:  Written by Ralf Wirdemann and Thomas Baustert, this free booklet describes REST and Rails in much more detail than the &lt;a href="http://www.pragmaticprogrammer.com/titles/rails2/"&gt;Agile Book&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What does REST have to do with Cheminformatics? Quite a lot. As more and more free chemistry services, including &lt;a href="http://depth-first.com/articles/2007/01/24/thirty-two-free-chemistry-databases"&gt;free databases&lt;/a&gt;, become available online, lack of interoperability will start to become very painful - not just to developers, but to chemists themselves. There are many valid approaches to solving this problem. REST may well be the most workable.&lt;/p&gt;</description>
      <pubDate>Wed, 30 May 2007 10:42:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:3845e12c-ae8b-4495-8af2-d5dfb929f23e</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/05/30/restful-cheminformatics</link>
      <category>Meta</category>
      <category>rest</category>
      <category>rails</category>
      <category>interoperability</category>
    </item>
  </channel>
</rss>
