Lightning Offline Sync: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
Line 8: Line 8:


<br>  
<br>  
== Testing  ==
Testing needs to be done for events, todos, recurring events and todos and the 3 modes, startup, online, offline.
{| width="100%" cellspacing="1" cellpadding="1" border="1"
|+ Testing Scenarios
|-
| '''Scenario<br>'''
| '''Events'''<br>
| '''TODOs'''<br>
| '''Recurring Events and TODOs'''<br>
|-
| Startup to online<br>
|
Changes should be played back.
In case of conflicts (server copy changed) User is prompted For Full sync provider, Need to resolve the deletion of cache<br>
Update offline flag
| Changes should be played back.
In case of conflicts (server copy changed) User is prompted<br>
| Same<br>
|-
| Offline to Online<br>
| Changes played back<br>
| <br>
| <br>
|-
| Offline to offline<br>
| Changes remain in the cache, offline flag stays<br>
| Changes remain in the cache and viewed visually<br>
| <br>
|-
| Online to online<br>
| Playback the changes, update cache<br>
| <br>
| <br>
|-
| Online to Offline<br>
| No refresh.<br>
| <br>
| <br>
|}
<br>


== TODOs  ==
== TODOs  ==
Line 35: Line 83:
Adapt schema initialization and versioning code (calCalendarManager)  
Adapt schema initialization and versioning code (calCalendarManager)  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done  
| done  
|  
|  
Line 48: Line 96:
Add search flags "ITEM_FILTER_OFFLINE_DELETED", "ITEM_FILTER_OFFLINE_CREATED" and "ITEM_FILTER_OFFLINE_UPDATED"  
Add search flags "ITEM_FILTER_OFFLINE_DELETED", "ITEM_FILTER_OFFLINE_CREATED" and "ITEM_FILTER_OFFLINE_UPDATED"  


|  
| <br>
|  
|  
wolfgang  
wolfgang  


|  
| <br>
| done  
| done  
|  
| <br>
|-
|-
|  
|  
<strike>Check whether "ITEM_FILTER_ALL_ITEMS" is used in the views, if so, we need to create "ITEM_FILTER_ALL_ONLINE_ITEMS" ("ITEM_FILTER_ALL_ITEMS" &amp; ~ITEM_FILTER_OFFLINE_DELETED)</strike>  
<strike>Check whether "ITEM_FILTER_ALL_ITEMS" is used in the views, if so, we need to create "ITEM_FILTER_ALL_ONLINE_ITEMS" ("ITEM_FILTER_ALL_ITEMS" &amp; ~ITEM_FILTER_OFFLINE_DELETED)</strike>  


|  
| <br>
|  
|  
wolfgang  
wolfgang  


|  
| <br>
| cancelled  
| cancelled  
| Not needed since ALL_ITEMS = 0xffff and our flags are = [29..31]
| Not needed since ALL_ITEMS = 0xffff and our flags are = [29..31]
Line 70: Line 118:
Adapt getItems in calStorageCalendar with the above <strike>and the GUI code if required</strike>  
Adapt getItems in calStorageCalendar with the above <strike>and the GUI code if required</strike>  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done  
| done  
|  
| <br>
|-
|-
|  
|  
Adapt mSelectNonRecurringEventsByRange and this.mSelectNonRecurringTodosByRange queries  
Adapt mSelectNonRecurringEventsByRange and this.mSelectNonRecurringTodosByRange queries  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done  
| done  
|  
| <br>
|-
|-
|  
|  
Write offline addItem method (calStorageCalendar::addOfflineItem)  
Write offline addItem method (calStorageCalendar::addOfflineItem)  


|  
| <br>
| mohit  
| mohit  
|  
| <br>
| done  
| done  
|  
|  
Line 103: Line 151:
Write offline delete method (calStorageCalendar::deleteOfflineItem)  
Write offline delete method (calStorageCalendar::deleteOfflineItem)  


|  
| <br>
| mohit  
| mohit  
|  
| <br>
| done  
| done  
|  
| <br>
|-
|-
|  
|  
Write offline modify method (calStorageCalendar::modifyOfflineItem)  
Write offline modify method (calStorageCalendar::modifyOfflineItem)  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done  
| done  
| *Note* cachedCalendar::modifyItem deletes the old item before putting in the new item with the changes hence the offline_flag is lost. Solution: make offline_journal flag part of the interface..&nbsp;
| *Note* cachedCalendar::modifyItem deletes the old item before putting in the new item with the changes hence the offline_flag is lost. Solution: make offline_journal flag part of the interface..&nbsp;
Line 123: Line 171:
Test the above  
Test the above  


|  
| <br>
| wolfgang/mohit  
| wolfgang/mohit  
|  
| <br>
| done  
| done  
| Testing steps should be discussed
| Testing steps should be discussed
Line 132: Line 180:
Write replay method  
Write replay method  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done  
| done  
|  
| <br>
|-
|-
|  
|  
Write "switch code" in calCachedCalendar  
Write "switch code" in calCachedCalendar  


|  
| <br>
| wolfgang  
| wolfgang  
|  
| <br>
| done  
| done  
|  
|  
Line 154: Line 202:
test the above  
test the above  


|  
| <br>
|  
|  
wolfgang/mohit  
wolfgang/mohit  


|  
| <br>
| done
| done  
|  
|  
Testing steps shud be discussed  
Testing steps shud be discussed  
Line 165: Line 213:
|-
|-
| Design a workflow for handling errors pertaining to unavailability of server + replaying the changes when back online  
| Design a workflow for handling errors pertaining to unavailability of server + replaying the changes when back online  
|  
| <br>
| mohit  
| mohit  
|  
| <br>
| done
| done  
| Needs discussion with Wolfgang afterwards
| Needs discussion with Wolfgang afterwards
|-
|-
| Implement the above workflow after discussion  
| Implement the above workflow after discussion  
|  
| <br>
| mohit  
| mohit  
|  
| <br>
| done
| done  
|  
| <br>
|-
|-
|  
|  
Adapt code from Lightning 1.0b2 to HEAD  
Adapt code from Lightning 1.0b2 to HEAD  


|  
| <br>
|  
|  
mohit  
mohit  


|  
| <br>
| done
| done  
| Should be done at the very end of the above
| Should be done at the very end of the above
|}
|}
Line 192: Line 240:
----
----


<br>
<br>  


== Workflows  ==
== Workflows  ==
Line 276: Line 324:
== Efficient model for state updates during offline operations  ==
== Efficient model for state updates during offline operations  ==


{| border="1" cellpadding="1" cellspacing="1"
{| cellspacing="1" cellpadding="1" border="1"
|-
|-
! scope="row" | From/To  
! scope="row" | From/To  
Line 314: Line 362:
#more or less off-topic: the caldav conflict dialog does not show the differences between events
#more or less off-topic: the caldav conflict dialog does not show the differences between events


== ICS Provider Issues ==
== ICS Provider Issues ==
#ICS Provider knows nothing about the cache, hence it needs to be modified properly to allow it to make use of cache for playing back the entries to the server.
 
#Memory calendar assumes that every new item that is added needs to have no ID (it generates one for the item) This is not true for cached entries, they already have an entry.
#ICS Provider knows nothing about the cache, hence it needs to be modified properly to allow it to make use of cache for playing back the entries to the server.  
#Memory calendar assumes that every new item that is added needs to have no ID (it generates one for the item) This is not true for cached entries, they already have an entry.  
#Possible loss of offline cached entries during a full sync.
#Possible loss of offline cached entries during a full sync.
43

edits

Navigation menu