Граф коммитов

133 Коммитов

Автор SHA1 Сообщение Дата
Dan Mills 3e51b66d87 fail recordLike if either record is null (deleted) 2009-01-07 13:05:05 -08:00
Dan Mills 3079faacf5 add clients sync (list of clients with names and types); make it simpler to create Engine subclasses; remove the 2nd 'authenticator' parameter for Resources; resetServer is now wipeServer; consider 0 an invalid place ID (fixes bug when calculating item depths); add a Svc global exported from utils.js where commonly used services can live 2009-01-06 13:54:18 -08:00
Dan Mills f706c5158c fix depth/index record generation 2009-01-02 21:13:32 -08:00
Dan Mills 84f66ce8dc drop _isEqual debug statements to trace level 2009-01-02 17:35:47 -08:00
Dan Mills 73622e4087 consider sortindex when checking if a remote record is the same as a local one 2009-01-02 17:27:45 -08:00
Dan Mills 9d56d21abe remove extra debug code 2009-01-02 16:17:36 -08:00
Dan Mills d591998b22 fix/further simplify reconciliation 2009-01-02 15:51:35 -08:00
Dan Mills 0414d1f146 remove 'outgoing' record cache (generate outgoing records at send time); clear the store cache and force a GC after reconciliation; push depth+index (metadata) records after regular (full) records; simplify + better comment reconciliation function; fix low mem check 2009-01-02 13:51:38 -08:00
Dan Mills b91c0d5409 typo fix 2008-12-30 23:56:53 -08:00
Dan Mills 08400bd281 add a generic cache class for storing records during reconciliation. cache has 100 item limit, and is cleared before and after reconciliation so the OS can reclaim memory after GC 2008-12-30 23:52:20 -08:00
Dan Mills 90bae8f088 make engine keep less records in memory by limiting the outgoing queue to a maximum of 100 records, and fetch the rest from the store each time 2008-12-29 23:28:17 -08:00
Dan Mills bf5efd53ba switch to generating individual bookmark records directly from the places store, without using a cache (to improve memory performance); create objects for bookmark types; temporarily disable history sync 2008-12-28 19:59:44 -08:00
Dan Mills 1543c71b58 force GC, makes sync of many items possible on fennec 2008-12-26 21:49:17 -08:00
Dan Mills 5c873c8695 change serverURL to use 0.3 url schema 2008-12-23 13:51:30 -08:00
Dan Mills 3bf24e2364 Various engine/bookmark changes:
* Rely on the server to sort incoming records, remove all sorting code client-side.
* Streamline sync to be able to process incoming records one at a time, as soon as they are downloaded.  This changes reconciliation to be able to process a single incoming record.
* Engine base class will automatically convert parentid, depth, and sortindex into toplevel WBO objects.  This is good for now but kinda broken, engine subclasses should really be generating WBO records themselves.
* Since index is now a toplevel WBO property, there is no need for the bookmarks sync code to subclass recordLike.
* Refactor bookmarks store to be a little cleaner and work directly with records instead of "commands".
2008-12-23 11:30:31 -08:00
Dan Mills b043c0298e change engine to process (download, reconcile, apply changes) incoming records one by one 2008-12-19 11:48:09 -08:00
Dan Mills 18166fe10e implement the awe (or tears) inducing places-style sql queries -- history sync works pretty well now 2008-12-18 22:39:32 -08:00
Dan Mills 23baae2006 don't stop applying changes when one fails to do so 2008-12-12 13:53:48 -08:00
Dan Mills 6bf68420c8 enable history sync (not working yet) 2008-12-09 12:26:14 -08:00
Dan Mills 8e9523ee72 make changeItemID exclusively a store method 2008-12-08 13:21:25 -08:00
Dan Mills e11a3250a5 remove sync cores, they are no longer used; remove sharing code from bookmarks (we can bring it back when we need it again, needs work); have the engine give hints to the store about when to wrap all items and cache them (to make subsequent calls to wrap one item fast); move serializeItem/getAllIDs into the store 2008-12-08 09:53:32 -08:00
Dan Mills 810cd9f6fe clear changed IDs before adding all current ones in first-sync case; edit the ID list directly instead of enabling/disabling the tracker 2008-12-06 00:08:54 -08:00
Dan Mills 08e95437cf parentGUID -> parentid 2008-12-05 03:36:27 -08:00
Dan Mills 3cb919b02a re-enable tracker in the first-sync case just to add all the guids; add some debugging messages; when reconciling throw out records which are identical on the client and server (even if we thought they had changed) 2008-12-05 03:28:17 -08:00
Dan Mills dfc77578a0 oops, always disable tracker during sync 2008-12-05 00:58:25 -08:00
Dan Mills 0d6ea4b75d disable tracker for entire sync run. make sure tracker is re-enabled at the end 2008-12-05 00:55:19 -08:00
Dan Mills a7fe7a2dff use callbacks instead of snapshot diffs to figure out what changes to send to the server 2008-12-05 00:39:54 -08:00
Dan Mills a10a4d3bfd add logic to detect when the same item is in both incoming & outgoing queues, but with different IDs - change the local ID in that case 2008-11-27 00:25:28 +09:00
Dan Mills 669b52e0de decrypt incoming items all in one go so as to sort them by index (which is inside the payload); don't attempt to change the index of an item if we're also changing its folder; only change index/parent if it's different from current value 2008-11-26 14:07:18 +09:00
Dan Mills b61f0c6a28 comment depth function for clarity, remove incorrect warning 2008-11-25 16:37:19 +09:00
Dan Mills fe41e68365 sort incoming records by depth, so that folders are created before their containing items 2008-11-25 16:12:00 +09:00
Dan Mills 94a267ae9b use the new modified property returned after a server POST 2008-11-25 14:48:22 +09:00
Dan Mills e33f7592d2 add some debug chatter 2008-11-25 01:48:38 +09:00
Dan Mills 89b35d0700 clean up sync function, get last timestamp properly from post result, save correct snapshot at the end, only attempt to post changes to server if there are any changes at all 2008-11-25 01:04:14 +09:00
Dan Mills 393262eead enable batch upload, yay! 2008-11-20 10:38:53 +09:00
Dan Mills f5d4bdee2f more NewEngine impl 2008-11-20 09:20:25 +09:00
Dan Mills 06155f7fae crypto changes: private keys get their own iv and salt, crypto meta records get a separate iv and no salt. various fixes in crypto code and other wbo related objects. fix crypto tests to match. 2008-11-08 02:00:33 -08:00
Dan Mills 5ad74e339a make sure records always have a data field that represents their state (e.g. for serialization); add some pki routines (createKeypair); add incoming/outgoing queue to NewEngine 2008-11-06 23:23:35 -08:00
Dan Mills 928d63611b add a temp NewEngine class that will talk to the 0.3 server 2008-11-06 19:18:07 -08:00
Dan Mills 25a8c72d97 fix log4moz calls (new api), fix module imports for renamed modules 2008-11-03 15:00:38 -08:00
Dan Mills dea1506c58 move some code from the engine to remote.js; rename FileEngine to BlobEngine (since it doesn't actually sync complete files); clean up SyncEngine's sync method 2008-08-08 14:42:57 -07:00
Dan Mills 7e76ae5040 add a hack that supresses a strange error (this._remote.status.data is null, even though it was downloaded correctly) 2008-07-31 00:20:55 -07:00
Dan Mills feddcff67b fix snapshot typos in SyncEngine 2008-07-30 22:52:49 -07:00
Dan Mills 40357d6963 more tab sync fixes, only disposing is left to fix; also allow the notify wrapper to pass along an optional data payload 2008-07-30 21:58:13 -07:00
Dan Mills 893bbb5609 use client GUID (from ClientData) for FileEngine 2008-07-29 18:38:58 -07:00
Dan Mills 34c0adde08 Remote.put doesn't require the data arg anymore 2008-07-29 17:35:10 -07:00
Dan Mills 3cc3c36b0b get crypto working with FileEngine 2008-07-29 12:04:41 -07:00
Dan Mills dea3f0cad7 initial try to get crypto working with FileEngine 2008-07-29 11:03:06 -07:00
Dan Mills c9220f8d0f Implement FileEngine 2008-07-25 17:02:43 -07:00
Dan Mills cadfaec0d3 split Engine into SyncEngine and FileEngine 2008-07-25 01:06:23 -07:00