Joe Gregorio wrote:
> [snip]
>> The primary reason it works is because Activities
>> uses the notion of a soft-delete; where a deleted entry is moved to a
>> Trash collection and all of it's metadata is preserved. The entry still
>> exists, it's state has just changed. A soft-deleted entry can be
>> undeleted and restored to it's original collection or purged. We have
>> no way of representing a purged entry because the data is completely
>> removed from the database.
>
> Not true, the *only* thing you need is the atom:id, everything else
> in the purged entry can be auto-generated.
>
What are you saying isn't true? I was describing a fact about an
existing implementation. When an entry is purged, we do not keep any
record of it (not even the atom:id) so we have no way of representing
the purged entry. To implement full tombstone support, the most we
should have to do is start tracking the atom:id's of the purged entries
and the date/time of deletion. Why should I have to auto-generate
anything?
That said, what is the value of reusing atom:entry in this case?
Why is this...
<entry>
<id>tag:example.org,2007:/the/only/useful/thing/here</id>
<updated>2007-12-12T12:12:12Z</updated>
<title>useless</title>
<author><name>useless</name></author>
<summary>useless</summary>
</entry>
Better than this:
<x:deleted>
<id>tag:example.org,2007:/the/only/useful/thing/here</id>
<updated>2007-12-12T12:12:12Z</updated>
</x:deleted>
Or even just this:
<x:deleted>
<id>tag:example.org,2007:/the/only/useful/thing/here</id>
</x:deleted>
>> If a system is using soft-deletes and the notion of a trash collection,
>> then I would say that this is a fairly good approach, mainly because the
>> atom:entry element are pointing to something that still actually exists.
>
>> However, if the system is doing a hard-delete and is only preserving
>> the id of items that have been deleted, it does not make any sense to
>> represent those deleted items using the atom:entry element and doing so
>> runs the risk of confusing certain clients into thinking that they're
>> looking at some piece of content that still actually exists on the server.
>
> Sorry, that's a straw-man, these are completely different feeds living at
> different URIs, there's no chance of "confusing certain clients".
>
Are you sure about that? I've tested the behavior (subscribing to
separate entry and trash feeds) in several reader clients and it's
certainly not ideal, at least not imho.
> Worst case an aggregator is subscribed to both feeds and
> it combines all entries with the same atom:id
> and over-writes the old entry with the new 'deleted' entries
> auto-generated content. Oh wait, that's *exactly* what you'd want
> to happen.This just reinforces the idea of altering the entry with
> auto-generated content, like changing the title
> to "Tombstone Number {num}".
>
No. Worst case is that the reader shows two entries. For instance, in
Liferea, I subscribed to two feeds:
Main...
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:example.org,2007:foo</id>
<title>test feed</title>
<updated>2007-12-12T12:12:12Z</updated>
<link rel="trash" href="trash.xml" />
<author><name>James</name></author>
<entry>
<id>tag:example.org,2007:foo/1</id>
<title>An entry</title>
<summary>A summary</summary>
<updated>2007-12-12T12:12:12Z</updated>
<link href="http://example.org" />
</entry>
</feed>
Trash...
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:example.org,2007:foo</id>
<title>test feed</title>
<updated>2007-12-12T12:12:12Z</updated>
<author><name>James</name></author>
<entry>
<id>tag:example.org,2007:foo/1</id>
<title>Deleted</title>
<updated>2007-12-12T12:13:12Z</updated>
<content>Deleted</content>
</entry>
</feed>
Liferea shows two entries with no obvious relationship to one another,
which is appropriate behavior in order to avoid the risk of spoofing
attacks. Unfortunately, there is no good way the user can know that the
"Deleted" item listed by one feed is related to the "An entry" item from
the other feed. The only clue the user has is the fact that when you
click on either one of the entries, the other entries read status is
toggled as well. It get's worse when there are multiple deleted entries
in the trash folder.
- James
> -joe
>