oldm/OldMan — pull request #30 by bcogrel (2014-06-09 21:26:29+00:00)
Title: Eager filter

Lazyness is the current strategy adopted by OldMan.
`Resource` objects are extracted lately from a SPARQL query if not cached.
Because querying is blocking (and threading is not supported), retrieving new resources results in a sequence of simple SPARQL query. This becomes very slow when a lot of queries are made to a remote SPARQL endpoint, partly because of the network latency.

The DBpedia example shows its inefficiency.

To improve this situation, we propose an optional eager strategy that minimizes the number of requests when calling the `filter()` method. For instance, all the properties of the 10 first films on DBpedia are retrieved within one single query if the `eager` parameter is set to `True`.

One step further, it is to possible to retrieve `Resource` objects that are the value of some declared properties. In the DBpedia example, data about actors is also obtained from the query of the 10 first films thanks to the property `dbpo:starring`.