Remote Target - Server

Execute queries remotely


Daobab provides a remote query execution by invoking a single remote server endpoint.

One single endpoint is enough to execute any kind of query.
Only a native query execution is prohibited.

Instead of consuming database connection pools via direct connection, you may use this solution to simplify your architecture.

To set up a remote server, just expose an endpoint accepting Map<String,Object> and return a ResposnseWrapper object.

Into the method body, call Endpoint.invoke and provide source target along with input object. That's all.

These few lines are enough to set up remote server through SpringRest API with /export/db adress.

Followed configuration exposes SakilaDataBase target, without any additional restrictions:

You may use a typical rest security to secure endpoint itself.

However, if you like to secure vulnerable internal target data (for example passwords), set up a dedicated AccessProtector and define the security policy.

Remote AccessProtector doesn't overrides the source target one, but works as additional one.

If the source target has own security configured, it will be in use as well.

Of course, it's possible to expose all kind of targets.

Each one of them has to have a dedicated endpoint.


At the client site, just extend RemoteClient and provide the valid url od the remote endpoint.

It's up to you what kind of protocol or technology you are using.

In the following example I've used Spring Rest Api, but you may use whatever you like.

There is just a few lines of code necessarily to establish the connection:

From that moment on, you are able to call any query you want, remotely and via a single endpoint.

Please note, that at the moment, Remote Server is not transactional.

There is auto commit in use after every modification at the server side.

Remote Server also does not allow the execution of native queries.

© Copyright 2018-2023 Elephant Software Klaudiusz Wojtkowiak