Re: [basex-talk] BaseX GraalVM native-image
Hi dliakh, If you want to communicate with the server of BaseX, you can have a look at the Developer page in our documentation [1]. You can either use clients in various languages [2], the Java XQJ API or one of the web APIs (REST, RESTXQ). Best, Christian [1] https://docs.basex.org/wiki/Developing [2] https://docs.basex.org/wiki/Clients On Fri, Dec 2, 2022 at 4:50 PM wrote: > > Hi Steven, > Yes, that may look like a solution if there is a client which is > lightweight enough to have some reasonable startup time. > Thank you very much > (sorry, just found there are new messages in the list after sending my > reply which besides other stuff mentions a possible solution like this) > Best regards > > On Fri, 2022-12-02 at 15:31 +, Majewski, Steven Dennis (sdm7g) > wrote: > > Maybe leave the server running and submit scripts from one of the non > > java clients ? > > ( I haven’t used any of the other language clients myself, so no > > experience here. ) > > > > — Steve. > > > > > > > On Dec 1, 2022, at 3:08 AM, dli...@gmail.com wrote: > > > > > > Hello Everyone, > > > Didn't anybydy try and is that possible to convert the BaseX JAR to > > > a > > > "native-image" (using GraalVM's convertor or any other tool maybe)? > > > The reason: I have to use BaseX in scripts and Makefiles as an > > > XQuery > > > engine and have to call it often. The problem is the JVM startup > > > time > > > affects the performance significantly when it has to start multiple > > > times. > > > I tried just naïvely running the GraalVM's native-image convertor > > > against the BaseX103.jar file and got errors with long backtraces > > > (that > > > I didn't quite understand to be honest). > > > Did anybody try that, maybe? > > > Best regards > > > > > > > > >
Re: [basex-talk] BaseX GraalVM native-image
Hi Steven, Yes, that may look like a solution if there is a client which is lightweight enough to have some reasonable startup time. Thank you very much (sorry, just found there are new messages in the list after sending my reply which besides other stuff mentions a possible solution like this) Best regards On Fri, 2022-12-02 at 15:31 +, Majewski, Steven Dennis (sdm7g) wrote: > Maybe leave the server running and submit scripts from one of the non > java clients ? > ( I haven’t used any of the other language clients myself, so no > experience here. ) > > — Steve. > > > > On Dec 1, 2022, at 3:08 AM, dli...@gmail.com wrote: > > > > Hello Everyone, > > Didn't anybydy try and is that possible to convert the BaseX JAR to > > a > > "native-image" (using GraalVM's convertor or any other tool maybe)? > > The reason: I have to use BaseX in scripts and Makefiles as an > > XQuery > > engine and have to call it often. The problem is the JVM startup > > time > > affects the performance significantly when it has to start multiple > > times. > > I tried just naïvely running the GraalVM's native-image convertor > > against the BaseX103.jar file and got errors with long backtraces > > (that > > I didn't quite understand to be honest). > > Did anybody try that, maybe? > > Best regards > > > > >
Re: [basex-talk] BaseX GraalVM native-image
Maybe leave the server running and submit scripts from one of the non java clients ? ( I haven’t used any of the other language clients myself, so no experience here. ) — Steve. > On Dec 1, 2022, at 3:08 AM, dli...@gmail.com wrote: > > Hello Everyone, > Didn't anybydy try and is that possible to convert the BaseX JAR to a > "native-image" (using GraalVM's convertor or any other tool maybe)? > The reason: I have to use BaseX in scripts and Makefiles as an XQuery > engine and have to call it often. The problem is the JVM startup time > affects the performance significantly when it has to start multiple > times. > I tried just naïvely running the GraalVM's native-image convertor > against the BaseX103.jar file and got errors with long backtraces (that > I didn't quite understand to be honest). > Did anybody try that, maybe? > Best regards > > smime.p7s Description: S/MIME cryptographic signature
Re: [basex-talk] BaseX GraalVM native-image
Hi - I've had nice luck running either the basexserver + basexclient, or the basexhttp server (confession, it's almost something I start by default). Maybe that would be an option to help avoid JVM startup times? HTH! Best, Bridger On Thu, Dec 1, 2022, 5:08 AM wrote: > Hello Everyone, > Didn't anybydy try and is that possible to convert the BaseX JAR to a > "native-image" (using GraalVM's convertor or any other tool maybe)? > The reason: I have to use BaseX in scripts and Makefiles as an XQuery > engine and have to call it often. The problem is the JVM startup time > affects the performance significantly when it has to start multiple > times. I tried just naïvely running the GraalVM's native-image convertor > against the BaseX103.jar file and got errors with long backtraces (that > I didn't quite understand to be honest). > Did anybody try that, maybe? > Best regards > > >
Re: [basex-talk] BaseX GraalVM native-image
GraalVM, and especially Native Image, is an impressive and important project, but more limited than many imagine. Building native images is constrained by practical issues. For example, running a Java application requires certain external dependencies. If a dependency is not available, then the application may fail, but generally only at the point of invoking a specific feature that requires it. If some feature is not invoked, then a missing dependency may be harmless. Dependency resolution is different for Native Image. Rather, the tool attempts to find the complete set of dependencies utilized at all points in an application, convert them all into native machine code, and finally, bundle them into a single executable file. Native Image is less useful for consumers of a Java application than developers. It might require integration of NI into the overall build process, to achieve the results you want. On Thu, Dec 1 2022 at 11:08:32 AM +0100, dli...@gmail.com wrote: Hello Everyone, Didn't anybydy try and is that possible to convert the BaseX JAR to a "native-image" (using GraalVM's convertor or any other tool maybe)? The reason: I have to use BaseX in scripts and Makefiles as an XQuery engine and have to call it often. The problem is the JVM startup time affects the performance significantly when it has to start multiple times. I tried just naïvely running the GraalVM's native-image convertor against the BaseX103.jar file and got errors with long backtraces (that I didn't quite understand to be honest). Did anybody try that, maybe? Best regards
[basex-talk] BaseX GraalVM native-image
Hello Everyone, Didn't anybydy try and is that possible to convert the BaseX JAR to a "native-image" (using GraalVM's convertor or any other tool maybe)? The reason: I have to use BaseX in scripts and Makefiles as an XQuery engine and have to call it often. The problem is the JVM startup time affects the performance significantly when it has to start multiple times. I tried just naïvely running the GraalVM's native-image convertor against the BaseX103.jar file and got errors with long backtraces (that I didn't quite understand to be honest). Did anybody try that, maybe? Best regards