-
Notifications
You must be signed in to change notification settings - Fork 167
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
rdf4j server / workbench self-contained executable #1502
Comments

Several options I guess, e.g.
|
Upvote for spring boot 2 |
…Exception is present and extract the report so it can be used as the body of the response Signed-off-by: Håvard Ottestad <[email protected]>
Fwiw I've started looking at building a spring boot app in my spare time. My wife hates me but it might come together. |
I have a decent amount of experience with spring boot, if you have any questions :) |
…tead of relying on a generic exception with a message Signed-off-by: Håvard Ottestad <[email protected]>
…Exception is present and extract the report so it can be used as the body of the response Signed-off-by: Håvard Ottestad <[email protected]>
…tead of relying on a generic exception with a message Signed-off-by: Håvard Ottestad <[email protected]>
Ah yes, this dropped by the wayside a bit I'm afraid. I'll see where I left off. |
Related: #2423 |
(yet) another somewhat related idea from the gitter chat: using jetty instead of tomcat for the war (https://www.baeldung.com/deploy-to-jetty) |
Jeen, are you still working on it? |
Not really, as with so many good intentions, this one got overrun by the reality of there only being 24 hours in a day... |
Ha, I know this problem. I'm itching to do it, but there's actually no time. However, would there be tests available that test the REST endpoints? |
There are some controller tests available in the rdf4j-http-server and rdf4j-http-server-spring modules, but the more comprehensive testing is probably done in the compliance/integration tests in rdfj4-repository-compliance, which test the HTTPRepository and the SPARQLRepository against a running RDF4J Server. |
GraalVM starts to look a bit more interesting since Oracle is contributing the community edition to openjdk, and Spring (6 ?) is actively working on fully supporting it. That being said, we now also have a spring server, so perhaps this is issue is not that relevant anymore ? |
@hmottestad @barthanssens Out of curiosity, what would be the recommended way to go about trying to package a single server executable nowadays? Would it still be some wrapper or rewrite of the server into spring boot, or is there a better way? Very interested in making this happen one way or another for employing a more cloud-native deployment strategy that isn't playing very nicely will the whole "application server" paradigm of Tomcat unfortunately. Was looking into embedded tomcat or jetty but wasn't quite sure if going down that route would be more troublesome than just sinking the time to make spring boot work. |
Spring Boot would be my recommendation. You would end up with a single jar file. I think the amount of work required to migrate the server/workbench to spring boot would probably not make it worth it. Maybe there is some middle ground where we can inject our spring stuff directly into spring boot? At the moment I would recommend using the docker image if you don't want to mess around with your own Java container stuff. I would think that many use cases for a single executable file could be solved by using docker. |
Yea migrating sounds like quite a large undertaking for sure. Ya docker is certainly an option in the future, but at the moment it isn't attainable with the target environment / current deployment + service archetype. I was looking into maybe something even like jetty-runner which still operates on a war but the lifecycle of the application server is still tied to the lifecycle of the servlet. Eh, I'll try to carve out some time to experiment and update this thread if I get something working! |
Well, you could use embedded Jetty for the server (workbench has an issue with 10/11/12, server should work IMHO) or something microprofile-based, but nowadays springboot-in-a-docker-in-the-cloud seems to be "the" way to go (or quarkus in Redhat-environments) |
Just a little update. I've been looking into this a bit in my free time and got a (very) hacky test just to see how difficult integrating Spring Boot would actually be. It looks like we can leverage almost all of the current Spring MVC code and hook with You can find the code here: https://github.com/benherber/rdf4j/tree/experinment/simple-sb-app If this is a direction the maintainers would be willing to go in, I'd be happy to do it (it makes my life extending server code MUCH easier :) ). This process would not change the APIs / Protocol version, and should still create war build artifacts to integrate with pre-existing vanilla deployments, but has the added benefit of also creating self-contained executables and being more extensible in the longer run (hopefully 🤞). The way I would think about going about it would be something akin to the following:
They may be some pie-in-the-sky dreams at the moment, but it's much more achievable than I had first thought it to be. Please let me know any thoughts, comments, or concerns or how you think it best to proceed. Thanks! |
…table for server
…table for server
…table for server
Instead of / in addition to the WAR file and the docker image, we should look into distributing Rdf4j Server / Workbench as a self-contained executable that can be downloaded and immediately spun up without having to install a servlet container separately.
The text was updated successfully, but these errors were encountered: