- make it possible to disable caching of username/passwords in storage via a context option. - improve context.listener so that it can be callback-based, ie so that it can make the following decisions: - should it allow server-initiated changes in synctype - should it engage in slow-sync, refresh-from-client or refresh-from-server upon receiving a 508 (508's occur when anchors get out of sync) - there are *way* too many calls to normUri()... this should be called once when the uri is handed to the library and never again. - implement the extensions: x-server-push: sse:URL # the server is capable of pushing events via server sent events. x-server-changes: notify # should the server send back local stats? ie. during a refresh-from-client, # the client has no way of knowing how many remote items were deleted... x-single-session-device: true # is this a "discover" ping? ie. can the device be safely removed after # a sync completion? X-funambol-smartslow # find out what the funambol "smartslow" protocol is and support it... - currently, to make things work in a browser, external libraries *must* be amdefine-compatible... for example, underscore.js needs be wrapped with: if (typeof define !== 'function') var define = require('amdefine')(module); define([], function() { [===] content of original underscore.js [===] if ( typeof(root) != 'undefined' ) return root._; return _; }); it would be much better if i did not need to alter libraries... - look into: - https://github.com/larrymyers/jasmine-reporters - http://rockycode.com/blog/phantomjs-meets-jasmine/ - both client & server modes should ensure that incoming sessionID, messageID and commandIDs are correct. - see how error nodes come back, and think about doing it the way that funambol does: 7 3 20 Sync mail mail 506 Error setting preliminary info: Error: Account information not found! - when client is in paranoid devInfo mode (ie. context.config.trustDevInfo is false), then it executes a potentially unnecessary extra request/response phase to confirm that the devInfo has not changed... it *could* instead issue the put/get as well as the alert, *assuming* that no devInfo is going to change... but if it does, it can then react... - not sure why, but when using sbt, funambol appears to be doing an extra *unrequested* devinfo put... perhaps because sbt is responding with a "Status" node for the *Result* node, not an explicit *Put*... that would be strange/unexpected mode for the protocol... - when one client does a refresh-from-client, the server should probably execute a refresh-from-server to the other clients for optimization reasons (instead of recording a delete event for each item. THEN AGAIN, MAYBE NOT: what if the other client has added a new item between last sync and when a refresh-from-client occurred... - perhaps only do paranoid devinfo swaps after some period of time has ellapsed *OR* when indicated by the caller *OR* when any kind of failure happened (which should be detectable by a bad last anchor?) - allow the caller not to control: - devinfo *changes* that result from a paranoid devinfo swap - especially routing changes... - data changes? (that might be implied by having the agent!) - ensure that any mode that the synchronizer chooses (or the UA chooses) is a valid entry in store.syncTypes - implement server-side credential challenge... i.e.: 1 1 0 SyncHdr http://localhost:8081/funambol/ds lightsyncml:6e9391ab-947a-4fe1-978e-5a5c89cf71b4 b64 syncml:auth-basic 407 2 1 1 Put ./devinf12 407 3 1 2 Get ./devinf12 407 - give some way for peer credentials to be removed from persistence - on 407 (auth required) a Get/Put of devinfo is NOT re-issued... fix! - replace SYNCTYPE with MODE (merge, push, pull, info) & RESET (bool) - phonecopy.com places the devinfo into a CDATA section... accomodate.