Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use Fuseki as a database, and use JAVA API to update? #1243

Closed
chenkuncloud opened this issue Mar 31, 2022 · 9 comments
Closed

How can I use Fuseki as a database, and use JAVA API to update? #1243

chenkuncloud opened this issue Mar 31, 2022 · 9 comments

Comments

@chenkuncloud
Copy link

Hi,

Can Fuseki be used with Jena - Model ? Similar to Virtuoso - VirtGraph :

VirtGraph graph = new VirtGraph("xxx/sparql", "jdbc:virtuoso://xxx:1111", "dba", "xxx");
VirtModel model = new VirtModel(graph);
model.add(...);

Not by writing SPARQL - INSERT/DELETE :

INSERT DATA {
	<xxx> <xxx> <xxx> .
	<xxx> <xxx> <xxx> .
}

I find it more convenient than SPARQL, such as Model.createTypedLiteral, without requiring me to specify a specific type .
I know Jena & TDB & Fuseki . I read Apache Jena Fuseki , but I didn't find the API I wanted .

Best Regards

@ajs6f
Copy link
Member

ajs6f commented Mar 31, 2022

If I understand your question correctly, the answer is no. "Apache Jena Fuseki is a SPARQL server", as the first sentence in the documentation you linked says. Its entire purpose is to support SPARQL and related services over HTTP. You can certainly use Jena as part of a Java application to use the Model API, but Fuseki does not offer the execution of Java code, by intention.

Perhaps you can say a bit more about why you need to use Fuseki instead of using Jena's Java APIs directly?

@chenkuncloud
Copy link
Author

Hi, @ajs6f

Thank you very much for your reply! Your reply is helpful to me.

I want to use Fuseki to store RDF data, possibly update in real time, and open up SPARQL Endpoint to outside.

I was also going to use Jena's Java APIs , but I found that it can't be accessed by multiple applications at the same time and has no SPARQL Endpoint, which is why I didn't choose TDB directly. As TDB says:

If you wish to share a TDB dataset between multiple applications please use our Fuseki component which provides a SPARQL server that can use TDB for persistent storage and provides the SPARQL protocols for query, update and REST update over HTTP.

After your reply, I learned that I had to update Fuseki through SPARQL, but this would involve a lot of escape problems in the text, and it would be complicated to write the code. At the same time, HTTP would also increase the performance overhead.

I wonder if I missed something about Jena?

Best Regards

@afs
Copy link
Member

afs commented Mar 31, 2022

Shall we turn this into a GitHub "discussion" because it is not an actionable issue?

@chenkuncloud
Copy link
Author

Thanks for your reminding, I have moved to the DISCUSSIONS #1246 .

@afs
Copy link
Member

afs commented Apr 1, 2022

We have only recently enables the GH issues and discussions features so we're getting used to how best to use them. Many projects on GH don't split "issues" and "discussions".

@chenkun19960427 Do you see a "convert to discussion" option at the end of the right hand panel at the start of the issue? I'd assumed it was available to at least the issue creator as well as project committers.

@chenkuncloud
Copy link
Author

Hi, @afs
I don't see 'convert to discussion' option at the end of the right hand panel at the start of the issue. I also wonder why there is no 'convert to discussion' option.
But I see 'Create issue from discussion' at the discussions detail.
Thank you for the reminder, If I see 'convert to discussion' next time, I will use it, to publish to discussions & issues at the same time.

image

@afs
Copy link
Member

afs commented Apr 1, 2022

Thanks!

@kinow
Copy link
Member

kinow commented Apr 1, 2022

Maybe only members of apache org can see this option.

image

@chenkuncloud
Copy link
Author

chenkuncloud commented Apr 1, 2022

The issue has been resolved! See also discussion on issue: #1246

@chenkuncloud chenkuncloud changed the title Can Fuseki be used with Jena - Model ? Similar to Virtuoso - VirtGraph How can I use Fuseki as a database, and use JAVA API to update? Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants