CloudServices/Notifications/Specification: Difference between revisions

m
 
(9 intermediate revisions by 2 users not shown)
Line 5: Line 5:
== Engineers Involved  ==
== Engineers Involved  ==


* Philipp von Weitershausen
* Toby Elliot
* Alex Amariutei
* Alex Amariutei
* Shane da Silva
* Shane da Silva
* Toby Elliott
* Philipp von Weitershausen


== Terminology ==
== Terminology ==
Line 18: Line 18:
= Requirements =
= Requirements =


The following section outlines the requirements of the service with respect to the user, the system itself, as well as the third-party developers (a special type of user) who will have to interact with the system.
The following section outlines the requirements of the service with respect to the user, third-party developers (a special type of user) who will have to interact with the system. It also outlines the requirements of the system itself.


== User Requirements  ==
== User Requirements  ==
Line 29: Line 29:


* '''Portability''': Service ''MUST'' work with any device that supports the protocol.
* '''Portability''': Service ''MUST'' work with any device that supports the protocol.
== System Requirements ==
TODO


== Developer Requirements ==
== Developer Requirements ==
Line 57: Line 53:
If the user has already registered with the notification service, then they can add an additional client to receive notifications. See the list of related use cases below.
If the user has already registered with the notification service, then they can add an additional client to receive notifications. See the list of related use cases below.


'''Related Use Cases''': [[#Set Up an Additional Client|Set Up an Additional Client]]
'''Related Use Cases''': [[#Add a New Client|Add a New Client]]


=== Subscribe to Notifications ===
=== Subscribe to Notifications ===
Line 63: Line 59:
Once set up the user will the be able to subscribe to web sites which they wish to receive push notification from. The process is as follows:
Once set up the user will the be able to subscribe to web sites which they wish to receive push notification from. The process is as follows:


# User clicks a button (ideally) or otherwise interacts with a web page such that the page requests to send notifications.
# User clicks a button or otherwise interacts with a web page such that the page requests to send notifications.
# Client displays a confirmation box asking user if they wish to receive notifications from the web page in question.
# Client displays a confirmation box asking user if they wish to receive notifications from the web page in question.
# Upon confirmation, a new subscription is created and can be viewed in the client's list of subscriptions.
# Upon confirmation, a new subscription is created and can be viewed in the client's list of subscriptions.
Line 78: Line 74:
'''Related Use Cases''': [[#Subscribe to Notifications|Subscribe to Notifications]]
'''Related Use Cases''': [[#Subscribe to Notifications|Subscribe to Notifications]]


=== Set Up an Additional Client ===
=== Add a New Client ===


One of the main advantages of the service is it allows users to receive notifications on multiple clients, be it their browser, mobile phone, etc. Thus setting up another client to receive notifications is likely to be a common operation. The following are two possible methods the user can use to set up an additional client (note: the goal is to have this be virtually identical to Firefox Sync).
One of the main advantages of the service is it allows users to receive notifications on multiple clients, be it their browser, mobile phone, etc. Thus setting up another client to receive notifications is likely to be a common operation. The following are two possible methods the user can use to set up an additional client (note: the goal is to have this be virtually identical to Firefox Sync).
Line 100: Line 96:
'''Related Use Cases''': [[#Register with Notifications Service|Register with Notifications Service]]
'''Related Use Cases''': [[#Register with Notifications Service|Register with Notifications Service]]


== Web App Use Cases ==
== Providers ==


=== Send a Notification ===
=== Send a Notification ===


The web app is able to send a message (i.e. the notification) to a specific user using a '''routing key''' that was given to it by the user's client. The routing key can be thought of as an address that specifies the destination "mailbox" of the message. The process from the point of view of the web app is as follows:
The web app is able to send a message (i.e. the notification) to a specific user using a '''routing key''' that was given to it by the user's client. The routing key can be thought of as an address that specifies the destination "mailbox" of the message. It maintains the user's anonymity while still allowing the service to communicate with the user. The process from the web app's point of view is as follows:


# Web app creates a JSON string encompassing the notification it wishes to send (as well as which user to send it to)
# Web app creates a message it wishes to send
# Web app sends the JSON string to the notification server.
# Web app sends the message to the notification server.


= Implementation =
= Implementation =
Line 131: Line 127:
* '''Subscription''': Represents the relationship between a web app and a user who wishes to receive notifications from said web app. A subscription consists of the "link" that allows the web app to send notifications to the user.
* '''Subscription''': Represents the relationship between a web app and a user who wishes to receive notifications from said web app. A subscription consists of the "link" that allows the web app to send notifications to the user.


* '''Routing Key/Token''': A unique identifier generated by the Agent when a user subscribes to notifications from a web app. The routing key is used as a "mailbox address" by the web app to send notifications to the user.
* '''Routing Key/Token''': A unique identifier generated by the Agent when a user subscribes to notifications from a web app. The routing key is used as a "mailbox address" to send notifications to the user.


* '''User Exchange''': Entity within the message broker where all messages destined for a particular user are sent.
* '''User Exchange''': Entity within the message broker where all messages destined for a particular user are sent.
Line 162: Line 158:


* What features will we provide for administrators of the server?
* What features will we provide for administrators of the server?
== Meeting Notes ==
* General notes from meetings over the course of development
== Client ToDo ==
* Code clean up
* Resolve issue where messages larger than 8000 bytes are not transmitted (FOCUS)
* Android
** Send to tab (hook up UI)
** Hide previous notifications button when notifications disabled
* Cleanup on disable notifications
canmove, Confirmed users
1,173

edits