4 Distributed Blog Commenting Prototcol
8 I just write it. If considerable interest appear, we might submit it
9 to the IETF as RFC draft
13 Copyright (c) by Victor B. Wagner, 2008
17 This document describes a protocol which can be used by different
18 blog sites and web-based RSS aggregators to exchange the comments,
19 made by users to the blog entries either originating on this site
20 or recieved from other sites.
25 1.1 Purpose of protocol
27 Some blog sites are more like discussion forums. They allow reader
28 to comment on blog entries identifying themselfes using some
29 identity such as OpenID. If it is quite possible to distribute blog
30 entries to other (mirror) sites using protocols like RSS/Atom feeds,
31 to distribute load and improve availability of particular blog,
32 there is no way to allow users to make comments on mirror site and
33 distribute this comments to all other copies of same blog.
35 Proposed protocol closes this gap.
39 Sites participating in this protocol should be able to serve http
40 request [HTTP] and send those.
44 The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
45 "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
46 "OPTIONAL" in this document are to be interpreted as described in BCP
51 2.1 Basic terms definition
55 Blog or weblog is a web resource typically consisting of series of
56 messages (POSTS) which appear on the blog web-page starting from
57 most recent one. Each blog post can have separate web page, but it
58 is guaranteed, that by visiting well-known and constant blog URL
59 any HTTP-client would get most recent post first.
60 Typically web page on this URL contain some special links which
61 point to RSS feed of the posts, author information (FOAF) open-id
62 server which confirms blog owner identity etc. For the purposes of
63 this protocol blog is identified by this URL.
68 User is an entity which can prove identity to at least to one of
69 the servers. This server can confirm this identity to other servers
70 with OpenID or simular means. So, comments made by the user carry
71 user identity verified by the server either directly or indirectly
76 Piece of textual information associated with some post in the
77 particular blog and, may be with another comment to the same post.
79 2.2 Required comment properties
81 Each comment in the system which support this protocol MUST have
82 following proprerties:
86 Fragment of the text which MAY contain some XHTML markup, including
87 references to other web resourses, including another comments,
90 2.2.2 Globally unique identifier
92 Globaly unique identifier is created by site where comment was
93 originally posted. It MUST contain hostname of the originating site
94 and some string which ensures uniqueness among other comments
95 originatig to this site
97 2.2.3 Blog, where comment was posted to
99 Original URL of blog where comment belong
101 2.2.4 Blog post where comment was posted to
103 Permanent URL of blog post on its originating site. This URLs
104 are always included into RSS/Atom feeds, so any mirror site would
105 have no problem determining this URL
107 2.2.5 Original posting date
109 Timestamp with precision of second when comment is posted
111 Also comments might have following OPTIONAL properities
115 URL of verified user identitity of user, who submitted this comment.
116 If idenitity was provided via OpenID or similar protocol, it MUST
118 form of URL. If user authenticated on the site, where comment was
119 submitted, directly it SHOULD be OpenID URL which would prove identity
120 of this user to other sites.
122 Sites participating in this protocol MAY allow anonymous comments.
123 If comment is anonymous, Author property MUST be omitted from
126 2.2.7 Modification time
128 If comment was changed after its initial submission, it MUST contain
129 additional timestamp specifying last change date. Servers conforming
130 to this protocol SHOULD allow comment author to change comments.
132 There is one special case - deletion of comments. Either comment
133 author or owner of blog,
134 i.e. user with same identity as blog url SHOULD be able to delete
135 any comments in his blog.
137 2.2.8 Reference to parent comment
139 If site allows to comment on another comment in the blog entry, not
140 only blog entry itself, unique identificator of parent comment
141 SHOULD be recorded as comment property. If this proprerty is
142 absent, any server, recieving this comment, SHOULD assume that it is
143 made on blog entry itself.
145 3. Comment exchange protocol
149 Any site participating in this protocol should provide following
154 Page which lists blogs, which can be commented on this site.
155 This page lists all blogs either originated on this site or
156 retrieved and cached from other sites.
158 This page should have content type text/plain and list blog URLs
163 If URL consisting of BLOG list URL, slash ("/") and blog URL is
164 requested via HTTP GET method, it should return text/plain list of
165 recent comments (most recent first) in the form
167 timestamp whitespace comment-id
169 one per line, where timestamp is an integer number of seconds since
170 Unix epoch (1-1-1970 00:00 GMT).
171 If this URL is requested with skip=number parameter (i.e. appended
172 with question mark, workd skip equal sign and number), it should
173 return list of more earlier comments.
175 3.1.3 Comments itself
177 If URL described in 3.1.2 is requested via POST method and POST
178 request body has content type text/plain and consists of list of
179 comment identifiers, separated by
180 newlines, it should return text/xml data containing specified
181 comments using XML schema described in the section 4 of this
184 Comments MAY be ordered either earliest first or in order listed in
187 Any conforming implementation sending the request SHOULD send
188 identifiers of requested comments from earliest to latest.
190 3.1.4 Posting notification
192 Conforming implementation should understand request to the URL 3.1.1
193 either by POST by or GET method,
194 which contains parameter notify=blog-URL. This request means that
195 site sending this request wants to notify this site that it have new
196 comments on the specified blog.
198 If blog-URL doesn't belong to this site, it MAY respond to this
199 request with 406 (Not Acceptable) HTTP response code.
201 Otherwise it should respond with 200 response and immediately
202 initiate procedure of recieving comment from the site which sent
205 Conforming implementation SHOULD send notify requests only if
206 comment was posted on the site to the blog originating on the site
207 where request is sent, unless it is behind firewall or proxy. In
208 this case it MAY send such requests for each blog commented on it
209 to some relay site, if permitted by the relay site administrator.
211 If notifying site is behind NAT or firewall and connection cannot to
212 it cannot be stablished, reverse protocol described in section 3.3.3
216 3.2 Declaring support of this protocol
218 3.2.1 Declaring support in the protocol on the blog page
220 Each site which supports this protocol SHOULD add link tag to its
221 blog pages with rel="comment-exchange" and href pointing to URL,
222 described in the section 3.1.1.
224 3.2.2 Declaring protocol URL during comment exchange.
226 Each site which performs comment exchange procedure should provide
227 its peers means to retrieve comments from it. This is done by adding
228 custom HTTP header X-Comment-Exchange-URL to all requests to
229 protocol pages. This header should contain URL of page described in
230 3.1.1, and host name in this URL MUST resolve to the same IP address
231 request is made from.
234 3.3. Connect exchange procedure
236 3.3.1 Procedure initiation.
238 Site supporting this protocol SHOULD check presense of link
239 rel=comment-exchange on all sites it retrieves blog entries via
240 RSS/Atom. If this link is found it MAY periodically initiate comment
241 exchange procedure with these sites.
243 It also MAY initiate this procedure with any site which was known
244 to initiate this protocol with it before.
246 If 404 NOT FOUND HTTP response code is recieved when requesting URL
247 3.1.1, this site SHOULD be removed from the list of polled sites
248 until either explicit user interaction or first protocol session
249 initiated from that site.
251 3.3.2 Normal (PULL) procedure
253 1. Site requests lists of blogs from URL 3.1.1
254 2. For each blog interesting to this site, list of available
255 comments is requesed from URL 3.1.2. If site has reasonable
256 expectations that it can miss some comments, which are not
257 listed on first page, request page multiple times using skip
259 3. Prepare list of missing comments, earliest first and send it to
261 4. Repeat steps 2,3 for each blog copy of each is carried on this
264 3.3.3. Reverse (PUSH) procedure
266 1. Send notify request (3.1.4) using POST method with list of
267 available comments as specified in 3.1.3 in the POST body.
269 2. Recieve list of requested comments as text/plain resoponse to
272 3. Send XML stream of the comments using POST request to the same
273 URL with content type text/xml
275 4. Repeat steps 1-4 for each blog comments for which are to be
278 when using PUSH method X-Comment-Exchange-URL header MAY be omitted.
281 4. Comment stream XML format
283 4.1 Comment stream XML document have <comment-stream> root node.
284 Contents of this stream is sequence of <comment> element.
285 4.2 Comment element should contain following elements
286 <comment-id>unique-identifier</comment-id>
287 <blog>blog-URL</blog>
288 <post>post-URL</post>
289 <parent-id>unique-identifier</parent-id>
291 <posted>date</posted>
292 <edited>date</edited>
293 <body>text of comment with optional XHTML markup</body>
294 Some of this elements are OPTIONAL (see section ).
296 4.3. Comment deletion
297 If comment element contain element
298 <deleted/> and <author> element contains either same URL as
299 original comment with same <comment-id> or URL of blog, comment
301 comment with given identifier should be removed
302 from the user's view, but deletion notice retained in the database
304 comment would be sent from other site which didn't have recieved
305 deletion message yet.
308 4.4 Banning user from commenting.
309 If comment element contains element
310 <ban set="1">identity URL</ban> instead of body or along with
312 and comment author identity is same as
313 identity of blog it belongs to, it means that user with given
314 identity should no more be allowed to comment in this blog, and any
315 existing comments from this user should not be offered to other
316 sites, requesting comments using this protocol, even if these
317 comments has earlier timestamp than ban notice.
321 If comment element contain element
322 <ban set="0">identity URL</ban> than previously set ban should be
325 5. Full Copyright Statement
326 Would write it if document is to be submitted to the IETF as RFC