CloudServices/Notifications/Specification: Difference between revisions

m
Line 96: Line 96:
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. The process from the point of view of the web app is as follows:


# Web app creates a JSON string of the following form:
# Web app creates a JSON string encompassing the notification it wishes to send (as well as which user to send it to)
#* <pre>{"routing_key": "mailbox identifier", "type": "message type", "timestamp": "unix timestamp in seconds", "payload": "the message contents"}</pre>
# Web app sends the JSON string to the notification server.
# Web app POSTs the JSON object to the notification server.


= Implementation =
= Implementation =
169

edits