From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79433 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus sync Date: Sun, 10 Jul 2011 21:31:05 +0200 Organization: Probably a good idea Message-ID: <87zkkmkk5i.fsf@dod.no> References: <9uhb77o73s.fsf@news.eternal-september.org> <87wrg3v0yi.fsf@lifelogs.com> <87boxebh2q.fsf@dod.no> <871uyajgxw.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310326412 17203 80.91.229.12 (10 Jul 2011 19:33:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2011 19:33:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27729@lists.math.uh.edu Sun Jul 10 21:33:26 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfzkr-0001GD-Hk for ding-account@gmane.org; Sun, 10 Jul 2011 21:33:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Qfzjx-0008P6-2N; Sun, 10 Jul 2011 14:32:29 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Qfzju-0008On-27 for ding@lists.math.uh.edu; Sun, 10 Jul 2011 14:32:26 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qfzji-0000RB-G3 for ding@lists.math.uh.edu; Sun, 10 Jul 2011 14:32:25 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Qfzjf-0005fK-HX for ding@gnus.org; Sun, 10 Jul 2011 21:32:11 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qfzje-0000XY-SG for ding@gnus.org; Sun, 10 Jul 2011 21:32:11 +0200 Original-Received: from 84.16.197.178.nteb.no ([84.16.197.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 21:32:10 +0200 Original-Received: from sb by 84.16.197.178.nteb.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Jul 2011 21:32:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 95 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 84.16.197.178.nteb.no User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.1 (gnu/linux) Mail-Copies-To: never Cancel-Lock: sha1:88W9golum0MAPDYJ2A8OrmEL47s= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79433 Archived-At: >>>>> Ted Zlatanov : [snip!] > My plan is the same as before: server-centric, accepts a few formats, > does merge/intersection/reset, and outputs into JSON and Lisp > expressions. I've had some thoughts about the implementation myself. I've been thinking of a RESTful approach. You would have a URL space where you PUT and GET URLs, and where the local path part changes, according to the resource you are PUTing and GETing. By GET, PUT, and DELETE, I mean the HTTP commands. User authentication and user selection would be done, using HTTP authentication, such as basic, or digest-md5 (not excluding unofficial ones like NTLM or kerb, if emacs and the server both can get support for it. Format selection, and date information, will be provided using HTTP headers. At the top you would have something like https://myserver/gnussync/backends Doing GET on this URL would list all synced backends as a lisp or JSON list. Which format you desire you can set with the Accept-Format header. You can create a new backend with a PUT to a child of "backends", eg. https://myserver/gnussync/backends/nnmybackend Trying to re-PUT an existing backend should fail. You would explicitly have to DELETE it first. If you GET a backend, eg. https://myserver/gnussync/backends/nntp you would get the list of servers for that backend, as a JSON or lisp list. Like for backends, creating a new server will be done with PUT, and trying to PUT an existing server should fail. An existing server would have to be DELETE'd before it could be re-PUT. If you GET a server, eg. https://myserver/gnussync/backends/nntp/news.gmane.org you will get a list with two members "parameters" and "groups" I haven't given much thought to the behaviour of https://myserver/gnussync/backends/nntp/news.gmane.org/parameters If you GET the "groups" of a server, eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups you will receive the groups of that server as a lisp or JSON list. A new group can be created by doing a PUT of a sub-URL of the "groups", eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.new.group Trying to PUT an existing group should fail. An existing group would have to be DELETE's befor a new one could be PUT in its place. If you GET a group, you will get a lisp, or JSON list containing two members: "parameters" and "marks". I haven't given much thought to the behaviours of group parameters, like eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.emacs.gnus.general/parameters If you GET a group's "marks", eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.emacs.gnus.general/marks you will receive a lisp or JSON list of all of the articles of that group where tickmarks have been set. Doing a "marks" GET with no qualifiers should return all of the marks set. I haven't figured out if the appropriate way of getting marks newer than a cut-off, is by doing a conditional GET, or by adding an argument, like eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.emacs.gnus.general/marks?cutoff=2011-07-10-09:02:55 New marks are created, or old ones are updated, by doing a PUT of the article number, eg. https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.emacs.gnus.general/marks/79313 Doing a PUT of an existing mark isn't an error. The newest will win. A tick mark be retreived by using a direct GET of a tickmark URL. Even though it may be in breakage of REST rules (is it...?) it may be convenient to get the tick marks together with the lisp or JSON list of tick marks, eg. by using an argument: https://myserver/gnussync/backends/nntp/news.gmane.org/groups/gmane.emacs.gnus.general/marks?cutoff=2011-07-10-09:02:55&inlinemarks=true That's how far my thoughts have gone.