Closed no-reply closed 8 years ago
:+1:
This could be added as a --server option to bin/sparql easily enough; There is a test application in spec/sinatra_spec.rb, which could easily serve as the basis of this.
@gkellogg That would work, although conceptually it might be somewhat clearer if the sparql
binary were to operate in a subcommand manner, such as:
sparql parse query.rq
sparql execute query.rq data.ttl
sparql server http://localhost:8080/sparql data.ttl
sparql query http://localhost:8080/sparql query.rq
This would make it an indispensable Swiss army knife of sorts for all SPARQL users. What do you think?
That would be fine. I'm a bit tied up for now, so feel free to tackle this if you have the time.
@bendiken: I got a start on it. The Rack/Sinatra stuff is commented out, as I need to figure more about provisioning from a ruby file. I also added (but didn't test) querying a remote endoint with sparql-client.
@gkellogg Looks good, will give you some feedback tomorrow once I sort out my currently-broken Ruby install...
Where something like
sparql-server -p 8080 myfile.ttl
andsparql-server -p 8081 http://example.org/myfile.ttl
work to start a SPARQL server with named graph support, POST/direct-POST queries, etc...