> Is this correct? 

Yes. that is the idea.

> Maybe you could give us a quick example of a request

When you say “request” do you mean the "http request” and the process?

Let me give you another example that might give you more light and do not require http requests at all.

Imagine I’ve basexserver running on 192.168.1.33 and port 1984
Now, I want to use basexGUI to connect to that host and port.

You’ll notice this is not possible. The GUI is also running the server in its own JVM process.

What is missing in the API is the concept of a “connection” and the properties related to a “connection” so the GUI cannot “connect” to an existing server and the web application also cannot “connect” to a running server.

The options documented here: http://docs.basex.org/wiki/Options contains almost all the information needed to establish a connection to a server. There is a HOST, PORT, USER, PASSWORD, etc… why not you just add a new one called “URL” and combine them together in the same way they exist on existing jdbc drivers? The idea is to allow any application to connect to a basexserver using the basexserver URL the same way basexclient is connecting to an existing basexserver

Best regards
Ignacio


El 27 jul 2017, a las 18:30, Christian Grün <christian.gruen@gmail.com> escribió:

Ignacio,

Thanks for your feedback, and your offer to help.

I alerady have a vague idea now about the architecture you are aiming
for. If I got you right, …

• you would like to start the BaseX server as a separate instance
(outside the web application);
• you want your WAR file to be restricted to RESTXQ files; and
• you would like to have a thin layer that passes on everything to the
server layer.

Is this correct? Maybe you could give us a quick example of a request,
and how you believe it shall be processed step by step?

Christian


The problem is that I want to have the same client-server architecture using
a “web-client” running restxq. I’ve successfully deployed the WAR file on
tomcat and I’ve tuned the parameters on web.xml to access the same “files”
the basexserver is serving but this is not a real “client-server”
architecture because the JVM on the web application server is not connecting
to the basexserver but just sharing the same files! In the example above, I
can stop my basexserver and the web application is still running because it
hosts its own server.

I’m a experience developer and I think I might be capable of help you
decouple the processing of the restxq message and the execution of the query
on a remote server. At least if I’d access to the source code I could
eventually understand why I cannot properly do that now.

Best regards
Ignacio




El 27 jul 2017, a las 14:11, Christian Grün <christian.gruen@gmail.com>
escribió:

Hola Ignacio,

Welcome to the list.

Usually, the best way to get started is to download the ZIP or EXE
version of BaseX and follow the instructions in our documentation [1]:

• If you start the BaseX GUI, you can create databases, run queries,
view your data via various visualizations, etc.
• If you start the BaseX HTTP Server, you can simply open your browser
and visit http://localhost:8984/dba/ to access the web-based
administration interface.

Now some more specific replies on your questions:

I’ve been trying to configure the web administration portal to be used with
a remote server with no success. It looks like it is not possible to take
advantage of the client-server architecture from the Web Application
http://docs.basex.org/wiki/Web_Application


What kind of remote server do you work with? Indeed BaseX provides a
client/server architecture – which will be made available after
starting the BaseX Server – but I assume you are rather interested in
the HTTP services, such as RESTXQ? Have you already tried to embed
BaseX as a servlet?

Saludos de Alemania,
Christian

[1] http://docs.basex.org/wiki/Startup