Services/Sync/WEP/116: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "= Getting rid of Sync.js = == Current situation<br> == <br> *Resource._request()<br> *Utils.queryAsync()<br> *(possibly) threaded crypto<br> <br> == Problem<br> == <br> =...")
 
No edit summary
Line 15: Line 15:
<br>
<br>


== Proposed solution<br> ==
== Proposed solution<br> ==


<br>
<br>  


{| cellspacing="1" cellpadding="1" border="1"
{| cellspacing="1" cellpadding="1" border="1"
|-
|-
! scope="col" | API Method<br>
! scope="col" | API Method<br>  
! scope="col" | Risk<br>
! scope="col" | Risk<br>  
! scope="col" | Explanation<br>
! scope="col" | Explanation<br>
|-
|-
| Resource.*<br>
| Resource.*<br>  
| <br>
| high<br>  
| <br>
| Used all over the place, causes many of the following to be async.<br>
|-
|-
| Records.get()<br>
|  
| <br>
Records.import()
| <br>
 
Records.get()  
 
| low<br>  
| Uses Resource.get(). Only used in SyncEngine.sync() and Service.sync() which need to be made async anyway.<br>
|-
| PubKeys.uploadKeypair()
| low
| Uses Resource.put(). Only used in Service._remoteSetup() which needs to be made async anyway.
|-
| SyncEngine.sync()
| low
| Only used from
|-
| SyncEngine.wipeServer()
| low
| Only used from SyncEngine.sync() and
|}
|}


<br>
<br>  
 
<br>


Records.get() (may call Records.import() which calls Resource.get())<br>
<br>  


PubKeys.uploadKeypair()<br>
Records.get() (may call Records.import() which calls Resource.get())<br>  


SyncEngine.sync() (defers to ~three methods internally which do all the work)<br>
PubKeys.uploadKeypair()<br>  


SyncEngine.wipeServer()<br>
SyncEngine.sync() (defers to ~three methods internally which do all the work)<br>  


Service.login()<br>
SyncEngine.wipeServer()<br>  


Service.verifyLogin()<br>
Service.login()<br>  


Service.changePassword()<br>
Service.verifyLogin()<br>  


Service.checkUsername() / checkAccount()<br>
Service.changePassword()<br>  


Service.createAccount()<br>
Service.checkUsername() / checkAccount()<br>  


Service._scheduleNextSync()<br>
Service.createAccount()<br>  


Service.sync (and various methods that it defers to internally)<br>
Service._scheduleNextSync()<br>  


Service.wipeServer()<br>
Service.sync (and various methods that it defers to internally)<br>  


Service.getCollectionUsage<br>
Service.wipeServer(), Service.wipeRemote()


Service.getQuota<br>
Service.getCollectionUsage, Service.getQuota<br>  


<br>
<br>  


*"weave:resource:status:401" observer notification<br>
*"weave:resource:status:401" observer notification<br>


<br>
<br>  


#Everything takes a callback<br>
#Everything takes a callback<br>


<br>
<br>
canmove, Confirmed users
725

edits

Navigation menu