Recommended way to access Stardog from Java

When I started using Stardog I went to the docs to see what the recommended way to use it from Java was. It said to get the libraries via Maven.

Herein, when I use Stardog from my Java application I used to set a specific Stardog version in Maven. When a new Stardog version was released, I dowloaded and installed the new version, got a new licence, updated the version in Maven and recompiled the whole application.

This was not efficient at all, since I had to recompile my whole application to update the Stardog libraries via Maven. What is the recommended way to access Stardog from an application so the application does not have to be recompiled at every new version? Is it the REST API? If so, is there any performance penalty compared to the use of the Java libraries directly?

Thanks

We currently don't publish a matrix of compatibility between client and server versions. In general, the client is compatible within a major release cycle, so having to always update the client jars from a minor dot release can be avoided if you don't have the opportunity to easily rebuild and test your application. However, you should still run a test cycle with your application and upgraded server to confirm no incompatibilities in your particular usage.

The one caveat here is that as new features get added throughout releases, the older client may not support it. Most of the time, this will be more in the administrative area, and if your application runs queries to pull data - that changes much less often. For example, the recent enhancements to additional search parameters in SPARQL wouldn't require a client upgrade if you were just sending SPARQL. Along similar lines, there are many customers who are on a particular version of Apache Jena or RDF4J as their client bindings, as those libraries are focused on sending queries.

The thing is that, in the past, when I updated a version I had to recompile everything. And I do not know now, but you were very active in the past. So 4.0.5, 4.2, 5.0, 5.0.1, 5.0.3, 5.22, 5.3.0, 5.3.5, 6.1.2, 7.... They all required JAR updates. Even between 5.0.1 and 5.0.3 afair I had problems running the application because it was not the same version. And having to accommodate my own "releases" to the Stardog releases is not quite right.

Normally I do not call any management feature from Java, I only submit SPARQL queries to read or write. And I assume that any new feature cannot be used if the libraries are not updated, but this is OK for me, as I would not be forced - I could decide when I need the features and when I want to update the Java application.

So, in this case, what is the best solution to have my own application updates as I need or wish to update it, independently from Stardog?

I am not sure if you suggest that I could use Jena to query Stardog, I was not sure this was an option but I was always concern about performance.

For what it is worth, we have been using Jena to access Stardog for many years now, only the major version ( 4 / 5 / 6 / 7 ) needed a full recompile, as well as the times when jena levels were upgraded.
The system is used in time critical applications where we have had no performance impacts. Even the Jena RDF4J bridge has not bothered us.

Other then that we had no issue with cross compatibility, e.g. we have some applications compiled at the 7.2 level which access the 7.6.4 server without issues.

Hope this helps

Thanks for your insight.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.