Question: According to [the GraphDB documentation](http://graphdb.ontotext.com/documentation/free/using-graphdb-with-the-sesame-api.html), it is possible to program against its underlying RDF4J database directly. It goes against my intuition that the same database files can concurrently be accessed by two separate applications. Is this handled correctly, including concurrent writes?

I believe GraphDB uses an older Sesame 2.9 version. Has the file format changed with the latest RDF4J 2.1 version? Or do I need to use this older Sesame version instead?

I assume, if all the above is correct, that there is a big performance bonus compared with HTTP connectivity. Are there any test results available to back this?

Answer: 
I think there is a bit of confusion here. GraphDB does not have an "underlying RDF4J/Sesame database". It's actually the other way around: RDF4J/Sesame provides a standardized Java access API for RDF databases, and GraphDB is an implementation of this API. 

You can programmatically access a GraphDB store using the Sesame APIs, as explained in the GraphDB Documentation. Sesame provides ways to access a local database (embedded in your own application) or a remote database (accessible via HTTP). As you correctly surmised, you can not access a database locally with multiple applications - if more than one application needs access, you should have both applications access the database via HTTP (or have one application talk directly to the other application, but that requires a lot of custom coding). 

As for Sesame 2.9 vs RDF4J, as @ChristophE correctly pointed out, there are some differences (see the [migration guide](http://docs.rdf4j.org/migration) for details), so your version of GraphDB probably will not yet work with RDF4J. However the next upcoming release of GraphDB will have support for RDF4J. 

As for performance: naturally, communication over HTTP incurs a performance penalty when compared to direct access. I don't have exact figures for you, I'm afraid. However both Sesame/RDF4J itself, as well as GraphdB, have been engineered to minimize this penalty as much as possible, so it's not *quite* as bad as you might think.
> 
> I believe GraphDB uses an older Sesame 2.9 version. Has the file
>  format changed with the latest RDF4J 2.1 version? Or do I need to use
>  this older Sesame version instead?
> 
> 
> 

Sesame 2.9 still uses Java 7, Sesame 4 and RDF4J use Java 8

The file format did not change but the programming API changed quite a bit between Sesame2 and 4 so if GraphDB really uses sesame 2.9 than you need to use the same version.

for more info see also <http://docs.rdf4j.org/migration/>