Not to be confused with the Flying Squirrel.
xQuery 3.1 is the query language for building data driven web applications.
Xqerl pronounced 'squirrel', is a xQuery 3.1 application server.
Xqerl is an erlang application that runs on top of the Erlang virtual machine BEAM Web applications that run on the BEAM have a reputation for being long running, fault tolerant and reliable. The xqerl docker image has the erlang OTP builtin, so although xqerl is a erlang application that runs on the BEAM, to use xqerl you do not need to locally install erlang or even know much about erlang.
The xqerl application has 2 aspects
We will be setting up a local dockerized xQuery web application development environment.
- make, bash
- to prettyfy cmd line output:
- jq: pipe to format JSON output `jq '.'
- xmlint: pipe to format XML output
xmllint --format
- w3m: to screen dump http requests
w3m -dump http://localhost
- podman getting-started
Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System I am using the latest release v4
- gh the GitHub CLI
# clone this repo
gh repo clone grantmacken/glider
cd glider
# enter super do
sudo -s
# pull images
make-images
# bring container pod up
make-up
# see what is running in the pod
podman podman --pod
# exit super do
exit
# use w3m to make a request to 'http://localhost'
w3m -dump http://localhost
Now we have a running xqerl instance, we can set the pod to run on boot by using podman to generate systemd files. We make slight adjustment to the generated files as we want our proxy server container to boot after our xqerl container is running.
# enter super do
sudo -s
make service
# reboot
reboot
After reboot we can now use systemctl to
- check service status
- stop the service
- start the service
# enter super do
sudo -s
# check service status
make service-status
# check with podman
podman ps --pod -a
# stop the service
make service-stop
# 'xq' ond 'or' containers should now have exited
podman ps --pod --all
# restart the service
# 'xq' ond 'or' containers should now be up
podman ps --pod --all
# check the xqerl container log 'xq'
podman log xq
# use podman top
podman top xq
# exit super do
exit
# use firefox to make a request to 'http://localhost'
firefox http://localhost