Subject: Re: Is it just us?

From: Nikunj Mehta <[email-masked]>
Date: Thu, 21 Jun 2007 14:39:04 -0700

If one is willing to interpret a relational database through the eyes of 
an application (family, really), Atom does indeed help. In more general 
sense a simple two level hierarchy (container, element (container, 
element()) can go quite far when using hyperlinks. However, if 
interpreting a relational schema without any knowledge of applications 
that use this schema, Atom won't be of much help, and you might be 
better off with something else like Web3S or RDF.

Note to myself: Atom pub still doesn't provide a comprehensive mechanism 
for synchronizing changes to these feeds across autonomous agents, but 
that's for another day.

Let me show an example where data is richly interconnected, and at 
present, lives in relational databases. Then I will show how this data 
as Atom feeds (both atompub and regular atom). Drivers carry insurance 
(except those who like paying for tickets), and insurance covers 
vehicles. So this three node graph can be represented as three separate 
collections one for each node, and three compound feeds one for each 
edge in the graph. I am only showing one of the compound feeds but 
others would be similar.

Might I add that the additional bytes being generated for Atom feeds 
could be offset by the diminished traffic to a server because the data 
required is already sitting in an intermediary or the client, and may be 
synchronized efficiently. Whether you would be willing to work with 
potentially "stale" application data is still another discussion to have.

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">
    <atom:title>Vehicles insured by example.com</atom:title>
    <atom:id>tag:example.com,vehicles</atom:id>
    <atom:link rel="self" href="http://example.com/vehicles/"/>
    <atom:updated>2007-06-04T19:42:22Z</atom:updated>
    <atom:author>
        <atom:name/>
        <atom:uri>http://example.com</atom:uri>
    </atom:author>

    <atom:entry>
       <atom:title>Honda Civic</atom:title>
       <atom:id>tag:example.com:vehicle=1</atom:id>
       <atom:link rel="edit" href="http://example.com/vehicle/1"/>
       <auto:vin 
xmlns:auto="http://example.com/xmlns/auto">2FMZU62E02ZB78590</auto:vin>
       <atom:content/>
       <atom:updated>2007-06-04T19:44:22Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T19:44:22Z</app:edited>
    </atom:entry>

    <atom:entry>
       <atom:title>Chrysler Jeep</atom:title>
       <atom:id>tag:example.com:vehicle=2</atom:id>
       <atom:link rel="edit" href="http://example.com/vehicle/2"/>
       <auto:vin 
xmlns:auto="http://example.com/xmlns/auto">2FMZU62E02ZB23290</auto:vin>
       <atom:content/>
       <atom:updated>2007-06-04T19:42:53Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T19:42:53Z</app:edited>
    </atom:entry>

    <atom:entry>
       <atom:title>Volkswagon Beetle</atom:title>
       <atom:id>tag:example.com:vehicle=3</atom:id>
       <atom:link rel="edit" href="http://example.com/vehicle/3"/>
       <auto:vin 
xmlns:auto="http://example.com/xmlns/auto">12LSDSU62E02ZB23290</auto:vin>
       <atom:content/>
       <atom:updated>2007-06-04T19:40:23Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T19:42:53Z</app:edited>
    </atom:entry>
</atom:feed>

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">
    <atom:title>Drivers insured by example.com</atom:title>
    <atom:id>tag:example.com,drivers</atom:id>
    <atom:link rel="self" href="http://example.com/drivers/"/>
    <atom:updated>2007-06-04T20:21:22Z</atom:updated>
    <atom:author>
        <atom:name/>
        <atom:uri>http://example.com</atom:uri>
    </atom:author>

    <atom:entry>
       <atom:title>Mr. John Doe</atom:title>
       <atom:id>tag:example.com:driver=1</atom:id>
       <atom:link rel="edit" href="http://example.com/driver/1"/>
       <auto:license xmlns:auto="http://example.com/xmlns/auto" 
number="32139213" issuer="CA" country="USA"/>
       <atom:content/>
       <atom:updated>2007-06-04T09:44:22Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T09:44:22Z</app:edited>
    </atom:entry>

    <atom:entry>
       <atom:title>Ms. Jane Ko</atom:title>
       <atom:id>tag:example.com:driver=2</atom:id>
       <atom:link rel="edit" href="http://example.com/driver/2"/>
       <auto:license xmlns:auto="http://example.com/xmlns/auto" 
number="32139213" issuer="ON" country="Canada"/>
       <atom:content/>
       <atom:updated>2007-06-04T09:42:53Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T09:42:53Z</app:edited>
    </atom:entry>

    <atom:entry>
       <atom:title>Mr. Ajay Kumar</atom:title>
       <atom:id>tag:example.com:driver=3</atom:id>
       <atom:link rel="edit" href="http://example.com/driver/3"/>
       <auto:license xmlns:auto="http://example.com/xmlns/auto" 
number="1238122" issuer="MH" country="India"/>
       <atom:content/>
       <atom:updated>2007-06-04T09:40:23Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-04T09:42:53Z</app:edited>
    </atom:entry>
</atom:feed>

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">
    <atom:title>Insurance policies issued by example.com</atom:title>
    <atom:id>tag:example.com,policies</atom:id>
    <atom:link rel="self" href="http://example.com/policies/"/>
    <atom:updated>2007-06-05T20:21:22Z</atom:updated>
    <atom:author>
        <atom:name/>
        <atom:uri>http://example.com</atom:uri>
    </atom:author>

    <atom:entry>
       <atom:title/>
       <atom:id>tag:example.com:policy=1</atom:id>
       <atom:link rel="edit**" href="http://example.com/policy/1"/>
       <atom:link rel="related" href="http://example.com/driver/1"/>
       <atom:link rel="related" href="http://example.com/driver/2"/>
       <atom:link rel="related" href="http://example.com/vehicle/1"/>
       <atom:link rel="related" href="http://example.com/vehicle/2"/>
       <auto:liability xmlns:auto="http://example.com/xmlns/auto">
          <auto:property currency="USD">50000</auto:property>
          <auto:injury currency="USD">25000</auto:injury>
          <auto:medical currency="USD">5000</auto:medical>
       </auto:liability>
       <atom:content/>
       <atom:updated>2007-06-05T09:44:22Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-05T09:44:22Z</app:edited>
    </atom:entry>

    <atom:entry>
       <atom:title/>
       <atom:id>tag:example.com:policy=2</atom:id>
       <atom:link rel="edit" href="http://example.com/ploicy/2"/>
       <atom:link rel="related" href="http://example.com/driver/3"/>
       <atom:link rel="related" href="http://example.com/vehicle/3"/>
       <auto:liability xmlns:auto="http://example.com/xmlns/auto">
          <auto:property currency="USD">100000</auto:property>
          <auto:injury currency="USD">50000</auto:injury>
          <auto:medical currency="USD">10000</auto:medical>
       </auto:liability>
       <atom:content/>
       <atom:updated>2007-06-05T09:42:53Z</atom:updated>
       <app:edited 
xmlns:atompub="http://www.w3.org/2007/app">2007-06-05T09:42:53Z</app:edited>
    </atom:entry>
</atom:feed>

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">
    <atom:title>Drivers by insurance policies</atom:title>
    <atom:id>tag:example.com,driversnpolicies</atom:id>
    <atom:link rel="self" href="http://example.com/driversnpolicies/"/>
    <atom:updated>2007-06-05T20:21:22Z</atom:updated>
    <atom:author>
        <atom:name/>
        <atom:uri>http://example.com</atom:uri>
    </atom:author>
   
    <atom:entry>
       <atom:title/>
       <atom:id>tag:example.com:drivers,policy=1</atom:id>
       <atom:link rel="related" href="http://example.com/policy/1"/>
       <atom:content type="application/atom+xml">
          <atom:feed>
            <atom:title/>
            <atom:id>tag:example.com,drivers,policy=1</atom:id>
            <atom:updated>2007-06-04T20:21:22Z</atom:updated>
            <atom:author>
                <atom:name/>
            </atom:author>

            <atom:entry>
               <atom:title>Mr. John Doe</atom:title>
               <atom:id>tag:example.com:driver=1</atom:id>
               <atom:link rel="edit" href="http://example.com/driver/1"/>
               <atom:content/>
               <atom:updated>2007-06-04T09:44:22Z</atom:updated>
            </atom:entry>

            <atom:entry>
               <atom:title>Ms. Jane Ko</atom:title>
               <atom:id>tag:example.com:driver=2</atom:id>
               <atom:link rel="edit" href="http://example.com/driver/2"/>
               <atom:content/>
               <atom:updated>2007-06-04T09:42:53Z</atom:updated>
            </atom:entry>

          </atom:feed>
       </atom:content>
       <atom:updated>2007-06-05T09:42:53Z</atom:updated>
    </atom:entry>
    <atom:entry>
       <atom:title/>
       <atom:id>tag:example.com:drivers,policy=2</atom:id>
       <atom:link rel="related" href="http://example.com/policy/2"/>
       <atom:content type="application/atom+xml">
          <atom:feed>
            <atom:title/>
            <atom:id>tag:example.com,drivers,policy=2</atom:id>
            <atom:updated>2007-06-04T20:21:22Z</atom:updated>
            <atom:author>
                <atom:name/>
            </atom:author>
            <atom:entry>
               <atom:title>Mr. Ajay Kumar</atom:title>
               <atom:id>tag:example.com:driver=3</atom:id>
               <atom:link rel="edit" href="http://example.com/driver/3"/>
               <atom:content/>
               <atom:updated>2007-06-04T09:40:23Z</atom:updated>
            </atom:entry>
          </atom:feed>
       </atom:content>
       <atom:updated>2007-06-05T09:42:53Z</atom:updated>
    </atom:entry>
</atom:feed>

Yaron Goland wrote:
> We wanted to focus on actual services that real folks could hit against so we focused our explanations and such on LiveContacts which we released support for (using an ancient version of Web3S) last May. But our overall use cases stretch across all the deeply structured stores at Live. I can't quite get into the details yet, which is why I just focused on LiveContacts which I can discuss. But Astoria makes the situation even easier to understand. In Astoria's case they are exposing relational databases which for our purposes can be thought of as deeply structured data.
>
> A particular question I would really love to hear a concrete answer to though is - what are the characteristics that make a data set look like a 'publication'? In other words, what is a loose check list of things to look for that let you know if the information you want to expose is a good candidate for ATOM?
>
>         Thanks,
>
>                 Yaron
>
>   
>> -----Original Message-----
>> From: [email-masked] [mailto:[email-masked]]
>> Sent: Wednesday, June 20, 2007 8:42 PM
>> To: Yaron Goland
>> Cc: [email-masked]
>> Subject: Re: Is it just us?
>>
>>
>> On Jun 20, 2007, at 4:21 PM, Yaron Goland wrote:
>>
>>     
>>> I will be following up this e-mail with e-mails addressing specific
>>> problems we ran into when we tried to use APP in the context of
>>> Windows Live (and later SQL Server (Codename "Astoria" project)) to
>>> make our structured data available for machine processing.
>>>       
>> For what it's worth, based on the description of the problem in
>> http://dev.live.com/livedata/web3s.htm (from the introduction: "The
>> purpose of this document is to define a protocol that is a good fit
>> for Live Contacts. Live Contacts is the central data store in Windows
>> Live for address book information. All Hotmail contacts, Messenger
>> buddies and Spaces' friends are recorded in Live Contacts. There are
>> currently approximately 500,000,000 active address books in Live
>> Contacts"), it seems you have a unitary and unique dataset you're
>> trying to update and it doesn't seem to behave much like a
>> "publication" in several important senses, so it seems unsurprising
>> that APP would be a poor fit for updating it.  -Tim
>>     
>
>
>

---

From: Lisa Dusseault <[email-masked]>
Date: Thu, 21 Jun 2007 16:24:19 -0700

When is data Atom-like?

http://en.wikipedia.org/wiki/Web_syndication

...puts emphasis on the ability to "provide other people with a  
summary of the website's recently added content"

A very direct reading of the data format suggests to me that the  
questions Atom is most organized to answer are:

What's new?
For each new thing:
	... who wrote it, when?
	... how do I get the rest of it?

If the questions a user asks are very different from this (e.g. "what  
is most popular" or "what is biggest" or "what is this person's email  
address" or "when is this user free") then Atom is not organized as  
optimally to answer the questions.

Of course this is just looking at 4287, not at extensions that  
significantly change what questions atom is organized to answer.

Lisa

On Jun 21, 2007, at 1:37 PM, Tim Bray wrote:

>
> On Jun 21, 2007, at 1:08 PM, Yaron Goland wrote:
>
>> A particular question I would really love to hear a concrete  
>> answer to though is - what are the characteristics that make a  
>> data set look like a 'publication'? In other words, what is a  
>> loose check list of things to look for that let you know if the  
>> information you want to expose is a good candidate for ATOM?
>
> I think the answer is: data that's Web-like.  I.e. where you have a  
> universe of resources, each with its own identifier, and which are  
> expected to use hypertext links embedded in message bodies to refer  
> to each other.  Obviously, the motivating use-case that got the  
> ball rolling was blog-post authoring, but it's starting to look  
> like the data space for which the Atom protocol is useful is quite   
> a bit bigger.  -Tim
>
>
>
>

---

From: "A. Pagaltzis" <[email-masked]>
Date: Fri, 22 Jun 2007 03:04:01 +0200

Hi Lisa,

> summary of the website's recently added content"

but that is just a convention. There is no requirement per spec
that the entries in a feed be selected based on any particular
criterion – not by timestamp nor by any other.

> A very direct reading of the data format suggests to me that
> the  questions Atom is most organized to answer are:
> 
> What's new?
> For each new thing:
> 	... who wrote it, when?

If you leave out the “What’s new” question and generically say
“for each listed thing”, then that’s not bad.

Really, the question of what Atom’s good for is the question
“what can I express with a bunch of Entry Documents?” and the
answer is “a bunch of mostly self-contained resources.” That is,
what you *can’t* easily express is strong structure that crosses
the boundaries of multiple Entries. The Entries need to be peers
in some sense.

As long as your data model fits that requirement, it will be
quite easily mapped to Atom.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

---

From: Lisa Dusseault <[email-masked]>
Date: Sat, 23 Jun 2007 09:36:49 -0700

> “for each listed thing”, then that’s not bad.

I guess that's true, as you pointed out there's no requirement that  
the entries that a server lists even be recent ones.

So then the things you can rely on Atom (without extensions) to tell  
you about a collection of information reduces to:

What entries of this collection do you care to inform me about?
	... who wrote each one, when were they updated?
	... how do I get the rest of each one?

Lisa