Created
September 1, 2015 22:28
-
-
Save meandavejustice/90b200128072eb4f80cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- User opens browser window. | |
- Addon queries server for updates, and attempts to establish socket | |
connection. | |
- User is notified of updates via Badge icon. | |
- User clicks addon icon and is directed to ideatown web client. | |
- On 'loaded' event, the addon sends down the update data, as well as | |
currently installed addons. | |
- The client updates itself based on this data.(The user's browser | |
should ALWAYS be the source of truth.) | |
- If there are conflicts, the addon should push an 'update' event to | |
the server to update the model. | |
- We allow the user to select which addons they would like to | |
install/remove and send the data to the addon. | |
- The addon will install/remove, send progress updates to the client, | |
and send an 'update' event to the server. | |
- User navigates away from site. | |
- Hours later, an update is pushed and the user is notified again via | |
ideatown icon badge. flow repeats. | |
+------------------------------------------+ | |
| 2. Send updates. 'handshake' complete. | | |
+-----------------------+-+ | | |
| Server | | | |
+-------------------------+ | | |
| | 1. 'hello' fetch updates. | | |
| | <--- Establish Connection. | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | v | |
+-------------------------+ | | |
+------+-----------------------+ | |
| Addon | | |
+------------------------------+ | |
+-------------------------------------> | | | |
| 5. Send ids of updates/removals | 6. install/remove, send an | | |
| | update to server. | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| +-------------------+----------+ | |
| | | |
| ^ | | |
| | | | |
++----------------------------+ | | | |
| Client | | | | |
+-----------------------------+ |3. 'loaded' | | |
| +--------------+ (if conflict | | |
| | send updates | | |
| | to server | | |
| | from addon) | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | <-----------------------------+ | |
| | 4. Response to 'loaded'. | |
+-----------------------------+ {current: ['id3', 'id4'], | |
updates: ['id1', 'id2']} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment