<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>I found this mailing list from the mjt site.&nbsp; Having
used Kid and Genshi, I&#8217;m very impressed with mjt.&nbsp; It&#8217;s now at
the top of the short list for a project I&#8217;m ramping up.&nbsp; Keep up the
good work.&nbsp; However, that&#8217;s not the reason for my email.&nbsp; Another
aspect of this project is also related to the work you are doing at freebase. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I need a RESTful interface to my data.&nbsp; <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I&#8217;m going to build the controller myself and I&#8217;m
now in the process of designing the URL conventions.&nbsp; I was hoping to mimic
the &nbsp;conventions of some popular service or tool but that&#8217;s not
working out great.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I looked at Amazon&#8217;s S3.&nbsp; The biggest problem
there is that as far as I can tell, the only query capability is a match at the
start of the key.&nbsp; Also, I&#8217;m also a bit worried about the flat
key/data model.&nbsp; That probably helps performance but it means that the object
lives in that place forever.&nbsp; So access to <a
href="http://mydata/invoices/1234/invoicelines">http://mydata/invoices/1234/invoicelines</a>
is impossible.&nbsp; I&#8217;d have to imbed the invoice key as the start of
the key for the invoicelines bucket or I&#8217;d have to store pointers to the
keys for the invoicelines inside the invoices/1234 object.&nbsp; Neither is a
good fit for my mental model which is a RESTful interface to (probably
normalized) table data.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I looked at MS Code Named Astoria (<a
href="http://astoria.mslivelabs.com/gettingStarted.aspx">http://astoria.mslivelabs.com/gettingStarted.aspx</a>).&nbsp;
It&#8217;s closer to my tables of data mental model and it includes a lot of
the concepts that I was planning on including: skip/top, expand, callback,
orderby, etc.&nbsp; It specifies the python/javascript square bracket key
notation right in the URL so the address for invoice 1234 is <a
href="http://mydata/invoices%5b1234%5d/">http://mydata/invoices[1234]/</a> and
its lines are at <a href="http://mydata/invoices%5b1234%5d/invoicelines">http://mydata/invoices[1234]/invoicelines</a>.&nbsp;
It deviates from Python/JavaScript notation in that you can embed very simple
queries in the brackets.&nbsp; You could write http://mydata/invoices[OrderDate
gt '1998-1-1'], where &#8220;gt&#8221; means &#8220;&gt;&#8221;.&nbsp; At first
blush I can&#8217;t think of a concrete objection to this but my instinct is that
this sort of thing should be done in the URL parameters.&nbsp; So I would
prefer <a href="http://mydata/invoices/1234">http://mydata/invoices/1234</a>
and <a href="http://mydata/invoices?OrderDate='%3e1998-1-1">http://mydata/invoices?OrderDate='&gt;1998-1-1</a>'.&nbsp;
Also, it only supports eq, ne, gt, gteq, lt, lteq.&nbsp; I also need a way to
match strings with at least what freebase provides: startswith, endswith,
includes (discerned from running the query builder linked to in earlier posts);
or maybe something like SQL&#8217;s LIKE operator. &nbsp;&nbsp;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I can sort of reverse engineer the freebase URL and query scheme
by looking at the output of the query builder (URL encoded JSON query string).&nbsp;
It looks like your scheme may be a better fit.&nbsp; Can I get access to the
freebase docs that fully describes the URL mechanisms?&nbsp; Also, I&#8217;d
like to hear your opinion on the Astoria URL scheme.&nbsp; Do you think square
bracket notation will be a problem down the road? <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>As an aside, I&#8217;m also curios about why implemented
your own database.&nbsp; I&#8217;m planning on using SQL.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Larry Maccherone<o:p></o:p></p>

<p class=MsoNormal>Carnegie Mellon<o:p></o:p></p>

</div>

</body>

</html>