Mark Smith (marksmith) wrote in lj_dev,
Mark Smith
marksmith
lj_dev

Proposal: verifyitem protocol mode

I propose a new protocol mode: verifyitem.

Basically, it would look like this:

Input parameters:
journal: xb95
itemid: 217819

Output parameters:
exists: 1
public: 0
comments: 0 (if entry is public)
poster: xb95

I've heard of a bunch of third-party sites/tools that scrape an entry directly to verify that it exists and to try to see how many comments it has. To generate those pages, lots of effort goes into loading a lot of information that isn't necessary for quick "does this exist?" checks.

It'd be nice, I think, to have a protocol mode where you can say "hey, does this exist?" You then get back information on whether the post is public or not, how many comments it has, and who posted it.

Because it works on ditemids, you can't scan for entries (easily). We can easily use memcache to rate limit these queries, too. If the user is going too fast, it returns an error saying that it's going to fast and should slow down and wait N seconds. This system would still require a valid user to do the query. (Perhaps? I think it should.)

Would this be useful to any tool authors?

(And note I haven't talked about this with anybody in the office, so this may get shot down here in the end, but I want to gather usage statistics and ideas before I propose it here.)
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 12 comments