1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #484 (closed enhancement: fixed)

Opened 15 months ago

Last modified 14 months ago

Java client for NanoSparqlServer REST API

Reported by: thompsonbry Owned by: mrpersonick
Priority: critical Milestone:
Component: Bigdata SAIL Version: BIGDATA_RELEASE_1_1_0
Keywords: Cc: thompsonbry, mrpersonick

Description (last modified by thompsonbry) (diff)

Implement a Java client for the NanoSparqlServer? REST API.

A variety of people have expressed an interest in a BigdataRepositoryConnection? implementation which can be used to access a remote standalone database instance. People are used to this pattern with the openrdf platform and the HttpRepositoryConnection?.

The BigdataSail? and BigdataRepository? both have additional methods which are necessary for high performance, especially the getReadOnlyConnection() method. There are also extension methods for reporting the timestamp associated with a commit point and managing certain aspects of truth maintenance. Appropriate interfaces will need to be declared for these methods and an alternative implementation of those interfaces derived for the NSS REST API.

There is no requirement for this when embedding bigdata inside of the same JVM. You simply use the BigdataSail? and wrap it as a BigdataRepository?.

There is little requirement for this in scale-out as any node in a cluster can obtain a JiniClient?, connect to the BigdataFederation?, and resolve the desired triple or quad store, and wrap that AbstractTripleStore? as a BigdataSail?.

Change History

Changed 15 months ago by mrpersonick

  • status changed from new to accepted

Changed 15 months ago by thompsonbry

Mike,

Let's to this from scratch. I can help to extract the HTTP request support out of the NSS test suite and provide the project level support for a separate module and JAR.

Bryan

Changed 15 months ago by thompsonbry

  • summary changed from BigdataSailRepository for NanoSparqlServer REST API to Java client for NanoSparqlServer REST API

Changed 15 months ago by thompsonbry

  • description modified (diff)

Changed 15 months ago by thompsonbry

  • priority changed from major to critical

Changed 15 months ago by thompsonbry

MikeP wrote: I've just committed a first pass of the RemoteRepository? (aka the NanoSparqlClient?). Please refer to TestNanoSparqlClient? for guidance on how to use it. The only glaring hole right now is the ability to do an update operation that takes a collection of statements on the remove side. The pattern for update on the NSS is delete by query plus a post of statements to add. You can specify specific statements to delete by using a construct query with no where clause:

prefix bd: <http://bigdata.com/rdf#> construct { bd:Mike bd:likes bd:RDF } {}

But I haven't written a utility yet to automatically build these construct queries from a collection of statements.

Changed 15 months ago by thompsonbry

The above is in Commit Revision r6123 of the 1.1.x maintenance branch.

Changed 14 months ago by thompsonbry

Mike wrote: changing from java.net to httpcomponents.

Bryan wrote: I have committed some fixes to build.properties and build.xml in order to fix CI, which was broken by the new http components dependencies.

We should run the NSS test suite against the WAR. Also the SPARQL 1.0, 1.1, UPDATE, Federated Query, etc. test suites. We need that to verify the WAR distribution. E.g., whether the http components dependencies are making it into the WAR such that Federated Query will work.

Committed revision r6144.

Changed 14 months ago by thompsonbry

Ok. CI is running cleanly now against the new dependencies.

Changed 14 months ago by thompsonbry

  • status changed from accepted to closed
  • resolution set to fixed

Changed 14 months ago by thompsonbry

RemoteRepository? now uses a shared connection manager by default and will use the caller's connection manager if you use the appropriate constructor.

I am going to change the prepareTuple and prepareGraph operations to do incremental materialization of the results. This will be an API change for the latter (GraphQueryResult? versus Graph).

Committed revision r6171

Changed 14 months ago by thompsonbry

Modified the RemoteRepository? to use an pattern for the connect options which can be overridden.

Integrated access to the ClientConnectionManager? into the QueryEngine?. The ClientConnectionManager? is lazily obtained from a factory and is shutdown() when the QueryEngine? is shutdown.

Refactored the RemoteServiceCallImpl? to use the RemoteRepository?, which is now backed by the http components package. This required a change in the ServiceRegistry? API.

The RemoteRepository? now uses more sophisticated defaults for the Accept header. There is a new class to support this (AcceptHeaderFactory?).

Committed revision r6195.

Changed 14 months ago by thompsonbry

Changed how we handle the configuration of the ClientConnectionManager? and removed all of the RemoteRepository? constructors except the one in which the caller specifies both the ClientConnectionManager? and the Executor. These resources MUST be explicitly managed. Bigdata does that internally by hanging them off of the QueryEngine? and the IIndexManager respectively. Remote applications need to provide their own management for those resources.

Changed the ServiceFactory#create?() method, replacing the parameters with an interface to make furture versioning of this information painless. Added access to the ClientConnectionManager? and the IServiceOptions so these are now both available to the ServiceCall? (assuming that the ServiceFactory? implementation passes them through).

Committed revision r6208.

Note: See TracTickets for help on using tickets.