User:Jrconlin/SimplePushServer: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "= Simple Push Server = This document was created as a worksheet for the server back-end for WebAPI/SimplePush. This document presumes you have read that document (It's shor...")
 
No edit summary
 
Line 7: Line 7:
;client : the agent process acting on behalf of the <i>RECIPIENT</i>
;client : the agent process acting on behalf of the <i>RECIPIENT</i>
;update: an occurrence of interest to the <i>CLIENT</i>
;update: an occurrence of interest to the <i>CLIENT</i>
;provider : the generator of <i>NOTIFICATION</i>s for <i>UPDATES</i>s
;publisher : the generator of <i>NOTIFICATION</i>s for <i>UPDATES</i>s
;notification : a message from <i>PROVIDER</i> to <i>CLIENT</i> indicating <i>UPDATES</i>
;notification : a message from <i>PUBLISHER</i> to <i>CLIENT</i> indicating <i>UPDATES</i>
;server : the NOTIFICATION relaying system between the <i>CLIENT</i> and <i>PROVIDER</i>
;server : the NOTIFICATION relaying system between the <i>CLIENT</i> and <i>PUBLISHER</i>
;topic : a label to identify <i>CLIENT</i> interest for <i>NOTIFICATIONS</i> from <i>SERVER</i>
;topic : a label to identify <i>CLIENT</i> interest for <i>NOTIFICATIONS</i> from <i>SERVER</i>
;windowed polling : a <i>CLIENT</i> opens a connection to the <i>SERVER</i> every 5 minutes. If the <i>SERVER</i> has <i>NOTIFICATION</i>s for <i>CLIENT</i>, <i>CLIENT</i> will poll more frequently, adding time between each poll that returned no results.
;windowed polling : a <i>CLIENT</i> opens a connection to the <i>SERVER</i> every 5 minutes. If the <i>SERVER</i> has <i>NOTIFICATION</i>s for <i>CLIENT</i>, <i>CLIENT</i> will poll more frequently, adding time between each poll that returned no results.
Line 15: Line 15:


== Short Requirements List ==
== Short Requirements List ==
# clients register a topic with a provider.
# clients register a topic with a publisher.
# Notifications carry no data other than the topic
# Notifications carry no data other than the topic
## Actions to perform for each topic are dependent on the client.  
## Actions to perform for each topic are dependent on the client.  
Line 23: Line 23:
== Outstanding questions ==
== Outstanding questions ==
# Q: Is the topic name provided by the server?
# Q: Is the topic name provided by the server?
# Q: Should the topic be unique between client and provider, or could there be a "broadcast" for all clients of a topic?
# Q: Should the topic be unique between client and publisher, or could there be a "broadcast" for all clients of a topic?
# Q: Should there be an option for notification routing? (e.g. server to server for mobile platforms)
# Q: Should there be an option for notification routing? (e.g. server to server for mobile platforms)


Line 31: Line 31:
There are some considerations for a more "home grown" effort:
There are some considerations for a more "home grown" effort:
* PubSub uses XML as it's data transport layer, this can be problematic on platforms that are optimized for JSON.
* PubSub uses XML as it's data transport layer, this can be problematic on platforms that are optimized for JSON.
* PubSub is provider focused. Providers ping PubSubHub, which pulls data and pushes to clients. Depending on implementation, [https://code.google.com/p/pubsubhubbub/wiki/ComparingProtocols Provider] may still be hit by Thundering Herds.
* PubSub is publisher focused. Publishers ping PubSubHub, which pulls data and pushes to clients. Depending on implementation, [https://code.google.com/p/pubsubhubbub/wiki/ComparingProtocols Publishers] may still be hit by Thundering Herds.
* Notifications are more broadcast in nature, meaning that single topics are possible, but potentially expensive to maintain.  
* Notifications are more broadcast in nature, meaning that single topics are possible, but potentially expensive to maintain.  


None of these are strong arguments, however.
None of these are strong arguments, however.

Latest revision as of 21:54, 6 November 2012

Simple Push Server

This document was created as a worksheet for the server back-end for WebAPI/SimplePush. This document presumes you have read that document (It's short, go do it).

Definitions

client
the agent process acting on behalf of the RECIPIENT
update
an occurrence of interest to the CLIENT
publisher
the generator of NOTIFICATIONs for UPDATESs
notification
a message from PUBLISHER to CLIENT indicating UPDATES
server
the NOTIFICATION relaying system between the CLIENT and PUBLISHER
topic
a label to identify CLIENT interest for NOTIFICATIONS from SERVER
windowed polling
a CLIENT opens a connection to the SERVER every 5 minutes. If the SERVER has NOTIFICATIONs for CLIENT, CLIENT will poll more frequently, adding time between each poll that returned no results.


Short Requirements List

  1. clients register a topic with a publisher.
  2. Notifications carry no data other than the topic
    1. Actions to perform for each topic are dependent on the client.
    2. Multiple Notifications for a client for a topic collapse to a single Notification
  3. Notifications are delivered from server to client via windowed polling, in order to reduce live socket costs.

Outstanding questions

  1. Q: Is the topic name provided by the server?
  2. Q: Should the topic be unique between client and publisher, or could there be a "broadcast" for all clients of a topic?
  3. Q: Should there be an option for notification routing? (e.g. server to server for mobile platforms)

Thoughts

The requirements for this system seem to align fairly closely with a PubSub model. I would recommend not creating a new system from scratch, but instead running a simple PubSubHubBub node

There are some considerations for a more "home grown" effort:

  • PubSub uses XML as it's data transport layer, this can be problematic on platforms that are optimized for JSON.
  • PubSub is publisher focused. Publishers ping PubSubHub, which pulls data and pushes to clients. Depending on implementation, Publishers may still be hit by Thundering Herds.
  • Notifications are more broadcast in nature, meaning that single topics are possible, but potentially expensive to maintain.

None of these are strong arguments, however.