Resource Retrieval
Closed this issue · 14 comments
I would like to be able to retrieve all of the current items at the same time that I create the subscription. My understanding from reading the documentation is that this would be done using the resource retrieval request. Is this correct? Is this something that would be reasonable to add to this module?
Yes, this can be done using the retrieval call. However, there needs to be a slight delay between the susbcription and the retrieval call so that we have time to actually get that information.
Do you think you could try to fork and implement that by yourself? That would be amazing, and I'd be happy to grant you some extra free superfeedr credits for it :)
I'll give that a shot.
i have tried to implement the retrieve command but it don't get any response. are the xmpp docs (http://superfeedr.com/documentation#xmpp_notifications) up to date and should it work with http://superfeedr.com/dummy.xml ?
Hum. Docs are up to date and you should be able to read it. I suspect that the node wrapper may be faulty though.
If you have any free time, try to debug it. If not, I'll try to look at this soon.
thanks
no problem, just thought after adding the list method, adding this feature would not take more then 10min.
Generating the request is quite simple:
var stanza = new xmpp.Iq({type:'get', from: this.client.jid, to: SUPERFEEDR_ENDPOINT, id:id})
.c("pubsub", { xmlns: "http://jabber.org/protocol/pubsub" })
.c("items", { node: feedName }).root();
but the xmpp client gets no response. I looked into the superfeedr account too, and no notification are counted there.
i don't need the feature (at least atm), just wanted to fix it :)
Np, just thought it would be a quick and easy fix. Looking forward to try the "superfeedr reader API" :)
Hello, any news on this one ? I tried to implement it myself as well and the xmpp client gets no response :(
It should be simple enough, I don't get why it doesn't work !
@ocombe The Google Reader API replacement is now our main backend, so yes, we will plug that back in the XMPP API as well. In the meantime, feel free to use our HTTP API: http://superfeedr.com/hubbub?hub.mode=retrieve&hub.url=<url>
@ocombe This feature was restored in our XMPP API a couple hours ago. Please, let us know if you have any other problem.
I'll give it a try to check, but I ended up using the pubsubhubhub api since I wasn't getting notifications either with xmpp (or getting them super late, when I get them instantly with pubsubhubhub)
@ocombe That's interesting. The most common problem is that people would have 2 XMPP clients connected at the same time (same credentials), and would receive the messages only on one of them. Could it be what you were seeing?
Ah ! That's a strong possibility as I was messing around with multiples nodejs instances.
Do you think that xmpp is better than pubsubhubbub for a nodejs application ?
I like the fact that pubsubhubbub tries to call my callback url multiple times before giving up, when xmpp just doesn't.
Since it's a nodejs app, when i want to update it I will have to take it down for a few seconds (the time for it to restart), and I could miss notifications with xmpp.
Besides, I could subscribe to my dev url AND to my prod url at the same times with pubsubhubbub. But with xmpp I would have to use different credentials, as you pointed out. Shouldn't your server send notifications to call connected clients, even if the credentials are the same ?
@ocombe both XMPP and PubSubHubbub work great with Node.js. The former runs really well behind the firewall, while the later benefits from the string HTTP flavor of Node.js :)
For XMPP, we do respect the spec and only send to the highest priority. If there are multiple XMPP clients with the same priority, we will send to all of them.