URLs could be of form:
http://www.ljsite.com/users/foo/234.xml
to mimic:
http://www.ljsite.com/users/foo/234.html
But we don't want to include all text/props, because that could get huge with popular posts like on news. That's shitty to make people poll that.
What if the 234.xml file by default just listed metadata for each comment. So if there were 5,000 comments (typical max for news
<commentref id='353' state='A' parent='0' datepost='yyyymmdd hhmmss' />
And things like state/parent default to 'A' (approved) and zero (top level), then that's like 80 bytes/comment * 5000 comments.... hell, still 390k. (uncompressed, at least) That's a lot to poll.
We could do something like making the base URL
http://www.ljsite.com/users/foo/234.xml
only return the first 1000 comments by default, with a continuation URL in a certain XML element, like:
http://www.ljsite.com/users/foo/234.xml?after=3454
(to get talkids in that post after talkid 3454)
But the problem then is comments' state can change. (between approved, screened, and deleted) That's the only thing about a comment that can change.
What I've been thinking about for the next version of LJ's backend data storage is that each account has a global counter that's incremented for any change: new posts, new comments, any modifications. Then the URL could be: 234.xml?after_revid=123456 and it'd include comment state changes too.
But currently, we have no index on when comment state changes happen.
Alternatively, we could ignore the state field altogether and only provide it when requested. (maybe as one big packed string, but that's lame in XML.... *coughSVGcough*)
Then the next issue: authentication. I like the idea of making the URL each to get to ("REST") as above, though I'm also cool with making it SOAP and/or XML-RPC. (I'm liking SOAP more, having played with C#/Mono) So with SOAP/XML-RPC, we can do Digest auth (avva
Perhaps a globally recognized URL parameter to force Digest auth and setup $remote, even if you don't have LJ login cookies:
http://www.ljsite.com/users/foo/234.xml?auth=digest
Now the user sends their Digest auth credentials and we show them all comments, including screened ones.
Thoughts? What does everybody want in terms of interface?