Skip to content

Commit 5e7411d

Browse files
committed
docs
1 parent 998b2e0 commit 5e7411d

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A platform dedicated to ease comparison of databases:
55

66
a) allow testing compatibility of SQL snippets across many different databases and versions
77

8-
b) allow doing full-fledged performance testing, comparing results across many db versions
8+
b) allow doing full-fledged performance testing, comparing resource usage across many db versions
99

1010

1111
*** Work In Progress ***
@@ -55,7 +55,6 @@ NB: if you don't have a bash shell interpreter on your host computer, look at th
5555
the host computer, please change variables COMPOSE_WEB_LISTEN_PORT_HTTP and COMPOSE_WEB_LISTEN_PORT_HTTPS in file
5656
docker/.env
5757

58-
5958
### Usage
6059

6160
Example: executing the sql statement `select current_date` in parallel on all databases:
@@ -130,15 +129,46 @@ After starting the containers via `./bin/stack.sh build`, you can:
130129
*NB*: if the `stack.sh` command fails, you can use `docker` and `docker-compose` commands for troubleshooting.
131130
See the section 'Alternative commands to stack.sh' below for examples.
132131

133-
134132
### Maintenance
135133

136134
3 scripts are provided in the top-level `bin` folder to help keeping disk space usage under control
137135

136+
### How does this work?
137+
138+
The command-line tool `dbconsole`, as well as the web interface are built in php, using the Symfony framework.
139+
140+
Docker is used to run the app:
141+
142+
- each db instance runs in a dedicated container (except SQLite)
143+
- one container runs the web interface
144+
- one container runs the command-line tools which connect to the databases
145+
- one container runs Adminer, a separate, self-contained db administration app, also written in php
146+
147+
Docker-compose is used to orchestrate the execution of the containers, ie. start, stop and connect them.
148+
149+
The data files and logs of all the database instances are stored on the disk of the host computer, and mounted as
150+
volumes into the containers running the databases.
151+
152+
All the interactions between `dbconsole` and the databases happen, at the moment, through execution of the native
153+
command-line database client (`psql`, `sqlcmd`, etc...). Those clients are executed in parallel as independent processes
154+
from the `dbconsole`.
155+
156+
This design has the following advantages:
157+
158+
- parallel execution of queries across all database instances to reduce the total execution time
159+
- it does not let the warts of php database-connectors influence the results of query execution
160+
- it can easily expand to run queries on multiple database types, even those not supported by php
161+
162+
On the other hand it comes with some serious drawbacks as well, notably:
163+
164+
- parsing the data sets which result from a SELECT query from the output of a command-line tool is an exercise in pointlessness
165+
166+
More details about advanced use cases are given in the section below.
167+
138168

139169
## FAQ
140170

141-
See the [FAQ](./doc/FAQ.md) for more details
171+
See the separate [FAQ](./doc/FAQ.md) document.
142172

143173

144174
## Alternative commands to stack.sh

doc/TODO.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
## Major features
1313

14-
- test execution of a sql command which creates a table with a few cols (string, int, ...), inserts a couple of lines
15-
(ascii chars, utf8 basic plane, utf8 multilingual plane) and then selects data from it
16-
1714
- host: allow building/starting partial docker stack for speed and resources (eg. no oracle, no sqlserver, etc...)
1815
Being able to start a single 'db type' might also make sense in parallelization of tests on travis.
1916

@@ -68,6 +65,9 @@
6865

6966
## Improvements
7067

68+
- use '-t' options for mysql client ?
69+
+ investigate the possibility of having the clients emitting directly json results instead of plaintext
70+
7171
- improve travis testing:
7272
+ add tests: ...
7373
+ use 'bats' for shell-driven tests?
@@ -77,6 +77,8 @@
7777
- improve handling of character sets:
7878
+ allow to use utf16, utf16le, utf16ber as encodings for sqlite
7979
+ add more support for 'universal' charset/collation naming
80+
+ test execution of a sql command which creates a table with a few cols (string, int, ...), inserts a couple of lines
81+
(ascii chars, utf8 basic plane, utf8 multilingual plane) and then selects data from it
8082

8183
- worker: some failures in (temp) db removal are not reported, some are (eg. on mysql, for non existing db).
8284
make it more uniform ?

doc/WHATSNEW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Version 0.? (unreleased)
2-
------------------------
1+
Version 0.9
2+
-----------
33

44
- Improved: `stack.sh start` and `stack.sh stop` can now start/stop a single container
55

6-
- Improved: lots of refactoring under the hood, laying the groundwork for more functionality in the future
7-
86
- Improved: the `instance:list` command now returns database vendor and version for each defined db instance.
97
NB: the database version is gotten from querying the databases themselves, rather than relying on configuration
108
(unlike the data shown in the web interface, which still relies on the values manually set in config files)
119

1210
- Improved: the `collation:list`, `database:list` and `user:list` commands now return a more structured output, which
1311
is better for non-text output formats such as json
1412

13+
- Improved: lots of refactoring under the hood, laying the groundwork for more functionality in the future
14+
1515

1616
Version 0.8
1717
-----------

0 commit comments

Comments
 (0)