Placing a foot into the other camp [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Mon 2011-03-14 14:33
Placing a foot into the other camp
LinkReply
[personal profile] simontTue 2011-03-15 11:09
Hmmm. I don't like to keep pestering you, and feel free to tell me to stop or redirect me to the proper support service, but since you've seemed enthusiastic about offering help so far...

I think I've set up my posting script and LJ crossposting properly now (though I'll know for sure the next time I make an actual post), but one thing I haven't got to work is the DW equivalent of the LJ "checkfriends" service. When I ask LJ if there's been an update on my friends page, I get this output from my polling script (which just formats the input and output parameters of the request as Python dictionaries):

Input: {'lastupdate': '2011-03-15 10:32:55', 'mode': 'checkfriends'}
Output: {'lastupdate': '2011-03-15 10:32:55', 'interval': '120', 'success': 'OK', 'new': '0'}


But doing the same on Dreamwidth gets me this rather less helpful thing:

Input: {'lastupdate': '2011-03-15 10:32:55', 'mode': 'checkforupdates'}
Output: {'lastupdate': '', 'interval': '36000', 'success': 'OK', 'new': '0'}


I've searched the Dreamwidth wiki and found the documentation for the method, which suggests to me that "lastupdate" should not be coming back as a blank string. (Admittedly I'm calling it via the LJ-style "flat" interface rather than the XML-RPC version, but it doesn't look as if that should affect anything more than the formatting of the wire data and the underlying set of fields ought to be the same either way.) Also, that poll interval is pretty unfriendly – I thought the purpose of this method was to give people an alternative to constantly reloading their friends/reading page, which it surely won't do if it demands you only call it once every ten hours.

So would you happen to know if this protocol feature is supposed to work on DW at the moment (or if it would start working if I got a paid account, perhaps), or failing that where else I might usefully look other than the docs I've found so far?

(I also couldn't find full documentation for the more sensible forms of challenge/response authentication. I can see the getchallenge request type, but I haven't found anything about how you encode a response given your challenge.)
Link Reply to this | Parent | Thread
[personal profile] livTue 2011-03-15 11:43
I'm in principle happy to help; one of the things I love about DW is getting my hands dirty in this Open Source world, and sharing all the random little bits I have learned about the codebase is very exciting for me. (Yes, I know all the other geeks have known this for 20 years, I'm slow.)

However you're getting to the point where you're asking questions beyond the limits of my technical knowhow. You've picked up enough from the docs to replace checkfriends with checkforupdates, which is the usual thing that goes wrong with porting stuff over from LJ. I have a feeling it's deliberate that it's set at an excessively long poll interval (and quite possibly disabled altogether) for free accounts (it used to be that way on LJ too, at least back in the day).

The official Support place is http://www.dreamwidth.org/support/submit. But there aren't many volunteers active there with more technical knowledge than me. For this kind of properly technical question, you'd do better asking in [site community profile] dw_dev, because the people who actually know this stuff watch that.
Link Reply to this | Parent | Thread
[personal profile] simontTue 2011-03-15 12:19
I have a feeling it's deliberate that it's set at an excessively long poll interval (and quite possibly disabled altogether) for free accounts (it used to be that way on LJ too, at least back in the day).

Hmm, now you mention it I do remember checkfriends being a bit iffy when my LJ account was a free one. (Which it hasn't been for years – I got given a permanent account free of charge in gratitude for PuTTY – so my memory of free account behaviour is somewhat hazy.)

I must say I never really understood that policy on LJ, though. I think it's a mistake to pitch checkfriends / checkforupdates as a premium service provided for the benefit of the user paying for it; its purpose is to reduce load on the LJ/DW servers, so it's a feature provided for the benefit of the site administrators, and hence it surely should be more beneficial to the site admins the more users it's provided to. In particular, if I can't use checkforupdates at two-minute intervals, then the obvious alternative is not to wait ten hours between checks but to reload my actual friends page every two minutes, which is more CPU-intensive due to having to run the S2 and lay out all the HTML – so by denying any user a working checkforupdates they're increasing the load on their server.

Still, that's not your problem, of course. And I suspect I may end up getting a paid account anyway (I want a network page, notifications for my own comments, and comment editing – LJ's gift of a permanent account has apparently had the effect of getting me accustomed to those features, and hence making me want to give DW money :-), in which case it's not my problem either...
Link Reply to this | Parent
[personal profile] simontFri 2011-03-18 09:29
I have a feeling it's deliberate that it's set at an excessively long poll interval (and quite possibly disabled altogether) for free accounts (it used to be that way on LJ too, at least back in the day).

For the record, I can now confirm this: I upgraded to a paid account this morning and suddenly checkforupdates is behaving sensibly.

I still don't see the sense in the policy, and it would have been nice to have an error message rather than getting back an unexplained blank string (I did get a nice error message when I tried to use checkfriends, which is how I knew to rename to checkforupdates), but at least the cause of the issue isn't in doubt any more :-)
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]