0

I have been running an Apache Jean Fuseki with a closed port for a while. At present my other apps can access this via localhost.

Following their instructions I start this service as follows:

./fuseki-server --update --mem /ds

This create and updatable in memory database.

The only way I currently know how to add data to this database is using the built-in http request tools:

./s-post http://localhost:3030/ds/data

This works great except now I want to expose this port so that other people can query the dataset. However, I don't want to allow people to update or change the database, I just want them to be able to use and query the information I originally loaded into the data base.

According to the documentation (http://jena.apache.org/documentation/serving_data/), I can make the database read-only by starting it without the update option.

Data can be updated without access control if the server is started with the --update argument. If started without that argument, data is read-only.

But when I start the database this way, I am no longer able to populate with the initial dataset.

So, MY QUESTION: How I start an in-memory Fuseki database which I can populate with my original dataset but then disallow further http updates.

(My guess is that I need another method to populate the Fueseki database that is not using the http protocol. But I'm not sure)

4

1 回答 1

1

Some options:

Here are some options:

1/ Use TDB tools to build a database offline and then start the server read only on that TDB database.

2/ Like (1) but use --update to build a persistent database, then stop the server, and restart without --update. The database is now read only. --update affects the services available and does not affect the data in any other way.

Having a persistent database has the huge advantage that you can start and stop the server without needing to reload data.

3/ Use a web server to pass through query requests to the fuseki server and limit the Fuseki server to talk to only localhost. You can update from the local machine, external people can't.

4/ Use Fuseki2 and adjust the security settings to allow update only from localhost but query from anywhere.

What you can't do is update a TDB database currently being served by Fuseki.

于 2015-03-24T10:45:42.430 回答