11.14. Performance demonstrators¶
This document explains how to prove the following performance requirements implemented in LibEuFin.
Long-polling offered by Nexus to the Exchange Wirewatch.
Reduced usage of disk space by the database.
PostgreSQL short-lived database sessions.
Participation in the Taler benchmark.
It is worth noting that point 2 and 3 will be proved via point 4. In particular, because the benchmark is a resource demanding activity, its impact on the database should be enough to reflect a worst case scenario with regard to points 2 and 3.
The following two sections will describe how to run point 1, and points 2, 3, 4 altogether.
11.14.1. Long-polling¶
This demonstrator is a Docker image that installs LibEuFin
and registers one user at both Sandbox and Nexus. The Nexus
user is set up to use the Taler Wire Gateway, to let curl
emulate the Taler exchange (wire-watch).
To run the demonstrator, clone the following repository:
git://git.taler.net/deployment
and build the Docker image:
$ cd deployment/nlnet/task5/long-poll
$ docker build -t long-poller .
Start the long-poller
image and wait after the installation
and configuration complete. The completion should end with a message
starting by Services are online!
. At this point, it is possible
to request Taler incoming payments and observe how such request returns
only after we manually send Taler money to the long-polling client.
Give the following command to request Taler incoming payment with the long-polling feature:
$ curl -v -u test-user:x 'http://localhost:5001/facades/test-facade/taler-wire-gateway/history/incoming?delta=5&long_poll_ms=100000'
After having observed that the previous command actually
long-polls, send it to the background by pressing CTRL-Z. Send
now a Taler payment to test-user
with the following command.
$ wire_transfer
Bring now the curl
process again in the foreground, and if
it got the payment, now it shows the payment data.
11.14.2. Benchmark¶
This demonstrator runs the Taler benchmark that relies on LibEuFin.
Clone the following repository:
git://git.taler.net/deployment
and build the Docker image:
$ cd deployment/nlnet/task5/benchmark
$ docker build -t benchmark .
Run the benchmark
image and wait for its completion. At this
point, the demonstrator prints the benchmark result regarding all
the components, and lastly the database disk usage and the LibEuFin
database session(s) duration(s).
The database disk usage is complessive, therefore it shows how all the services occupy database disk space. Hence if this quantity is acceptable, then also LibEuFin’s share is.
On the other hand, the database session duration concerns only LibEuFin, and compares the longest database session with the whole benchmark duration. In particular, it shows what percentage of the whole benchmark duration is represented by the longest LibEuFin session. Therefore ‘low’ percentages mean ‘short’ database sessions, as it is requested in point 3.