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. |
14 | | |
15 | | |
16 | | ~~I decided to add a new property '''hasOldContent''' which links the page resource to all previous contents.~~ |
17 | | |
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'''. |
19 | | |
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. |
| 9 | Due to the nature of RDF, we can augment every wiki page with additional semantic informtation using a custom syntax (see SemanticWikiSyntax). |