Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: I can haz cloud idea
Date: Thu, 16 Feb 2012 08:07:46 -0500	[thread overview]
Message-ID: <8739absz8d.fsf@lifelogs.com> (raw)
In-Reply-To: <87fwebnzd8.fsf@gnus.org>

On Thu, 16 Feb 2012 06:03:47 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> The main problems with going all cloudy is that you have to have yet
LI> another server out there somewhere.  Whether you use Dropbox/sshfs/a yet
LI> to be determined Gnus-specific server, that's not very sexy.

LI> But how about if we just cheat and put all the information on the IMAP
LI> server?

LI> That is: Gnus would create and maintain a special group on one of your
LI> IMAP servers that would contain all the data Gnus needs.

LI> You'd set this up by setting, er, something, like:

LI> (setq gnus-cloud-server '(nnimap "imap.gmail.com"))

Why not add a gnus-sync backend to do this?

LI> This would make Gnus save all the data on that server whenever you exit
LI> Gnus.  (Or on certain intervals.)  It could gzip and encrypt the data
LI> before uploading, I guess.

LI> So when you go to your other machine, you'd say `M-x gnus-cloud', and it
LI> would prompt you for the server and password(s), download the data, and
LI> then start up more or less as normal.

LI> And it would upload the data on exit, as well, so you'd be all
LI> cloudy.

This is what `gnus-sync-read' and `gnus-sync-save' do already, for some of
the newsrc data.  There's no problem with storing more, my only issue
was to figure out how to synchronize it all cleanly.

I also want to use gnus-sync to store the gnus-registry and even BBDB
data.  So it makes sense to make this a general facility.

LI> What would be stored on the server?  Well, the .newsrc.eld file, for
LI> one.  And the SCORE files, I guess.  And...  well, whatever else you
LI> want.  It could be a simple archive "file" type, and Gnus could just
LI> decrypt, uncompress and unpack the files.  Some sanity check about
LI> overwriting newer files with older files, I guess.

The CouchDB gnus-sync backend has built-in document versioning, which I
think is really nice.  Also it's portable through JSON and HTTP (what I
call the LeSync protocol), so other newsreaders can support it too.  The
developer of NewsTap, a iOS app, is on board with this and told me it's
on top of his feature list.

LI> If this is to work smoothly (i.e., at all), then every time you hit `g'
LI> in a Gnus, it'll have to know whether something else updated the state
LI> group.  This also means that every time you exit a group or does
LI> something else that changes state, it'll have to be uploaded pretty much
LI> immediately.  This also means that there would be no explicit "upload"
LI> commands.

So basically a `gnus-sync-save' on group exit.  I would amortize it so
it's not done so frequently (currently, gnus-sync saves when the newsrc
is saved) because network transactions are expensive.

LI> Here's how I see this working:

LI> When you first start the thing, it does a total upload.  Then, every
LI> time you (say) exit a group, it only uploads the delta between the
LI> previous total upload and the current state.  So after you've read a
LI> couple of groups, the delta file will look like

LI> ("gwene.com.feedburner.cheezburger" (add (read (56 . 59))) (del (tick 58)))

LI> or something.  Gnus will continue to upload the entire delta file to the
LI> server on each group exit (and delete any previous deltas).  Until the
LI> delta gets so big that Gnus just does a total upload again, and removes
LI> all previous data.

LI> It sucks that `g' has to query the state group, though.  But it really
LI> doesn't.  If we maintain a separate cloud connection, then we can just
LI> IDLE on the state group.  Then every time a different Gnus somewhere
LI> does something, then the other Gnus instances can just download the
LI> state change, and update itself automatically.  Totally transparently
LI> and in the background.

LI> Unless the IMAP server has dropped the connection, of course.  Then `g'
LI> will have to reconnect and do the update while you wait.

With CouchDB, at least, you can do a differential poll: tell me what has
changed since change X (integer numeric sequence).  You can also open a
persistent connection and get changes live when they are made.  So this
could be, again, a gnus-sync feature per backend, and the gnus-sync
LeSync and IMAP backends would support live updates while the file
backend wouldn't.

CouchDB's document model is interesting: you have to read the current
revision to write a new one back.  So you can't accidentally overwrite a
document, you have to read it first (which gives you a chance to
merge).  So at least for CouchDB/LeSync you don't need to do delta
files.

Ted




  parent reply	other threads:[~2012-02-16 13:07 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16  5:03 Lars Ingebrigtsen
2012-02-16  6:49 ` Lars Ingebrigtsen
2012-02-16  8:19   ` Antoine Levitt
2012-02-16  9:27   ` Steinar Bang
2012-02-16  9:35     ` Lars Ingebrigtsen
2012-02-16  7:00 ` Vegard Vesterheim
2012-02-17 17:49   ` Richard Riley
2012-02-19 15:21     ` Lars Ingebrigtsen
2012-02-19 18:04       ` Andy Moreton
2012-02-19 22:15         ` Dan Christensen
2012-02-20  7:41           ` Lars Ingebrigtsen
2012-02-20 19:20             ` Dan Christensen
2012-03-10  1:18               ` Lars Magne Ingebrigtsen
2012-02-20  7:37         ` Lars Ingebrigtsen
2012-02-20  7:51           ` Lars Ingebrigtsen
2012-02-19 19:03       ` Adam Sjøgren
2012-02-21 21:23       ` Ted Zlatanov
2012-03-10  1:12         ` Lars Magne Ingebrigtsen
2012-03-10 12:43           ` Reiner Steib
2012-03-10 13:06           ` Ted Zlatanov
2012-07-18 14:31             ` Ted Zlatanov
2012-07-18 20:52               ` Steinar Bang
2012-02-16  8:25 ` David Engster
2012-02-16  9:12   ` Lars Ingebrigtsen
2012-02-16  9:23     ` David Engster
2012-02-16  9:29       ` Steinar Bang
2012-02-16  9:25   ` Steinar Bang
2012-02-16 11:55   ` Greg Troxel
2012-02-16 12:23     ` David Engster
2012-02-16 12:54     ` Ted Zlatanov
2012-02-16 12:51   ` Ted Zlatanov
2012-02-16 13:07 ` Ted Zlatanov [this message]
2012-02-20  7:48   ` Lars Ingebrigtsen
2012-02-25  9:46     ` Steinar Bang
2012-03-10  1:07       ` Lars Magne Ingebrigtsen
2012-03-03  3:20 ` TSUCHIYA Masatoshi
2012-03-10  1:06   ` Lars Magne Ingebrigtsen
2014-10-15 23:31 ` TSUCHIYA Masatoshi
2014-10-16  8:34   ` Steinar Bang
2014-10-16 12:38   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8739absz8d.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).