mozilla / idea-town-meta

idea town parent repo with master dockerfile wut wut
3 stars 1 forks source link

Data flow discussion. #7

Open meandavejustice opened 9 years ago

meandavejustice commented 9 years ago

@6a68 @lmorchard Hoping we could discuss the flow of keeping the addon, client, server in sync. Here is what I have been thinking...

                          +------------------------------------------+    
                          |   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']}             
nchapman commented 9 years ago

User is notified of updates via Badge icon.

Is an "update" in this context an update to the list of available add-ons?

meandavejustice commented 9 years ago

@nchapman as of now, yes. But down the road an 'update' could be any type of notification.