summaryrefslogtreecommitdiff
path: root/development/pim/pimpaper/backendimplementation.tex
Unidiff
Diffstat (limited to 'development/pim/pimpaper/backendimplementation.tex') (more/less context) (ignore whitespace changes)
-rw-r--r--development/pim/pimpaper/backendimplementation.tex53
1 files changed, 28 insertions, 25 deletions
diff --git a/development/pim/pimpaper/backendimplementation.tex b/development/pim/pimpaper/backendimplementation.tex
index 272507a..a222be8 100644
--- a/development/pim/pimpaper/backendimplementation.tex
+++ b/development/pim/pimpaper/backendimplementation.tex
@@ -1,46 +1,49 @@
1\section{Implementation of the Backends} 1\section{Implementation of the Backends}
2Opie Backends have implementations for XML, VCF and SQL. We can 2Opie provides backend implementations for XML, VCF and SQL. XML and VCF are file based
3group the VCF and XML Backend in the File Family. 3implementations, while the SQL backend use a real database.
4 4
5\section{Locking, Journal and Visibility} 5\section{Locking, Journal and Visibility}
6Opie PIM encourages that all changes are made visible 6Opie PIM encourages that all changes are made visible
7immediately and are propagated by Qt Signals by the Frontend 7immediately and are propagated via Qt Signals by the frontend.
8but we recognize that not every Backend 8Due to performance issues, we recognize that not every backend
9- specially the File Family - is capable of making every 9implementation - especially the file based - is capable of making every
10change physically available instantly or it would be too 10change physically available instantly, called ``Live Update''. It would be too complex to
11complex to develop this is why this feature is nice to have 11implement this efficiently, thus we declare this as ``nice to have'' feature,
12but not necessary implement by the Backend.\\ 12which may be implemented by the backend.\\
13By default changes may not be lost by concurrent access and two different 13By default changes should not be lost by concurrent access to the files.
14saves. The feature to implement is called Auto-Update the Backends 14The requested feature to avaoid this, is called ``Auto-Update''.
15can utilize QCOP for the communication. When one Backend saves the data 15If one backend need to save the data, it has to lock the access (it can use API \comment{Was?}), check whether external changes
16it needs to lock the access (it can use API), check if external changes 16occurred since last save and reload and merge the data, if necessary. This merging guarantees to include all external changes
17occurred and reload the data if necessary and then save the merged changes 17to the local dataset. Afterwards it saves all data and removes the lock.
18and finally to give up the lock. 18\comment{ Was willst Du hier genau sagen? The user may call reload() at any time and the access needs to be locked
19The user may call reload() any time and the access needs to be locked 19for that.} The backends has to use the appropriate technique to provide
20for that. The Backends can use the appropriate techniques to provide 20fast and secure operations.\\
21fast and secure operation.\\ 21\comment{Ich würde im Folgenden eher das vorschlagen:
22The reload feature may be turned off for the Frontend so that a save() 22The reload feature may be turned off by the frontend to disable automatic update. In this case, the
23backend should work in ``read-only'' mode to prevent possible overwrite of changes}
24The reload feature may be turned off by the frontend so that a save()
23might possible override changes that occurred. 25might possible override changes that occurred.
24 26
25\subsubsection{Journal and Out Of Memory} 27\subsubsection{Journal and Out Of Memory}
26The Backend need to make sure that it is capable of surviving crashes 28The backend need to make sure that it is capable of surviving crashes
27and storage out of memory situation without losing data and changes.\\ 29and storage out of memory situation without losing data and changes.\\
28The File Family is encouraged to use the journal on a per user basis 30The file based backends is encouraged to use a journal-file on a per user basis
29to keep track of changes. The journal can be applied in case of a crash.\\ 31to keep track of changes. The journal can be applied in case of a crash.\\
30In out of disk storage situation the user needs to be informed so it might 32In out of disk storage situation the user needs to be informed, so he should get the chance to
31free space. 33free space before the operation is stopped.
34Database based backends should use mechanisms which are provided or suggested for the database system, used.
32 35
33\subsubsection{Features of the Backends} 36\subsubsection{Features of the backends}
34 37
35\begin{center} 38\begin{center}
36\begin{tabular}{|l|l|l|l|l|} 39\begin{tabular}{|l|l|l|l|l|}
37\hline 40\hline
38Backend & Live Update & Auto Update & Journal & Available\\ \hline 41backend & Live Update & Auto Update & Journal & Available\\ \hline
39XML & no & yes & no but SQL & after save \\ \hline 42XML & no & yes & no but SQL & after save \\ \hline
40SQL & yes & yes & yes & immediately \\ \hline 43SQL & yes & yes & yes & immediately \\ \hline
41VCF & no & no & no & never \\ \hline 44VCF & no & no & no & never \\ \hline
42\end{tabular} 45\end{tabular}
43\label{Feature of Backends} 46\label{Feature of backends}
44\end{center} 47\end{center}
45 48
46\subsection{Generic Implementation} 49\subsection{Generic Implementation}