Re: [Storagesync] Storagesync Digest, Vol 5, Issue 1

Markus Unterwaditzer <markus@unterwaditzer.net> Mon, 07 December 2015 12:33 UTC

Return-Path: <markus@unterwaditzer.net>
X-Original-To: storagesync@ietfa.amsl.com
Delivered-To: storagesync@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 019391ACD5E for <storagesync@ietfa.amsl.com>; Mon, 7 Dec 2015 04:33:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.25
X-Spam-Level:
X-Spam-Status: No, score=-2.25 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4jjGoeqNVYev for <storagesync@ietfa.amsl.com>; Mon, 7 Dec 2015 04:33:26 -0800 (PST)
Received: from draco.uberspace.de (draco.uberspace.de [95.143.172.133]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 440A61ACD05 for <storagesync@ietf.org>; Mon, 7 Dec 2015 04:33:25 -0800 (PST)
Received: (qmail 7040 invoked from network); 7 Dec 2015 12:33:22 -0000
Received: from localhost (HELO localhost) (127.0.0.1) by draco.uberspace.de with SMTP; 7 Dec 2015 12:33:22 -0000
Date: Mon, 07 Dec 2015 13:33:20 +0100
From: Markus Unterwaditzer <markus@unterwaditzer.net>
To: Linhui Sun <lh.sunlinh@gmail.com>
Message-ID: <20151207123320.GA2748@localhost.localdomain>
References: <20151206173646.GA6290@localhost.localdomain> <1449447450498-61af5a96-1c461047-3019ac1e@gmail.com> <20151207002020.GA5002@localhost.localdomain> <1449448362292-7d42d496-109559e8-4177b3f9@gmail.com> <20151207003810.GA24130@localhost.localdomain> <1449449404474-72724227-c54ecf87-7d18f3b0@gmail.com> <20151207005426.GA29483@localhost.localdomain> <CAO_YpramyzAZ8hS6aphmBNw2FiKTpesb9uW7uGHtjRH_YkPAJg@mail.gmail.com> <20151207012253.GA10858@localhost.localdomain> <1449453960221-fd85c35a-83d0a351-b60f3237@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <1449453960221-fd85c35a-83d0a351-b60f3237@gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <http://mailarchive.ietf.org/arch/msg/storagesync/dR34Q9d_DAPs-JcykR_STQyalbM>
Cc: storagesync <storagesync@ietf.org>, Ted Lemon <mellon@fugue.com>
Subject: Re: [Storagesync] Storagesync Digest, Vol 5, Issue 1
X-BeenThere: storagesync@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Mechanisms to synchronize client file systems with Internet-based data storage services <storagesync.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/storagesync>, <mailto:storagesync-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/storagesync/>
List-Post: <mailto:storagesync@ietf.org>
List-Help: <mailto:storagesync-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/storagesync>, <mailto:storagesync-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Dec 2015 12:33:29 -0000

> > That works, but do you think this could make the things complicated? It
> > sounds like different situations have different mechanisms. Why not just
> > make the metadata exchanged, any disadvantage for doing that?
> 
> > I don't know what that means.

> The question is why you just keep the metadata locally at client side but not
> exchange the metadata between client and server to make both of them (both
> peers) have the latest metadata store in time.

I think we have a misunderstanding here.

We have a server storage that has an etag for each file. We have a client
storage that has an etag for each file.

The sync client accesses those *and* a "status" file that contains a list of
all files + etags for *both* sides, as they were after the previous sync.  This
is similar to the algorithm described in
http://blog.ezyang.com/2012/08/how-offlineimap-works/, except that one doesn't
deal with files being modified. As said, this warrants a longer blogpost, but I
don't have the time to write one now.

> 
> >
> > >
> > > >
> > > > >
> > > > > On Mon, Dec 07, 2015 at 08:17:26AM +0800, Linhui Sun wrote:
> > > > > > On 周一, 12月 7, 2015 at 01:36, Markus Unterwaditzer <
> > > markus@unterwaditzer.net>
> > > > > > wrote:
> > > > > > > IMO, etag is designed for client side cache. A typical usage: if
> > > the file
> > > > > > > on the server has no actual change, the client will use the cache
> > > and the
> > > > > > > server does not need to send the file content again. While for a
> > > storage
> > > > > > > service, we also need some some similar mechanism at server side.
> > > In this
> > > > > > > way, the client do not need to upload unchanged content to the
> > > server.
> > > > > >
> > > > > > There is no "true-and-only" usecase for etags, and no, you do not
> > > need
> > > > > anything
> > > > > > more than etags for synchronization. Using a additional "metadata"
> > > file, the
> > > > > > client can cheaply determine whether local content changed and
> > > whether
> > > > server
> > > > > > content changed, and that's all that is required for (in this case)
> > > file
> > > > > > synchronization. Sync conflicts are a different story, and the
> > > solution to
> > > > > that
> > > > > > heavily depends on the kind of data you're syncing. I'm a little bit
> > > > confused
> > > > > here: if I have a metadata file, why do I still need
> > > > > > the etag? The metadata file should contain something equivalent to
> > > the etag.
> > > > > >
> > > > > > >
> > > > > > > > --
> > > > > > > > Sent from my phone. Please excuse my brevity.
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Storagesync mailing list
> > > > > > > > Storagesync@ietf.org
> > > > > > > > [https://www.ietf.org/mailman/listinfo/storagesync] https://www.ietf.org/mailman/listinfo/storagesync
> [https://www.ietf.org/mailman/listinfo/storagesync]
> > > > > > > >
> > > > > >
> > > > > > > _______________________________________________
> > > > > > > Storagesync mailing list
> > > > > > > Storagesync@ietf.org
> > > > > > > [https://www.ietf.org/mailman/listinfo/storagesync] https://www.ietf.org/mailman/listinfo/storagesync
> [https://www.ietf.org/mailman/listinfo/storagesync]
> > > > >
> > > > > > _______________________________________________
> > > > > > Storagesync mailing list
> > > > > > Storagesync@ietf.org
> > > > > > [https://www.ietf.org/mailman/listinfo/storagesync] https://www.ietf.org/mailman/listinfo/storagesync
> [https://www.ietf.org/mailman/listinfo/storagesync]
> > >
> 
> > _______________________________________________
> > Storagesync mailing list
> > Storagesync@ietf.org
> > [https://www.ietf.org/mailman/listinfo/storagesync] https://www.ietf.org/mailman/listinfo/storagesync
> [https://www.ietf.org/mailman/listinfo/storagesync]