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 proprieties
81 Each comment in the system which support this protocol MUST have
82 following proprieties:
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 propriety 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. Owner of blog,
133 i.e. user with same identity as blog url SHOULD be able to delete
134 any comments in his blog.
136 2.2.8 Reference to parent comment
138 If site allows to comment on another comment in the blog entry, not
139 only blog entry itself, unique identificator of parent comment
140 SHOULD be recorded as comment propriety. If this propriety is
141 absent, any server, recieving this comment, SHOULD assume that it is
142 made on blog entry itself.
144 3. Comment exchange protocol
148 Any site participating in this protocol should provide following
153 Page which lists blogs, which can be commented on this site
154 This page should have content type text/plain and list blog URLs
159 If URL consisting of BLOG list URL, slash ("/") and blog URL is
160 requested via HTTP GET method, it should return text/plain list of
161 recent comments (most recent first) in the form
163 timestamp whitespace comment-id
166 If this URL is requested with skip=number parameter (i.e. appended
167 with question mark, workd skip equal sign and number), it should
168 return list of more earlier comments.
170 3.1.3 Comments itself
172 If URL described in 3.1.2 is requested via POST method and POST
173 request body consists of list of comment identifiers, separated by
174 newlines, it should return text/xml data containing specified
175 comments using XML schema described in the section 4 of this
178 Comments MAY be ordered either earliest first or in order listed in
181 Any conforming implementation sending the request SHOULD send
182 identifiers of requested comments from earliest to latest.
184 3.1.4 Posting notification
186 Conforming implementation should understand request to the URL 3.1.1
187 either by POST by or GET method,
188 which contains parameter notify=blog-URL. This request means that
189 site sending this request wants to notify this site that it have new
190 comments on the specified blog.
192 If blog-URL doesn't belong to this site, it MAY respond to this
193 request with 406 (Not Acceptable) HTTP response code.
195 Otherwise it should respond with 200 response and immediately
196 initiate procedure of recieving comment from the site which sent
199 Conforming implementation SHOULD send notify requests only if
200 comment was posted on the site to the blog originating on the site
201 where request is sent, unless it is behind firewall or proxy. In
202 this case it MAY send such requests for each blog commented on it
203 to some relay site, if permitted by the relay site administrator.
205 If notifying site is behind NAT or firewall and connection cannot to
206 it cannot be stablished, reverse protocol described in section 3.3.3
210 3.2 Declaring support of this protocol
212 3.2.1 Declaring support in the protocol on the blog page
214 Each site which supports this protocol SHOULD add link tag to its
215 blog pages with rel="comment-exchange" and href pointing to URL,
216 described in the section 3.1.1.
218 3.2.2 Declaring protocol URL during comment exchange.
220 Each site which performs comment exchange procedure should provide
221 its peers means to retrieve comments from it. This is done by adding
222 custom HTTP header X-Comment-Exchange-URL to all requests to
223 protocol pages. This header should contain URL of page described in
224 3.1.1, and host name in this URL MUST resolve to the same IP address
225 request is made from.
228 3.3. Connect exchange procedure
230 3.3.1 Procedure initiation.
232 Site supporting this protocol SHOULD check presense of link
233 rel=comment-exchange on all sites it retrieves blog entries via
234 RSS/Atom. If this link is found it MAY periodically initiate comment
235 exchange procedure with these sites.
237 It also MAY initiate this procedure with any site which was known
238 to initiate this protocol with it before.
240 If 404 NOT FOUND HTTP response code is recieved when requesting URL
241 3.1.1, this site SHOULD be removed from the list of polled sites
242 until either explicit user interaction or first protocol session
243 initiated from that site.
245 3.3.2 Normal (PULL) procedure
247 1. Site requests lists of blogs from URL 3.1.1
248 2. For each blog interesting to this site, list of available
249 comments is requesed from URL 3.1.2. If site has reasonable
250 expectations that it can miss some comments, which are not
251 listed on first page, request page multiple times using skip
253 3. Prepare list of missing comments, earliest first and send it to
255 4. Repeat steps 2,3 for each blog copy of each is carried on this
258 3.3.3. Reverse (PUSH) procedure
260 1. Send notify request (3.1.4) using POST method with list of
261 available comments as specified in 3.1.3 in the POST body.
263 2. Recieve list of requested comments as text/plain resoponse to
266 3. Send XML stream of the comments using POST request to the same
267 URL with content type text/xml
269 4. Repeat steps 1-4 for each blog comments for which are to be
272 when using PUSH method X-Comment-Exchange-URL header MAY be omitted.
275 4. Comment stream XML format
277 4.1 Comment stream XML document have <comment-stream> root node.
278 Contents of this stream is sequence of <comment> element.
279 4.2 Comment element should contain following elements
280 <comment-id>unique-identifier</comment-id>
281 <blog>blog-URL</blog>
282 <post>post-URL</post>
283 <parent-id>unique-identifier</parent-id>
285 <posted>date</posted>
286 <edited>date</edited>
287 <body>text of comment with optional XHTML markup</body>
288 Some of this elements are OPTIONAL (see section ).
290 4.3. Comment deletion
291 If comment element contain element
292 <deleted/> and <author> element contains either same URL as
293 original comment with same <comment-id> or URL of blog, comment
295 comment with given identifier should be removed
296 from the user's view, but deletion notice retained in the database
298 comment would be sent from other site which didn't have recieved
299 deletion message yet.
302 4.4 Banning user from commenting.
303 If comment element contains element
304 <ban set="1">identity URL</ban> instead of body or along with
306 and comment author identity is same as
307 identity of blog it belongs to, it means that user with given
308 identity should no more be allowed to comment in this blog, and any
309 existing comments from this user should not be offered to other
310 sites, requesting comments using this protocol, even if these
311 comments has earlier timestamp than ban notice.
315 If comment element contain element
316 <ban set="0">identity URL</ban> than previously set ban should be
319 5. Full Copyright Statement
320 Would write it if document is to be submitted to the IETF as RFC