[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] Syncing and KResources again
From:       Holger Freyther <freyther () gmx ! net>
Date:       2003-04-23 9:02:47
[Download RAW message or body]

Hi all,
while KResources are a nice thing it does not handle the Sync case quite well.

Process A got organizer access

it puts two Events into the organizer

and stays opens


Now Process B syncs organizer with his fridge
four newly created important tasks like buying milk and throw away the 5 week 
old rumpsteak were added.
and then writes organizer back to disk

now user closes A and A flushes its copy of the calendar
This means the important synced events are gone on the Desktop


Now Process C syncs again organizer and fridge
The events vanished on the desktop and where unchanged on the fridge cause of 
the smart syncer logic it will delete them on the fridge as well.
Now it's weekend and your completely pissed off. The odour of the fridge is 
just annoying and you don't even have milk for your chocolate cornflakes.

How is guilty for that? I think KResource is not guilty for giving multiple 
access but it could handle it internally well.

Now imagine we've a simple KDED module which knows which processes currently 
use which family and which file.
Now another process is coming and wants to sync. It would open up the file. 
before DISK IO KResource would ask the KDED module to flush running 
resources.

We've two resource registered in example
    So KDED talks to the 1. and does a flush()
   After flush it talks to the 2nd resource reload and apply the changeset
   Then it would flush this resource too
   Now it would return to the 3rd one

No it's safe to read the file from DISK. It would apply changes and save them.
Now KResource would call the KDED module and say hey man tell others to reload 
and all appointments show up refreshed inside korg.

The idea is that the handling of multiple access and assuring that the data is 
right is part of KResource. So you only do open() and know that the data is 
consistent. If it was changed externally you get a reload() and you reload 
the file and apply your changes again. But everything is handled internally.

Is this already possible? Thoughts opinions? How does KPilot handle it?

-- 
_____________________________________________
Holger 'zecke' Freyther
developer
Project OPIE- the Open Palmtop Integrated Environment
http://opie.handhelds.org | http://www.opie.info (german)
IRC: irc.freenode.net #opie #opie.de
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic