You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/07/03 11:20:58 UTC

[GitHub] [jena] namedgraph edited a comment on pull request #759: JENA-1917: FileManager as interface; Deprecate FileManager.get()

namedgraph edited a comment on pull request #759:
URL: https://github.com/apache/jena/pull/759#issuecomment-653479384


   ### Requirements
   Provide (retain) Java interfaces for HTTP-based RDF specifications (Linked Data, SPARQL Protocol, Graph Store Protocol) that satisfy the REST [Uniform Interface constraint](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_1_5), i.e. that the interface on both the client and server side should be the same.
   
   That makes implementation of components such as proxies trivial:
   
       class GSPProxyServer implements DatasetAccessor
       {
   
           public Response get()
           {
               return getBackend().getClient().get();
           }
   
           public Response post(Model model)
           {
               return getBackend().getClient().post(model);
           }
   
           ...
   
       }
       
       class GraphStoreClient implements DatasetAccessor
       {
           public Response get()
           {
               return ClientBuilder.newClient().target(getURI())....get();
           }
   
           ...
       }
   
   Server- or client-specific interfaces can naturally extend the uniform interfaces.
   It should work with `StreamRDF` as well.
   
   ### Compatibility
   IMO a great strategic advantage would be making these interfaces JAX-RS compatible. `javax.ws.rs-api` is used by almost 2500 artifacts according to Maven central.
   Jena does not need to depend on Jersey or another JAX-RS implementation, it should be possible to depend on the [javax.ws.rs-api](https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api) only.
   A weaker compatibility would be reusing the JAX-RS API under Jena's namespace, making it a drop-in replacement.
   
   ### Prior work
   This approach is implemented in [AtomGraph Core](https://github.com/AtomGraph/Core). We are willing to contribute its code - it is Apache-licensed already.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org