FOAFRealm/Documents/CacheSynchronizationFinalVersion

From Corrib Clan Wiki

Jump to: navigation, search

Cache Synchronization in FOAFRealm – final version

This document is based on proposal version of synchronization [1].


Information about persons is stored on the server as well as on the client.

  • Select

Upon request from FOAFRealm application, client selects data from the local database. If data are found, client returns them. If no data are found, client requests data from the main database on the server. Answer is inserted into the local database and returned to the application.

  • Insert

Upon request from FOAFRealm application, server creates profile on the main server and after that profile is created in a local database using unique ID generated by server.

  • Update

Upon request form FOAFRealm application, client saves changes in the local database and also sends them to the server. User's profile gets also new timestamp in both data bases (slave and master)


Features:

  • Profiles on the client side can be out-of-date after some time, after server restart or never.

Advantages:

  • the fastest solution
  • still simple solution

Disadvantages:

  • profile can be out-of-date

Information on clients is updated periodically from server (upon client request)

To prevent all profiles from being downloaded, an update mechanism is applied (Atom with modification date - timestamp). Every change triggers timestamp update.
There is a servlet on a server witch can give information about changes in persons profiles in Atom format. This is a kind of persons list.
When client gets this information, persons list is filtered. Then, client asks once again only for selected persons. Thanks to that, only subset persons need to be send to client.
At the beginning, server is requested on a regular basis (starting from 15 min). But when during some consecutive requests the number of persons in significant, such as 75 %, theclient can start requesting directly for all persons form his database. In this case servlet with Atom is omitted.
Only chosen clients can request main server.


Advantages:

  • fast solution

Disadvantages:

  • There is also no certainty that all the profiles are up-to-date.
  • A little bit complicated implementation
Facts about FOAFRealm/Documents/CacheSynchronizationFinalVersion — Click + to find similar pages.RDF feed
Personal tools

Corrib cluster project is supported by Enterprise Ireland under Grant No. ILP/05/203, Science Foundation Ireland under Grant No. SFI/02/CE1/I131.
Hosted at DERI, NUI Galway.