From arjohn.kampman at aduna-software.com Mon Jul 9 11:27:54 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Mon, 09 Jul 2007 11:27:54 +0200 Subject: [Rdf2go-devel] rdf2go junit failure with Sesame 2 Message-ID: <4691FF9A.6090901@aduna-software.com> Hi all, I'm currently working on improving the SPARQL support in Sesame 2. Until last week, graph patterns in SPARQL queries that were not scoped to a particular named graph (indicated by the GRAPH keyword) would match any statement in a repository. As the sparql test cases indicated that this was an error, I have now fixed this: graph patterns that query the "default graph" now ignore statements from named graphs. As a result of this change, one of the rdf2go's junit tests now fails. org.ontoware.rdf2go.AbstractModelSetTest.testSparqlConstruct() evaluates the following query on a model set with two named graphs: PREFIX rdfs: PREFIX rdf: construct {?s rdf:type ?o} where {?s rdf:type ?o} Where this query used to match 395 statements from the two named graphs, it now returns 0 results. As a result, the assertion in testSparqlConstruct() fails. As rdf2go works on more than just Sesame, I was a bit surprised by this failure. Does this test succeed with any of the other backends for rdf2go? To fix the test failure, the query would have to modified to something like this: PREFIX rdfs: PREFIX rdf: construct {?s rdf:type ?o} where { graph ?g {?s rdf:type ?o} } -- Arjohn Kampman, Senior Software Engineer Aduna - Guided Exploration www.aduna-software.com From voelkel at fzi.de Mon Jul 9 15:13:04 2007 From: voelkel at fzi.de (Max Voelkel) Date: Mon, 9 Jul 2007 15:13:04 +0200 Subject: [Rdf2go-devel] commit() ? Message-ID: <679866452.20070709151304@fzi.de> Hi, should RDF2Go include explicit support for handling different commit strategies? This could allows several applications to have greater performance. The simplest form would be to add /** * Writes all open changes of this model to the underlying persistence layer - if one is * available for this model. Otherwise nothing happens. */ Model.flush(); and ModelSet.flush(); commit() instead of flush() is also fine - any opinions? Auto-commiting *all* the time is too slow, neve commiting anything unless explicitly wirting to a file is also to cumbersome. Sesames API is nice there, it uses commit() - should RDF2Go also introduce this? Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From antoni.mylka at dfki.uni-kl.de Wed Jul 11 14:22:07 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Wed, 11 Jul 2007 14:22:07 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model Message-ID: <4694CB6F.10108@dfki.uni-kl.de> What is the correct way of to state that I want to query a single model, that is a single context within an underlying repository. I must admit I have little experience with sparql, but the way I understand the specs is that a query without the FROM or GRAPH constructs is only evaluated against triples in NULL context. "A SPARQL query is executed against an RDF Dataset which represents a collection of graphs. An RDF Dataset comprises one graph, the default graph, which does not have a name, and zero or more named graphs, where each named graph is identified by an IRI." - [1] sec. 8 I've been trying things like URI uri = model.getContextURI(); if (uri == null) { query = "SELECT {?s ?p ?o} WHERE ... } else { query = "SELECT {?s ?p ?o} FROM <" + uri.toString + "> WHERE ..." } This makes it difficult to externalize the queries though. Antoni Mylka antoni.mylka at dfki.de [1] http://www.w3.org/TR/rdf-sparql-query/ From gunnar.grimnes at dfki.de Wed Jul 11 14:54:54 2007 From: gunnar.grimnes at dfki.de (Gunnar Aastrand Grimnes) Date: Wed, 11 Jul 2007 14:54:54 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694CB6F.10108@dfki.uni-kl.de> References: <4694CB6F.10108@dfki.uni-kl.de> Message-ID: <4694D31E.1020507@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is a good question (meaning, there is no answer) For the Sesame RDF2Go adapter the Model is a normal context-aware repository underneath and I would guess that the queries are passed unchanged to the repository (Does anyone care to verify?) [*] I have been asking around lately and the behaviour of sparql queries with NO graph given (i.e. not in the protocol, no FROM or FROM NAMED clauses and no GRAPH clause) is undefined, i.e. it is up to each store to decide. Sesame changed their behaviour last week, so now it does the "null" context as you describe. Previously they did everything when on context was given. For Jena RDF2Go adaptors this issue does not arise, because the model wraps a jena model which is not context aware (i.e. it only knows it's own context) - - Gunnar [*] I think ELMO includes a context-aware repository connection that does the right thing with queries. Antoni Mylka wrote: > What is the correct way of to state that I want to query a single model, > that is a single context within an underlying repository. I must admit I > have little experience with sparql, but the way I understand the specs > is that a query without the FROM or GRAPH constructs is only evaluated > against triples in NULL context. > > "A SPARQL query is executed against an RDF Dataset which represents a > collection of graphs. An RDF Dataset comprises one graph, the default > graph, which does not have a name, and zero or more named graphs, where > each named graph is identified by an IRI." - [1] sec. 8 > > I've been trying things like > > URI uri = model.getContextURI(); > if (uri == null) { > query = "SELECT {?s ?p ?o} WHERE ... > } else { > query = "SELECT {?s ?p ?o} FROM <" + uri.toString + "> WHERE ..." > } > > This makes it difficult to externalize the queries though. > > Antoni Mylka > antoni.mylka at dfki.de > > > [1] http://www.w3.org/TR/rdf-sparql-query/ > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel - -- Gunnar Aastrand Grimnes gunnar.grimnes [AT] dfki.de DFKI GmbH Knowledge Management Trippstadter Strasse 122 D-67663 Kaiserslautern Germany Office: +49 631 205 75-117 Mobile: +49 177 277 4397 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlNMefD15aMgAOfcRArfkAKDQpKEk/xPThxIjCFLA2j6dfuIW0QCgkMH0 RMIjtaxO22EZc6WMEYD1h3Q= =jVWA -----END PGP SIGNATURE----- From antoni.mylka at dfki.uni-kl.de Wed Jul 11 15:30:53 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Wed, 11 Jul 2007 15:30:53 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694D31E.1020507@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694D31E.1020507@dfki.de> Message-ID: <4694DB8D.8090505@dfki.uni-kl.de> Gunnar Aastrand Grimnes pisze: > I have been asking around lately and the behaviour of sparql queries with NO > graph given (i.e. not in the protocol, no FROM or FROM NAMED clauses and no > GRAPH clause) is undefined, i.e. it is up to each store to decide. Indeed.. Excerpt from [1] sec. 8.2 "If a query provides such a dataset description, then it is used in place of any dataset that the query service would use if no dataset description is provided in a query." It doesn't seem to state WHAT dataset SHOULD a query service use if no dataset description is provided in a query. weird... Antoni Mylka antoni.mylka at dfki.de [1] http://www.w3.org/TR/rdf-sparql-query From arjohn.kampman at aduna-software.com Wed Jul 11 16:55:37 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Wed, 11 Jul 2007 16:55:37 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694CB6F.10108@dfki.uni-kl.de> References: <4694CB6F.10108@dfki.uni-kl.de> Message-ID: <4694EF69.1070200@aduna-software.com> Antoni Mylka wrote: > What is the correct way of to state that I want to query a single model, > that is a single context within an underlying repository. I must admit I > have little experience with sparql, but the way I understand the specs > is that a query without the FROM or GRAPH constructs is only evaluated > against triples in NULL context. > > "A SPARQL query is executed against an RDF Dataset which represents a > collection of graphs. An RDF Dataset comprises one graph, the default > graph, which does not have a name, and zero or more named graphs, where > each named graph is identified by an IRI." - [1] sec. 8 > > I've been trying things like > > URI uri = model.getContextURI(); > if (uri == null) { > query = "SELECT {?s ?p ?o} WHERE ... > } else { > query = "SELECT {?s ?p ?o} FROM <" + uri.toString + "> WHERE ..." > } > > This makes it difficult to externalize the queries though. One option is to use SPARQL's Datasets to specify which graphs the default graph and the set of named graphs consist of and then use a query that operates on this default graph and/or set of named graphs. So with your second query above, any graph patterns that query the default graph are evaluated on the graph with name . FWIW: Sesame does not support datasets yet, but I'm currently working on better SPARQL support for the next release. The other option is to use the GRAPH keyword to select a specific named graph from the graphs that are available in the repository. This is probably what you are looking for. To give an example: SELECT ?s ?p ?o WHERE { GRAPH { ... } } Hope this helps, Arjohn From gunnar.grimnes at dfki.de Wed Jul 11 16:59:34 2007 From: gunnar.grimnes at dfki.de (Gunnar AAstrand Grimnes) Date: Wed, 11 Jul 2007 16:59:34 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694EF69.1070200@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> Message-ID: <4694F056.10007@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry, this is a sesame question so I'll double post to the two lists: After the recent changes in sesame, how do I now query the WHOLE quadstore? I can do SELECT ?x WHERE { GRAPH ?g { ?x rdf:type foaf:Person }} and leave ?G unbound, but if I want two triple patterns I need: SELECT ?x WHERE { GRAPH ?g { ?x rdf:type foaf:Person } GRAPH ?g2 {?x foaf:name "Gunnar" } } which clearly gets ridiculous for any non-trivial query. This can't be necessary or? - From my travels in the query engine of sesame I would guess that querying the whole quadstore is actually the base case and easiest thing to do? - - Gunnar Arjohn Kampman wrote: > Antoni Mylka wrote: >> What is the correct way of to state that I want to query a single model, >> that is a single context within an underlying repository. I must admit I >> have little experience with sparql, but the way I understand the specs >> is that a query without the FROM or GRAPH constructs is only evaluated >> against triples in NULL context. >> >> "A SPARQL query is executed against an RDF Dataset which represents a >> collection of graphs. An RDF Dataset comprises one graph, the default >> graph, which does not have a name, and zero or more named graphs, where >> each named graph is identified by an IRI." - [1] sec. 8 >> >> I've been trying things like >> >> URI uri = model.getContextURI(); >> if (uri == null) { >> query = "SELECT {?s ?p ?o} WHERE ... >> } else { >> query = "SELECT {?s ?p ?o} FROM <" + uri.toString + "> WHERE ..." >> } >> >> This makes it difficult to externalize the queries though. > > One option is to use SPARQL's Datasets to specify which graphs the > default graph and the set of named graphs consist of and then use a > query that operates on this default graph and/or set of named graphs. So > with your second query above, any graph patterns that query the default > graph are evaluated on the graph with name . FWIW: > Sesame does not support datasets yet, but I'm currently working on > better SPARQL support for the next release. > > The other option is to use the GRAPH keyword to select a specific named > graph from the graphs that are available in the repository. This is > probably what you are looking for. To give an example: > > SELECT ?s ?p ?o > WHERE { > GRAPH { ... } > } > > Hope this helps, > > Arjohn > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlPBWfD15aMgAOfcRAuhmAJ9mG8x49PSOPnCAMT6sELcpD71W1gCeONp3 T2NqDDoxZWOlCYr4gcWAYwA= =rz9I -----END PGP SIGNATURE----- From arjohn.kampman at aduna-software.com Wed Jul 11 17:02:13 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Wed, 11 Jul 2007 17:02:13 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694D31E.1020507@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694D31E.1020507@dfki.de> Message-ID: <4694F0F5.3060605@aduna-software.com> Gunnar Aastrand Grimnes wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This is a good question (meaning, there is no answer) > > For the Sesame RDF2Go adapter the Model is a normal context-aware repository > underneath and I would guess that the queries are passed unchanged to the > repository (Does anyone care to verify?) [*] > I have been asking around lately and the behaviour of sparql queries with NO > graph given (i.e. not in the protocol, no FROM or FROM NAMED clauses and no > GRAPH clause) is undefined, i.e. it is up to each store to decide. Sesame > changed their behaviour last week, so now it does the "null" context as you > describe. Previously they did everything when on context was given. Can I ask whom you've been talking to about the default graph semantics? I also thought that it's up to the repository to decide which graphs/contexts are part of the "default default graph", but apparently the SPARQL test cases thought otherwise. Some of the test cases simply fail when the default graph matches more than just the "NULL context". Arjohn From gunnar.grimnes at dfki.de Wed Jul 11 17:10:53 2007 From: gunnar.grimnes at dfki.de (Gunnar AAstrand Grimnes) Date: Wed, 11 Jul 2007 17:10:53 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694F0F5.3060605@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694D31E.1020507@dfki.de> <4694F0F5.3060605@aduna-software.com> Message-ID: <4694F2FD.6070205@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I asked in #swig :) Check the logs, but I think LeeF and AndyS replied. - - Gunnar Arjohn Kampman wrote: > Gunnar Aastrand Grimnes wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This is a good question (meaning, there is no answer) >> >> For the Sesame RDF2Go adapter the Model is a normal context-aware >> repository >> underneath and I would guess that the queries are passed unchanged to the >> repository (Does anyone care to verify?) [*] >> I have been asking around lately and the behaviour of sparql queries >> with NO >> graph given (i.e. not in the protocol, no FROM or FROM NAMED clauses >> and no >> GRAPH clause) is undefined, i.e. it is up to each store to decide. Sesame >> changed their behaviour last week, so now it does the "null" context >> as you >> describe. Previously they did everything when on context was given. > > Can I ask whom you've been talking to about the default graph semantics? > I also thought that it's up to the repository to decide which > graphs/contexts are part of the "default default graph", but apparently > the SPARQL test cases thought otherwise. Some of the test cases simply > fail when the default graph matches more than just the "NULL context". > > Arjohn -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlPL9fD15aMgAOfcRAgNAAJ9yCuA59C42YdI6n1RN/iVp8TZY7wCg2YAk BvN+N1LvQXsoJPkSa5ntNxc= =9QOP -----END PGP SIGNATURE----- From arjohn.kampman at aduna-software.com Wed Jul 11 18:35:14 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Wed, 11 Jul 2007 18:35:14 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4694F056.10007@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> Message-ID: <469506C2.7060501@aduna-software.com> Gunnar AAstrand Grimnes wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Sorry, this is a sesame question so I'll double post to the two lists: > > After the recent changes in sesame, how do I now query the WHOLE quadstore? > > I can do > > SELECT ?x WHERE { GRAPH ?g { ?x rdf:type foaf:Person }} > > and leave ?G unbound, but if I want two triple patterns I need: > > SELECT ?x WHERE { > GRAPH ?g { ?x rdf:type foaf:Person } > GRAPH ?g2 {?x foaf:name "Gunnar" } } > > which clearly gets ridiculous for any non-trivial query. This can't be > necessary or? With the current semantics of "default graph" (I had to change the semantics for the sparql test cases to succeed, still need to find out if this is the only way), you can use the following query: SELECT ... WHERE { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } } From gunnar.grimnes at dfki.de Wed Jul 11 18:51:41 2007 From: gunnar.grimnes at dfki.de (Gunnar AAstrand Grimnes) Date: Wed, 11 Jul 2007 18:51:41 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <469506C2.7060501@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> Message-ID: <46950A9D.8040003@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > SELECT ... > WHERE { > { ?s ?p ?o } > UNION > { GRAPH ?g { ?s ?p ?o } } > } Ok, but say that I have more than (?s ?p ?o) in my query, I also have (?s ?p2 ?o2) and (?s ?p2 ?o2) and say I want a match even when (?s ?p ?o) is in one named graph (any one) and (?s ?p2 ?o2) in another. Then I have the have the two triples in separate graph clauses, or? i.e. even though ?g is unbound here (and unfiltered) it will bind to one graph for all triples inside the {}s, or? Cheers! - - Gunnar -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlQqdfD15aMgAOfcRAmmWAJ4ve/PgEodl8Q2HTQwvOhwHUOpO9gCfSmel 90TMOXLFnDK/oeofpxP5ii8= =Q6Yk -----END PGP SIGNATURE----- From gunnar.grimnes at dfki.de Wed Jul 11 18:53:09 2007 From: gunnar.grimnes at dfki.de (Gunnar AAstrand Grimnes) Date: Wed, 11 Jul 2007 18:53:09 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <46950A9D.8040003@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> Message-ID: <46950AF5.9080002@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Ok, but say that I have more than (?s ?p ?o) in my query, I also have > (?s ?p2 ?o2) and (?s ?p2 ?o2) Whoops, "and (?s ?p3 ?o3)" ... doesn't matter though. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlQr1fD15aMgAOfcRAnnWAKCBDwLyxNGyz98l3PneqbEbfekFKQCg8fX4 P0arlCTIlh5TGMybcI1sAwc= =X8Ea -----END PGP SIGNATURE----- From arjohn.kampman at aduna-software.com Thu Jul 12 15:15:23 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Thu, 12 Jul 2007 15:15:23 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <46950A9D.8040003@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> Message-ID: <4696296B.8060108@aduna-software.com> Gunnar AAstrand Grimnes wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > >> SELECT ... >> WHERE { >> { ?s ?p ?o } >> UNION >> { GRAPH ?g { ?s ?p ?o } } >> } > > Ok, but say that I have more than (?s ?p ?o) in my query, I also have > (?s ?p2 ?o2) and (?s ?p3 ?o3) and say I want a match even when (?s ?p > ?o) is in one named graph (any one) and (?s ?p2 ?o2) in another. > > Then I have the have the two triples in separate graph clauses, or? > i.e. even though ?g is unbound here (and unfiltered) it will bind to one > graph for all triples inside the {}s, or? That's correct. The patterns inside a "graph graph pattern" only match a single graph at a time. For example: SELECT ... WHERE { GRAPH ?g1 { ?s1 ?p1 ?o1 } GRAPH ?g2 { ?s2 ?p2 ?o2 } GRAPH ?g3 { ?s3 ?p3 ?o3 } } Though in practice, you will hardly ever have such a set of unrelated statement patterns. At least, I haven't seen a lot of such queries, if at all. From voelkel at fzi.de Thu Jul 12 16:20:49 2007 From: voelkel at fzi.de (Max Voelkel) Date: Thu, 12 Jul 2007 16:20:49 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4696296B.8060108@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> Message-ID: <612770442.20070712162049@fzi.de> Hi, I find these queries on Graph Sets quite confusing, but so are the specs. If one wants to query a single graph, I always had the assumption that a Model.sparqlSelect( ... ) would always return only matches only coming from this model - is thins incorrect? If so, it might be better to @Deprecate the query functions in the Model and keep only the queries in ModelSet. Any opinions on this? (also: do you have opinions on adding a commit(); to Model and ModelSet?) Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From gunnar.grimnes at dfki.de Thu Jul 12 16:36:29 2007 From: gunnar.grimnes at dfki.de (Gunnar Aastrand Grimnes) Date: Thu, 12 Jul 2007 16:36:29 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <612770442.20070712162049@fzi.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> <612770442.20070712162049@fzi.de> Message-ID: <46963C6D.4070609@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adding commit makes a lot of sense. But please add also the sesame inspired functions "setAutoCommit(bool)" and make it default to true, so that old code doesn't need many changes! - - Gunnar Max Voelkel wrote: > Hi, > > I find these queries on Graph Sets quite confusing, but so are the specs. > > If one wants to query a single graph, I always had the assumption that a > > Model.sparqlSelect( ... ) would always return only matches only coming from > this model - is thins incorrect? > > If so, it might be better to @Deprecate the query functions in the Model and > keep only the queries in ModelSet. > > Any opinions on this? > > (also: do you have opinions on adding a commit(); to Model and ModelSet?) > > > > Kind Regards, > Max > > -- > Max V?lkel office: +49 721 9654-854 > http://Xam.de mobile: +49 171 8359678 > > FZI Forschungszentrum Informatik http://www.FZI.de > an der Universit?t Karlsruhe telephone: +49-721-9654-0 > Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 > D-76131 Karlsruhe > > Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. > Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, > Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. > Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > - -- Gunnar Aastrand Grimnes gunnar.grimnes [AT] dfki.de DFKI GmbH Knowledge Management Trippstadter Strasse 122 D-67663 Kaiserslautern Germany Office: +49 631 205 75-117 Mobile: +49 177 277 4397 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGljxtfD15aMgAOfcRAq09AJ9za/Bu9u/+QAn/HrPHTMgo5hzzbgCg3DJI qanXykZVB19/Pq/di1uXvTY= =4t7N -----END PGP SIGNATURE----- From gunnar.grimnes at dfki.de Fri Jul 13 14:38:03 2007 From: gunnar.grimnes at dfki.de (Gunnar Aastrand Grimnes) Date: Fri, 13 Jul 2007 14:38:03 +0200 Subject: [Rdf2go-devel] SPARQL queries within a single model In-Reply-To: <4696296B.8060108@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> Message-ID: <4697722B.4080509@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > SELECT ... > WHERE { > GRAPH ?g1 { ?s1 ?p1 ?o1 } > GRAPH ?g2 { ?s2 ?p2 ?o2 } > GRAPH ?g3 { ?s3 ?p3 ?o3 } > } > > Though in practice, you will hardly ever have such a set of unrelated > statement patterns. At least, I haven't seen a lot of such queries, if > at all. I dont think this is true. In Nepomuk we will have many (>10000) named graphs, as each edit of a concept will use it's own context to be able to store provenance information (i.e. gunnar added label 'bob', on the 2/3/07, using the semantic wiki application). Therefore there is no guaranteeing that we dont have rdf:type in one graph, rdfs:label in another and all properties in a third. More importantly, there is no way to no at compile time what these graphs might be. I think any other non-trivial usage of named graphs will also quickly encounter queries where this is impractical. It is also strange to enforce the structure of the application data by strange decisions on the storage level. I would also guess that evaluating the above query is much much slower than just querying the whole quad-store. As one solution I would propose having a special reserved URI for querying the whole store, i.e. http://openrdf.org/sesame/__ALL__ or something. Although, I am sure that with the McCarthyish obsession of doing it RIGHT and PROPER in Aduna I am sure you will never accept this :) Cheers, - - Gunnar - -- Gunnar Aastrand Grimnes gunnar.grimnes [AT] dfki.de DFKI GmbH Knowledge Management Trippstadter Strasse 122 D-67663 Kaiserslautern Germany Office: +49 631 205 75-117 Mobile: +49 177 277 4397 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGl3IrfD15aMgAOfcRAqUDAKD5f6o6NE7ETcJBxoVGLZfKrNsHTACg37We fyFvl1fbRcPs1Cl+JoJNjDE= =17WH -----END PGP SIGNATURE----- From gunnar.grimnes at dfki.de Mon Jul 16 14:00:59 2007 From: gunnar.grimnes at dfki.de (Gunnar Aastrand Grimnes) Date: Mon, 16 Jul 2007 14:00:59 +0200 Subject: [Rdf2go-devel] [Sesame-devel] SPARQL queries within a single model In-Reply-To: <469B54F3.80906@aduna-software.com> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> <4697722B.4080509@dfki.de> <469B54F3.80906@aduna-software.com> Message-ID: <469B5DFB.80108@dfki.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I discussed this issue with some other people and they pointed out that being able to query the whole quad-store is also crucial when doing queries over ontologies in separate named graphs. If you have a few ontologies with tangled sub-class/sub-property relationships, and want to do queries that respect rdfs semantics, keeping track of what graphs to query for quickly gets impossible. Reverting to a single GRAPH clause for each triple pattern is of course possible, but hardly easy to write, not quick to evaluate. This might be a much more frequent use of named-graphs than the nepomuk specific scenario I used! Option 1 would seem like a good solution to me. It should also be easy to implement since the behaviour was already there before, or? Oh, and apologies again for my flippant comment at the end - it was meant to be funny. Cheers, - - Gunnar Herko ter Horst wrote: > Hello Gunnar, > >> I think any other non-trivial usage of named graphs will also quickly encounter >> queries where this is impractical. It is also strange to enforce the structure >> of the application data by strange decisions on the storage level. > > I agree that it is useful to be able to query the merged set of all > named graphs in a store. The SPARQL spec acknowledges this as well. It > discusses several use cases, one of which is having the default graph > contain the information from all named graphs. Another is having the > default graph contain just provenance information about named graphs (or > at least *not* to contain the information from all named graphs). > > The current SPARQL test cases assume the latter situation, which is why > we made it that behavior the default for now (note that this behavior is > only in SVN at the moment, the recent Beta 5 release still implements > the "all named graphs" behavior). > >> As one solution I would propose having a special reserved URI for querying the >> whole store, i.e. http://openrdf.org/sesame/__ALL__ or something. > > 1. We are currently discussing options to make the contents of the > "default graph" configurable at the repository level, i.e. statically > modify the default behavior of a repository. We'll have to evaluate > whether or not we can still fit this new feature in for the 2.0 release. > > 2. SPARQL already provides a way to query an explicitly specified > default graph (an RDF dataset). However, that mechanism does not allow > you to specify "all" named graphs. So we're also considering whether or > not it is possible to dynamically change the behavior of the default > graph (i.e. temporarily override the default behavior of the repository > for the current query) when no explicit default graph has been specified. > > Option 2 is the dynamic equivalent of option 1. Neither are > SPARQL-specific, both operate at the repository level. We're not sure > yet what the impact of option 2 might be, so we'll almost certainly > postpone this until after 2.0 final regardless of whether or not we're > going to implement option 1. > > Having a special reserved URI that provides this behavior by > representing a "virtual" graph is not good solution in my opinion, as it > violates RDF semantics: the same URI should not be used for logically > separate resources. It also introduces non-standard behavior and > additional complexity into the query evaluation mechanisms. > >> Although, I am >> sure that with the McCarthyish obsession of doing it RIGHT and PROPER in Aduna I >> am sure you will never accept this :) > > I'm not sure how this comment contributes to this discussion, so I'm > just going to ignore it. I'm not sure it's very helpful in getting > people to agree with you, though. > >> Cheers, >> >> - - Gunnar > > Cheers, > > Herko ter Horst > Senior Software Engineer - -- Gunnar Aastrand Grimnes gunnar.grimnes [AT] dfki.de DFKI GmbH Knowledge Management Trippstadter Strasse 122 D-67663 Kaiserslautern Germany Office: +49 631 205 75-117 Mobile: +49 177 277 4397 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGm137fD15aMgAOfcRApv9AJ0XX6k3z6XjQNpW/XooxZRg8Es5/gCeK2U/ RiG6zxazHtlfR8Q7fwRzlkY= =6TFR -----END PGP SIGNATURE----- From herko.ter.horst at aduna-software.com Mon Jul 16 13:22:27 2007 From: herko.ter.horst at aduna-software.com (Herko ter Horst) Date: Mon, 16 Jul 2007 13:22:27 +0200 Subject: [Rdf2go-devel] [Sesame-devel] SPARQL queries within a single model In-Reply-To: <4697722B.4080509@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> <4697722B.4080509@dfki.de> Message-ID: <469B54F3.80906@aduna-software.com> Hello Gunnar, > I think any other non-trivial usage of named graphs will also quickly encounter > queries where this is impractical. It is also strange to enforce the structure > of the application data by strange decisions on the storage level. I agree that it is useful to be able to query the merged set of all named graphs in a store. The SPARQL spec acknowledges this as well. It discusses several use cases, one of which is having the default graph contain the information from all named graphs. Another is having the default graph contain just provenance information about named graphs (or at least *not* to contain the information from all named graphs). The current SPARQL test cases assume the latter situation, which is why we made it that behavior the default for now (note that this behavior is only in SVN at the moment, the recent Beta 5 release still implements the "all named graphs" behavior). > As one solution I would propose having a special reserved URI for querying the > whole store, i.e. http://openrdf.org/sesame/__ALL__ or something. 1. We are currently discussing options to make the contents of the "default graph" configurable at the repository level, i.e. statically modify the default behavior of a repository. We'll have to evaluate whether or not we can still fit this new feature in for the 2.0 release. 2. SPARQL already provides a way to query an explicitly specified default graph (an RDF dataset). However, that mechanism does not allow you to specify "all" named graphs. So we're also considering whether or not it is possible to dynamically change the behavior of the default graph (i.e. temporarily override the default behavior of the repository for the current query) when no explicit default graph has been specified. Option 2 is the dynamic equivalent of option 1. Neither are SPARQL-specific, both operate at the repository level. We're not sure yet what the impact of option 2 might be, so we'll almost certainly postpone this until after 2.0 final regardless of whether or not we're going to implement option 1. Having a special reserved URI that provides this behavior by representing a "virtual" graph is not good solution in my opinion, as it violates RDF semantics: the same URI should not be used for logically separate resources. It also introduces non-standard behavior and additional complexity into the query evaluation mechanisms. > Although, I am > sure that with the McCarthyish obsession of doing it RIGHT and PROPER in Aduna I > am sure you will never accept this :) I'm not sure how this comment contributes to this discussion, so I'm just going to ignore it. I'm not sure it's very helpful in getting people to agree with you, though. > Cheers, > > - - Gunnar Cheers, Herko ter Horst Senior Software Engineer -- Aduna - Guided Exploration www.aduna-software.com Prinses Julianaplein 14-b 3817 CS Amersfoort The Netherlands +31-33-4659987 (office) From herko.ter.horst at aduna-software.com Mon Jul 16 14:25:50 2007 From: herko.ter.horst at aduna-software.com (Herko ter Horst) Date: Mon, 16 Jul 2007 14:25:50 +0200 Subject: [Rdf2go-devel] [Sesame-devel] SPARQL queries within a single model In-Reply-To: <469B5DFB.80108@dfki.de> References: <4694CB6F.10108@dfki.uni-kl.de> <4694EF69.1070200@aduna-software.com> <4694F056.10007@dfki.de> <469506C2.7060501@aduna-software.com> <46950A9D.8040003@dfki.de> <4696296B.8060108@aduna-software.com> <4697722B.4080509@dfki.de> <469B54F3.80906@aduna-software.com> <469B5DFB.80108@dfki.de> Message-ID: <469B63CE.9050503@aduna-software.com> Hello Gunnar, > Option 1 would seem like a good solution to me. It should also be easy to > implement since the behaviour was already there before, or? Not entirely: the default behavior is currently controlled by a property of the GraphPattern class in each query language. In SVN, the default for SPARQL has been changed to make it pass more tests. The SeRQL behavior has not changed. The change we're thinking about makes this behavior a property of the repository. This will make the behavior more easily configurable as well as consistent across query languages. However, this may not be a trivial change to implement, so we might have to to postpone it until after 2.0. If we decide not to implement this feature for Sesame 2.0 and no other solution presents itself, we'll probably just revert to the previous behavior and take a few more failed tests for granted. > Oh, and apologies again for my flippant comment at the end - it was meant to be > funny. NP, I read something that wasn't really there. > Cheers, > > - - Gunnar Cheers, Herko > Herko ter Horst wrote: >> Hello Gunnar, >> >>> I think any other non-trivial usage of named graphs will also quickly encounter >>> queries where this is impractical. It is also strange to enforce the structure >>> of the application data by strange decisions on the storage level. >> I agree that it is useful to be able to query the merged set of all >> named graphs in a store. The SPARQL spec acknowledges this as well. It >> discusses several use cases, one of which is having the default graph >> contain the information from all named graphs. Another is having the >> default graph contain just provenance information about named graphs (or >> at least *not* to contain the information from all named graphs). >> >> The current SPARQL test cases assume the latter situation, which is why >> we made it that behavior the default for now (note that this behavior is >> only in SVN at the moment, the recent Beta 5 release still implements >> the "all named graphs" behavior). >> >>> As one solution I would propose having a special reserved URI for querying the >>> whole store, i.e. http://openrdf.org/sesame/__ALL__ or something. >> 1. We are currently discussing options to make the contents of the >> "default graph" configurable at the repository level, i.e. statically >> modify the default behavior of a repository. We'll have to evaluate >> whether or not we can still fit this new feature in for the 2.0 release. >> >> 2. SPARQL already provides a way to query an explicitly specified >> default graph (an RDF dataset). However, that mechanism does not allow >> you to specify "all" named graphs. So we're also considering whether or >> not it is possible to dynamically change the behavior of the default >> graph (i.e. temporarily override the default behavior of the repository >> for the current query) when no explicit default graph has been specified. >> >> Option 2 is the dynamic equivalent of option 1. Neither are >> SPARQL-specific, both operate at the repository level. We're not sure >> yet what the impact of option 2 might be, so we'll almost certainly >> postpone this until after 2.0 final regardless of whether or not we're >> going to implement option 1. >> >> Having a special reserved URI that provides this behavior by >> representing a "virtual" graph is not good solution in my opinion, as it >> violates RDF semantics: the same URI should not be used for logically >> separate resources. It also introduces non-standard behavior and >> additional complexity into the query evaluation mechanisms. >> >>> Although, I am >>> sure that with the McCarthyish obsession of doing it RIGHT and PROPER in Aduna I >>> am sure you will never accept this :) >> I'm not sure how this comment contributes to this discussion, so I'm >> just going to ignore it. I'm not sure it's very helpful in getting >> people to agree with you, though. >> >>> Cheers, >>> >>> - - Gunnar >> Cheers, >> >> Herko ter Horst >> Senior Software Engineer > > > - -- > Gunnar Aastrand Grimnes > gunnar.grimnes [AT] dfki.de > > DFKI GmbH > Knowledge Management > Trippstadter Strasse 122 > D-67663 Kaiserslautern > Germany > > Office: +49 631 205 75-117 > Mobile: +49 177 277 4397 > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGm137fD15aMgAOfcRApv9AJ0XX6k3z6XjQNpW/XooxZRg8Es5/gCeK2U/ > RiG6zxazHtlfR8Q7fwRzlkY= > =6TFR > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Sesame-devel mailing list > Sesame-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sesame-devel From antoni.mylka at dfki.uni-kl.de Wed Jul 18 17:22:23 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Wed, 18 Jul 2007 17:22:23 +0200 Subject: [Rdf2go-devel] RDF2Go Activator Bug Message-ID: <469E302F.50008@dfki.uni-kl.de> Snippet from the activator. defaultFactoryClassName = context.getProperty(DEFAULTMODELFACTORY_CFG); if (defaultFactoryClassName == null) { log.warning( "RDF2Go cannot find configuration value for default RDF2Go factory. " + "No Default ModelFactory will be available. Please set " + DEFAULTMODELFACTORY_CFG); return; } Please remove the 'return'. Antoni Mylka antoni.mylka at dfki.de From antoni.mylka at dfki.uni-kl.de Wed Jul 18 18:00:53 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Wed, 18 Jul 2007 18:00:53 +0200 Subject: [Rdf2go-devel] RDF2Go Activator Bug Message-ID: <469E3935.8050902@dfki.uni-kl.de> Snippet from the activator. defaultFactoryClassName = context.getProperty(DEFAULTMODELFACTORY_CFG); if (defaultFactoryClassName == null) { log.warning( "RDF2Go cannot find configuration value for default RDF2Go factory. " + "No Default ModelFactory will be available. Please set " + DEFAULTMODELFACTORY_CFG); return; } Please remove the 'return'. Antoni Mylka antoni.mylka at dfki.de From voelkel at fzi.de Wed Jul 18 20:14:57 2007 From: voelkel at fzi.de (Max Voelkel) Date: Wed, 18 Jul 2007 20:14:57 +0200 Subject: [Rdf2go-devel] RDF2Go Activator Bug In-Reply-To: <469E302F.50008@dfki.uni-kl.de> References: <469E302F.50008@dfki.uni-kl.de> Message-ID: <967222896.20070718201457@fzi.de> Hi Antoni, A> Snippet from the activator. A> defaultFactoryClassName = context.getProperty(DEFAULTMODELFACTORY_CFG); A> if (defaultFactoryClassName == null) A> { A> log.warning( A> "RDF2Go cannot find configuration value for default RDF2Go factory. " + A> "No Default ModelFactory will be available. Please set " + A> DEFAULTMODELFACTORY_CFG); A> return; A> } A> Please remove the 'return'. I filed this as a bug [1], resolved it (as you told me), released a new jar [2]. [1] http://141.21.8.123:8080/browse/RTGO-4 (we have DNS issued with our servers) [2] http://semweb4j.org/site/rdf2go/download.html Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From leo.sauermann at dfki.de Fri Jul 27 18:09:53 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Fri, 27 Jul 2007 18:09:53 +0200 Subject: [Rdf2go-devel] rdf2go and open connections - the evil thing Message-ID: <46AA18D1.7090300@dfki.de> Hi nepomuk + rdf2go, We use rdf2go in Nepomuk quite intensive, and now reach a certain barrier: connection handling and multithreading. The problem is, when you have a bigger application and pass ModelSets around. One service "Manager" may manage the ModelSet, many services access and use it. Underneath is a Jena or Sesame model, kept hidden by hte Manager. The "Service" then call something like Manager.getModelSet() and work happily on the model. - all services share the same modelset instance - what if the model is open or not? should the services open/close it? At the moment, we are doomed, because what happens is this: // there is only one instance of modelset, wrapping the database Manager.getModelSet() { if (modelset==null) modelset = ModelFactory......doyourthing; return modelset; } // Service get it and do things: Service.doThing() { ms = Manager.getModelSet(); boolean wasopen = ms.isOpen(); if (!wasopen) ms.open; try { ms.........dothethingthatclientsusuallydo ms....do another thing that takes 20 seconds ms.... is the modelset still open or did somebody else close it? who knows.... } finally { if (!wasopen) ms.close; } } Even trickier is this: myModel = Manager.getModelSet().getModel(x); // hm, was the modelset open? // is myModel open now? don't know, lets open it myModel.open() // What if somebody else already asked for x and the ModelSet buffered the Model instance for x, and returned the same instance twice. or what if I ask again.... myModel = Manager.getModelSet().getModel(x); // what do I get now? is it open or closed? myModel.isOpen() .... pretty undecideable now. myModel.open(); myModel.add().... myModel.close(); // ok, did the first model now also close? etc etc. As you can easily see, this happy opening/closing of the modelset can cause havoc, if two clients use the same modelset and run in parallel. But they don't even have to run parallel, i can imagine this is tricky in any environment. three solutions came to my mind: * establish a best practice recommendation: all modelsets have to be open all the time and have to be left open once opened, if someone else wants to access them in the future. This would also include the simple rule: calling ModelSet.getModel(x) will return an open model, if the modelset was already open. (it should fail anyway if the modelset was not open). Also, this would possibly include that closing the ModelSet will automatically close all models returned by getModel() But this may cause deadlocks and dangling connectsions on shutdown (it is not possible for a graceful shutdown then), because of sesame2 connection policy. but its good when ModelSet.close() will surely close all models returned by this ModelSet, that is probably quite handy when shutting down an application. * creating new ModelSets everytime clients call Manager.getModelSet(), so that every service runs on a different modelset. but that will render the ModelSetListener useless (it cannot listen to updates) and create many modelsets. * create some kind of "session" from a ModelSet, like Sesame2 or JDBC does: ModelSetSession s = ModelSet.open(); s.doyourthing. s.close(); but that would destroy the simplicity and benefit of RDF2Go. this opens an independent problem: closing a modelset - will it close models returned by ModelSet.getModel() ? I see no best practice or solution for this problem, so I would need feedback, could we write results on a wiki page? Max - could you create a FAQ for rdf2go, or is there one? Note that this problem sucks, because its so fundamental to writing code. It will not go away by itself once Rdf2go is wider deployed. We should come up with some best practices now. best Leo my favorite is the last solution "keep it open", because it says: once you get the modelset, leave it open. that wouldnt change too much code here. and its simple, rdf2go should stay simple. -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From leo.sauermann at dfki.de Mon Jul 30 12:54:34 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 30 Jul 2007 12:54:34 +0200 Subject: [Rdf2go-devel] [Fwd: RDF2Go: Update] feedback about website Message-ID: <46ADC36A.2020202@dfki.de> Hi RDF2Go, I pointed an experienced programmer (Axel Rauschmayer) to RDF2Go, and he started using it. He noticed some possible improvements for the website, which I want to share with you guys, who would do such improvements? (its german, but most rdf2go devels speak a little german anyway) should I? :-/ -------- Original-Nachricht -------- Betreff: RDF2Go: Update Datum: Sat, 28 Jul 2007 17:55:11 +0200 Erster Eindruck: Doku und Design sind wirklich OK; ... Verbesserungsideen: - Die Eingangsseite kann eine h?here Schachtelungstiefe der Sektionen vertragen, momentan wirkt es etwas un?bersichtlich. - "See Also": Wohin f?hren diese Links? Entweder annotieren, verschieben oder l?schen, um den Information-Overload f?r Neulinge zu reduzieren. - QuickStart: Das Code-Snippet unter "Developer Workflow" ist nett, aber beim Download verwirrt die Vielzahl der JARs. Da w?nscht man sich als Einsteiger einen kurzen Hinweis, was man denn alles herunterladen soll. Sprich: Braucht man wirklich alles in rdf2go.dist-4.4.6.zip? - Evtl. liegt es daran, dass Jena + RDF2Go momentan sehr eng verbandelt sind (die Dist-JARs werden vermutlich von Jena ben?tigt). Eine Entkoppelung kann hier mehr Klarheit schaffen. - Sesame-Adapter: Hier w?re es nett, wenn man den auch gleich irgendwo (als JAR) herunterladen k?nnte. Ich habe mir aus Aperture folgende JARs geklaut. > org.openrdf.rdf2go-4.4.1.2682.jar > openrdf-sesame-2.0-beta4-onejar.jar > rdf2go-4.4.1.jar > rdf2go-impl-base-4.4.1.jar ... -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070730/7050bec9/attachment.html From fabio.mancinelli at xwiki.com Fri Jul 27 18:41:24 2007 From: fabio.mancinelli at xwiki.com (Fabio Mancinelli) Date: Fri, 27 Jul 2007 18:41:24 +0200 Subject: [Rdf2go-devel] [cop-implementation] rdf2go and open connections - the evil thing In-Reply-To: <46AA18D1.7090300@dfki.de> References: <46AA18D1.7090300@dfki.de> Message-ID: On Jul 27, 2007, at 6:09 PM, Leo Sauermann wrote: > Hi nepomuk + rdf2go, > > We use rdf2go in Nepomuk quite intensive, and now reach a certain > barrier: connection handling and multithreading. > Dear Leo, I have noticed this problem some times ago, because it was not clear to me when to open/close models... Often I got a "null connection" exception, so I started opening every model I get, and I was wondering what could have happened if that model was already open... Anyway it could be useful to look at the reference counting technique, and establishing a policy on how to handle open/close calls. Basically each open call will do a +1 on a counter and each close call will do a -1. A model is actually open when the counter passed from 0 to 1 and closed when the counter goes from 1 to 0. An usage policy and good documentation should do the rest. This approach is used in the Mac OS X Cocoa framework, though it concerns memory allocation. The policy is described here: http://developer.apple.com/ documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/ MemoryManagementRules.html Then they have this special AutoreleasePools in order to handle special cases like factory methods, where you cannot call "release" on the created object before returning (otherwise it would be destroyed), but cannot call it after returning as well because you loose the reference to it. I don't know if this is applicable to open/close operations but maybe there should be enough similarities and ideas to provide a solution to the problem Hope this helps. Cheers, Fabio From kiesel at dfki.uni-kl.de Mon Jul 30 11:21:44 2007 From: kiesel at dfki.uni-kl.de (Malte Kiesel) Date: Mon, 30 Jul 2007 11:21:44 +0200 Subject: [Rdf2go-devel] [cop-implementation] rdf2go and open connections - the evil thing In-Reply-To: <46AA18D1.7090300@dfki.de> References: <46AA18D1.7090300@dfki.de> Message-ID: <46ADADA8.3040501@dfki.uni-kl.de> Leo Sauermann wrote: > We use rdf2go in Nepomuk quite intensive, and now reach a certain > barrier: connection handling and multithreading. Concerning multithreading, wouldn't be simply synchronizing on the respective ModelSet be possible? synchronized(myModelSet) { doSomething_with_myModelSet; } It's not high-tech but simple to handle plus you don't need to learn some library-specific locking mechanism (I doubt a generic locking framework that has benefits over the simple synchronized solution can be created for both Jena and Sesame anyways). Regards Malte -- Malte Kiesel DFKI GmbH http://www.dfki.de/~kiesel/ From leo.sauermann at dfki.de Mon Jul 30 15:12:20 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 30 Jul 2007 15:12:20 +0200 Subject: [Rdf2go-devel] [cop-implementation] rdf2go and open connections - the evil thing In-Reply-To: <46ADADA8.3040501@dfki.uni-kl.de> References: <46AA18D1.7090300@dfki.de> <46ADADA8.3040501@dfki.uni-kl.de> Message-ID: <46ADE3B4.10302@dfki.de> I would copy that: * use standards whereever possible, and Javas synchronization implementation is fine enough. this is ok with me: synchronized(myModelSet) { doSomething_with_myModelSet; } leaves open the open/close question (its unrelated to synchronization, we still need best practice if open/close should be called within every method or not) fabios suggestion of usage count is also ok, but I am not sure it solves the problem. deciding on usage count would mean, that everyone calls open/try...finally/close in every method. (borland delphi has many objects based on this, I am used to it) more ideas? a wikipage where we could IBAW? best Leo It was Malte Kiesel who said at the right time 30.07.2007 11:21 the following words: > Leo Sauermann wrote: > > >> We use rdf2go in Nepomuk quite intensive, and now reach a certain >> barrier: connection handling and multithreading. >> > > Concerning multithreading, wouldn't be simply synchronizing on the > respective ModelSet be possible? > > synchronized(myModelSet) { > doSomething_with_myModelSet; > } > > It's not high-tech but simple to handle plus you don't need to learn > some library-specific locking mechanism (I doubt a generic locking > framework that has benefits over the simple synchronized solution can be > created for both Jena and Sesame anyways). > > Regards > Malte > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070730/c50606ba/attachment.html From antoni.mylka at dfki.uni-kl.de Mon Jul 30 15:52:19 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Mon, 30 Jul 2007 15:52:19 +0200 Subject: [Rdf2go-devel] xsd:duration in RDF2Go Message-ID: <46ADED13.3070002@dfki.uni-kl.de> The xsd:duration datatype is widely criticized within the RDF community. It has a poorly defined value space where no order relation is defined. The RDF Semantics document [1] discourages from using it. The same has been repeated by the authors of OWL Time ontology [2] and the Semantic Web Best Practices group [3]. SWBP proposes (in [3]) to use two subtypes of xsd:duration defined in the XQuery and XPath recommendations [4] namely: - xsd:yearMonthDuration [5] - xsd:dayTimeDuration [6] Therefore I ask to include these two types in the XSD vocabulary class. Antoni Mylka antoni.mylka at dfki.de [1] http://www.w3.org/TR/rdf-mt/#dtype_interp [2] http://www.w3.org/TR/owl-time/#general [3] http://www.w3.org/TR/swbp-xsch-datatypes/#section-duration [4] http://www.w3.org/TR/xpath-functions/ [5] http://www.w3.org/TR/xpath-functions/#dt-yearMonthDuration [6] http://www.w3.org/TR/xpath-functions/#dt-dayTimeDuration From voelkel at fzi.de Mon Jul 30 17:05:07 2007 From: voelkel at fzi.de (Max Voelkel) Date: Mon, 30 Jul 2007 17:05:07 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close In-Reply-To: <46ADE3B4.10302@dfki.de> References: <46AA18D1.7090300@dfki.de> <46ADADA8.3040501@dfki.uni-kl.de> <46ADE3B4.10302@dfki.de> Message-ID: <724900392.20070730170507@fzi.de> L> more ideas? L> a wikipage where we could IBAW? L> best L> Leo if we have to discuss and want to reach agreements, lets discuss in the RDF2Go OntoWorld talk page [1]. We can use the IBAW-methodology [2] as leo suggested, to see the different arguments and alternatives clearer. I reformatted leos mail accordingly at [3]. The analysis shows quite clearly hat Sesame 2 connection handling is an issue. The open/close thing came in to hanlde Sesames open/close, Jena does not have this notion. We should learn more about how it works and why it works the way it works. @Aduna: Why is there open/close and how should it be used? I filed [4] for that. [1] http://ontoworld.org/wiki/Talk:RDF2Go [2] http://xam.de/2006/02-ibaw.html [3] http://ontoworld.org/wiki/Talk:RDF2Go#Open.2FClose [4] http://www.openrdf.org/issues/browse/SES-436 Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From voelkel at fzi.de Mon Jul 30 17:40:39 2007 From: voelkel at fzi.de (Max Voelkel) Date: Mon, 30 Jul 2007 17:40:39 +0200 Subject: [Rdf2go-devel] feedback about website In-Reply-To: <46ADC36A.2020202@dfki.de> References: <46ADC36A.2020202@dfki.de> Message-ID: <249798421.20070730174039@fzi.de> L> I pointed an experienced programmer (Axel Rauschmayer) to RDF2Go, and he L> started using it. L> He noticed some possible improvements for the website, which I want to L> share with you guys, who would do such improvements? Hi, I updated the website according to feedback from Axel. Open issues: How to link to a Sesame-RDF2Go jar - there has not been an official release for a long time :-) Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From christiaan.fluit at aduna-software.com Mon Jul 30 18:31:16 2007 From: christiaan.fluit at aduna-software.com (Christiaan Fluit) Date: Mon, 30 Jul 2007 18:31:16 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close In-Reply-To: <724900392.20070730170507@fzi.de> References: <46AA18D1.7090300@dfki.de> <46ADADA8.3040501@dfki.uni-kl.de> <46ADE3B4.10302@dfki.de> <724900392.20070730170507@fzi.de> Message-ID: <46AE1254.702@aduna-software.com> Max Voelkel wrote: > The analysis shows quite clearly hat Sesame 2 connection handling is an issue. > The open/close thing came in to hanlde Sesames open/close, Jena does not have > this notion. > > We should learn more about how it works and why it works the way it works. > > @Aduna: Why is there open/close and how should it be used? Arjohn (who is also on this list, but cc-ing to be sure) is currently on holiday leave and this question is really best answered by him. Nevertheless, I'll give it a try :) My guess is that he modeled this after the JDBC APIs, which are used in some of the SAIL implementations. The reason why this was done is probably the same as why you added it to RDF2Go. Rather than adding open() and close() to the RDF2Go API, you could also have considered this an "internal issue" for the RDF2Go driver to solve. I expect that this is much harder to implement (and keep it reliable and scalable) than when Model(Set) are explicitly told when to open and close stuff. Exactly the same problem occurs when creating a Sesame SAIL implementation operating on top of a database or some other information system with a non-negligible initialization overhead. My guess is that that is the main reason why Sesame also has open and close methods. I wonder whether your life would get easier if you get rid of the open method (meaning for the openrdf driver that connections are always opened after creation) and keep the close method (perhaps better renamed to dispose). Is there a use case where you create a Model that you don't open immediately afterwards? Regards, Chris -- From leo.sauermann at dfki.de Mon Jul 30 18:52:55 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 30 Jul 2007 18:52:55 +0200 Subject: [Rdf2go-devel] feedback about website In-Reply-To: <249798421.20070730174039@fzi.de> References: <46ADC36A.2020202@dfki.de> <249798421.20070730174039@fzi.de> Message-ID: <46AE1767.8080707@dfki.de> It was Max Voelkel who said at the right time 30.07.2007 17:40 the following words: > L> I pointed an experienced programmer (Axel Rauschmayer) to RDF2Go, and he > L> started using it. > > L> He noticed some possible improvements for the website, which I want to > L> share with you guys, who would do such improvements? > > Hi, I updated the website according to feedback from Axel. > > Open issues: How to link to a Sesame-RDF2Go jar - there has not been an official > release for a long time :-) > boink. well, before you make the next release of rdf2go, we can coordinate all this a little beforehand. I would suggest we then release a suiting sesame2-beta JAR and a Sesame-RDF2Go at the same time. I would not do much now, too much hassle when is the next release of rdf2go scheduled ? (if no schedule, lets say: 28th september, a randomly generated date using the proven mywifesbirthday-1 algorithm) best Leo > Kind Regards, > > Max > -- > Max V?lkel office: +49 721 9654-854 > http://Xam.de mobile: +49 171 8359678 > > FZI Forschungszentrum Informatik http://www.FZI.de > an der Universit?t Karlsruhe telephone: +49-721-9654-0 > Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 > D-76131 Karlsruhe > > Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. > Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, > Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. > Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________