Changes between Version 4 and Version 5 of SesameProvider

08/18/07 12:42:05 (10 years ago)



  • SesameProvider

    v4 v5  
    1 = SesameProvider = 
     1= Sesame Page Provider = 
    3 Access to wikipages in the JSPWiki is realized through implementations of the interface !WikipageProvider. If we want to use Sesame as storage for our wikipages, we need to implement a SesameProvider. It may be necessary to implement different providers for Sesame, like for normal wikipages and for attachments. 
     3Access to wiki pages in [ JSPWiki] is realized through implementations of the !WikipageProvider interface. In order to employ an RDF store, we have written a !WikipageProvider implementation that facilitates [ Sesame 2] as its data backend. 
    5 A possible start would be Li Gui's Jena-based RDFProvider (attached). 
     5Storing pages therefore results in a series of RDF statements being written to our page repository. The following image depicts how an RDF graph for a specific page is composed: 
    8 == Graph representation and Performance Issues == 
    9 The graph representation of a Wikipage suggested by the RDFProvider is shown in the attached graphic (without the property '''hasOldContent'''). But following that suggestion, there would be a performance problem with Sesame. 
    10 We are using a !RemoteRepository, so we can only operate on a local copy of the repository. If we want to retrieve a specific version of a Wikipage, there are only two ways: 
    11  * get the whole repository as a graph and do the retrievel in-memory with getStatements(...) 
    12  * retrieve the latest version from the repository and then get the previous version until the right one is found using performGraphQuery 
    13 The problem with the first approach is, that there is no way to get only the subgraph containing all versions of a page, we have to retrieve the whole graph, which may be very large. The problem with the second approach is, that every retrieval of the previous version has to be done with its own query to the Sesame server, which is very likely to be slow. 
    16 ~~I decided to add a new property '''hasOldContent''' which links the page resource to all previous contents.~~ 
    18 The above idea still had some disadvantages, so every version of the content will be linked with the property '''hasContent''' and only the latest one will be linked through '''hasLatestContent'''. 
    20 Then it is possible to retrieve only the subgraph of one Wikipage with only one query and iterate it in-memory, or even only retrieve one specific version. 
     9Due to the nature of RDF, we can augment every wiki page with additional semantic informtation using a custom syntax (see SemanticWikiSyntax).