[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sorting by app:edited & Concurrency
- To: "Brian Smith" <brian@xxxxxxxxxxxxxx>
- Subject: Re: Sorting by app:edited & Concurrency
- From: "Joe Gregorio" <joe@xxxxxxxxxxxxxx>
- Date: Wed, 14 Nov 2007 13:35:19 -0500
- Cc: atom-protocol <atom-protocol@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=qBAQWosKD54xSgLd+9KS/7R5ZtxTlvFRUmrzPDlce2o=; b=VdGUQZsKVXQvMeeMOqbfkxgzMNuPMjXdg98jNZFLuYtP0uUEAOSVKQjfonXPpKujFXyvtfei14nnbJHxBZbN9eVrBCc1ovznfCF1sPckK8aohWpE0eDpDwit2jmRCzzJfiQyFuc9P4Yji0Zs8OQo4Ho3ktzBhHiTQ1JjDqdbrSs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=PmLHGQqKgUCipIgT6L2dXjlU3V7fbRQ1Hlc466Nf87/RBXReAsQaDVYr7R2S7a7XY+uo6jFz8x3CbT9Q0NZ5aasmJ8phz8OFuowpG7cC+3UDEuwfmSB0jdvZ99+uJ+gY/JdQOre1pX7qErkK1lmUWHB0/dmYB6Nss0Mt98K6xpk=
- In-reply-to: <>
- List-archive: <http://www.imc.org/atom-protocol/mail-archive/>
- List-id: <atom-protocol.imc.org>
- List-unsubscribe: <mailto:atom-protocol-request@imc.org?body=unsubscribe>
- References: <> <3f1451f50711140655q78061c8bp501824d0d71eb490@xxxxxxxxxxxxxx> <>
- Sender: owner-atom-protocol@xxxxxxxxxxxx
On Nov 14, 2007 11:38 AM, Brian Smith <brian@xxxxxxxxxxxxxx> wrote:
> Joe Gregorio wrote:
> > > 1. Client POSTs entry A. Server chooses 2007-11-12T12:34[:00]Z
> > as entry A's
> > > app:edited property.
> >
> > The value of app:edited for a new entry is the time at which
> > it was created. How can an entry be created and yet not
> > appear in a collection feed?
>
> That is part of what I am asking in question (c): does the collection
> feed always need to be up-to-date, or is it allowed to lag behind?
>
> The creation of an entry is going to take some time. I agree that
> app:edited should be a timestamp as close to the end of the creation
> process as possible.
>
> In my server, when an entry is POSTed or PUT, the server writes the
> entry to disk exactly as it will be returned in responses. In
> particular, the app:edited element is written to a file, so, I need to
> know it before the file is completely written to disk. I also store the
> app:edited value in the file so that I don't have to rely on any files'
> mtime.
Ah, in case you care, this is the crux of your problem. Your
set is non-well founded[1].
That is, writing the 'app:edited' time stamp into the file,
but realizing that writing may take an indeterminate amount
of time, makes your set of entries, ordered by 'app:edited', non-well founded.
It may seem like a small thing but you just fell through a hole into
a world outside of normal set theory.
[1] http://en.wikipedia.org/wiki/Well-foundedness
-joe
>
> My server also implements every POST, PUT, and DELETE as an atomic
> operation. An entry cannot appear in the feed until it is committed. I
> have to do a few filesystem operations in order to commit an entry. On a
> slow/busy webserver/network/filer combination, this is definitely enough
> time to notice this kind of ordering issue.
>
> I can rework my implementation to serialize all POST, PUT, and DELETE
> operations enough to ensure that timestamp generation and commits are
> not interleaved, but I'd like to avoid that if possible.
>
> Regards,
> Brian
>
>
--
Joe Gregorio http://bitworking.org