OStatus/PuSH producer

From StatusNet
Jump to: navigation, search

3f4qnL <a href="http://zdsoskkdikhs.com/">zdsoskkdikhs</a>, [url=http://xvwwppnetvyf.com/]xvwwppnetvyf[/url], [link=http://reklskrmvurh.com/]reklskrmvurh[/link], http://yubxcherrxhz.com/

[edit] Todo

Hub:

  • accept subscription/unsubscription requests
    • Gnome-emblem-default.svg.png  web endpoint
    • reject subs for non-canonical feeds
  • Gnome-emblem-default.svg.png  reject ping updates from outside as we're not an open-to-the-public hub
    • Gnome-emblem-default.svg.png  web endpoint
  • send update data to subscribers
    • Gnome-emblem-default.svg.png  as queue handler
    • need to be able to individually attempt resend to each subscriber that's offline
  • Gnome-emblem-default.svg.png  provide internal API to check whether a given feed is subscribed
  • Gnome-emblem-default.svg.png  provide internal API to push updates to a feed

Producer:

  • Gnome-emblem-default.svg.png  feeds for users
  • feeds for groups
  • build profile info into feed streams
    • real name
    • Gnome-emblem-default.svg.png  location [name / lat / lon] (georss already in there)
    • homepage
    • bio
    • avatar (pulling <logo> on feed for now -- we need per-user)
    • tags
  • build notice info in feeds:
    • Gnome-emblem-default.svg.png  text atom:summary
    • Gnome-emblem-default.svg.png  html atom:content
    • attachments as link/rel=enclosure (can delay consumption on that for now)
    • topics stored as atom:category, SHOULD be tags (rel-tag)
    • response stored as thread:in-reply-to
    • attention stored as omb:attn
    • repeat/retweet stored as omb:forward
  • Gnome-emblem-default.svg.png  feed update+ping on new notices
  • feed update+ping on profile change (maybe just let it wait until the next post)
    • activitystreams?
  • feed update+ping on other events -- activitystreams?
  • note we probably still need to be able to provide a regular-readable feed.
    • might need to store an 'outbox' stream including non-notice events
  • (backgroundable) profile updates

[edit] Maybes

Less vital.

Hub:

  • send renewal notices to subscribers
    • queue handler? poll?
    • actually expire dead subscribers
      • -> do we need to report this back inside so we can drop the subscriber from SN level or mark the subscriber as broken?

Producer:

  • profile info
    • language (currently we don't store it for profiles though, just for user preferences)
  • add site meta-info to streams?

[edit] Flow

  • Subscriber requests a feed subscription to the hub
    • POST /push/hub -> actions/hub.php
      • confirm this is a user feed we're handling
      • save a HubSub item w/ subscription info
      • enqueue item+'subscribe' to hubverify queue for confirmation callback
  • Hub sends a verification request to subscriber's callback
    • hubverify queue -> HubVerifyQueueHandler
      • POST a 'subscribe' verification to subscriber's callback URI (stored in HubSub item)
      • on success, save lease start & end time into HubSub item
      • on failure.... retry? cancel and delete the sub?
  • ... time passes ...
  • Subscriber user's post is processed for inbox distribution
    • enqueue to hubdistrib queue
  • Prep output for remote PuSH subscribers
    • hubdistrib queue -> HubDistribQueueHandler
      • find all verified subscriptions for this user's feed
      • for each subscriber, enqueue sub & a single-item version of the Atom feed to hubout queue
  • Send output
    • hubout queue -> HubOutQueueHandler
      • POST the feed to subscriber callback
      • on success, we're done!
      • on failure.... retry? mark another failure on the subscriber?
  • ... time passes ...
  • Hub sends a subscription renewal check to subscriber's callback MAYBE?
    • (no good way to schedule this right now? maybe while sending if we find we've passed the lease end?)
      • POST a 'subscribe' verify ping to callback
        • on success, update the lease expiration in HubSub record
        • on fail...? Retry a few times? Kill sub immediately?
  • ... time passes ...
  • Subscriber requests an unsubscribe
    • POST /push/hub -> actions/hub.php
      • confirm this is a user feed we're handling
      • enqueue item+'unsubscribe' to hubverify queue for confirmation callback
  • Hub sends a verification request to subscriber's callback
    • hubverify queue -> HubVerifyQueueHandler
      • POST 'unsubscribe' verification to subscriber's callback URI (stored in HubSub item)
      • on success, delete the subscription record
      • on failure.... retry? cancel the unsub request?
Personal tools
Namespaces
Variants
Actions
Navigation
Status.net
Toolbox