Feed subscription

Experimental work in progress to demo real-time output with real-time input from a foreign source via PuSH blog updates.

The FeedSub plugin is now available in 0.9.x branch in a functional, but still a bit buggy, state. --brion 05:19, 20 November 2009 (UTC)

The cool part
For push-enabled feeds, the server can subscribe to feed updates via the hub site -- when the source blog updates, it sends a ping to its hub, who sends a ping on to the subscriber's StatusNet instance.

This'll let us pop in updates in near-realtime instead of having to sit around and poll, and gives us something cool to demo other than other StatusNet sites.

It'd also be darn handy in a lot of cases; instead of setting up feed2omb somewhere you can simply subscribe to feed updates directly.

Subscription UI
Let the user type in a feed or web page URL...

We fetch the associated feed and build a sample notice from the latest post:



Question: As a foreign subscription, will unsubscription show up in the regular subs interface, or is a sub list w/ unsub button needed for feeds specifically? (Not very hard if so.)

Storage
Hooking this up with the foreign services records (as for Twitter integration) seems feasible. Note that the database network for foreign users is a little non-intuitive:



We shouldn't really need a huge amount of other per-feed storage:
 * feed uri
 * hub uri
 * push subscription keys
 * last item timestamp

As well as the general info that can go in the profile:
 * channel link -> homepage
 * name -> full name, nickname
 * description -> bio

Avatar can default to the pretty generic feed icon... if crazy, some kind of favicon could be fetched. ;)

Performance issues
Fetching updates via push should be nicely fast, but if we allow non-push feeds as well we need another daemon to do the polling... we would at least be able to pull only one update for each feed, rather than for each subscribing user...

For demo purposes, rejecting non-push feeds should be fine.