Introduction
This is a draft documentation section describing the next version of the CAWI.
Development started in February 2025, based on work on the cawi-language and cawi-engine modules created in late 2023/early 2024.
Phase 1
The intention in the first phase of development is to keep the current DSC language and "_.xml" files mostly the same, although work will be done to better define (and fully document) the language, improve the way the ROUTE is executed and prepare for adding new language features.
As part of phase one, a new of implementation of "ASK()" will be developed, which will be used by both the CAWI and CAPMI, ensuring the functionality is the same.
A lot of the development work during phase one will be on the infrastructure around the CAWI itself - implementing new methods of deployment, a fieldwork monitor, data exports, emailings, quota management etc.
Phase 1 will end when the new CAWI starts to be used in production. It is envisaged that this will be a phased transition, depending on when specific types of functionality are implemented.
JSON
Whilst the _xml file will remain in use by some parts of the CAWI
system, new JSON file formats will be defined, starting with a JSON
equivalent to the DEFINITIONS and QUESTIONS part of the _.xml.
This JSON will be documented and used internally by both the CAWI engine and the various display modules. It will replace the current internal Perl and CAPMI data structures storing question definitions.
A second standardised JSON format will also be defined, for use by data processing tools and will be based around the individual variables created from the questions in the DSC.
GIT structure
Each module will be maintained in its own git repository.
Deployment
The deployment method (or methods) have not yet been decided - the aim is to make the code easily deployed via any method or service, including:
- Local development (e.g. on a laptop with minimal configuration/setup needed);
- On our own servers
- On the cloud - e.g. on Google Cloud, (with Docker?), Deno Deploy, ....
System diagram
(NOTE: This diagram is from early 2024 - it needs updating)
@gide/package-name refers to NPM packages maintained in GIDE's
internal NPM registry (and matching git repositories).
graph TD;
DSC["@gide/cawi-language (DSC)"]
Engine["@gide/cawi-engine"]
DISPLAY["@gide/cawi-display"]
CAWI["@gide/cawi-app"]
CAPMI["@gide/capmi-app"]
JSON["Questions JSON"]
JSONV["Variables JSON"]
DB["Data store (PostgreSQL jsonb)"]
Monitor["@gide/cawi-monitor"]
DSC --> XML
XML --> JSON
XML --> Engine
JSON --> Engine
DISPLAY --> CAWI
DISPLAY --> CAPMI
Engine <--> CAWI
Engine <--> CAPMI
CAWI <--> DB
CAPMI <--> DB
DB <--> Monitor
JSON --> JSONV
JSONV --> Monitor
JSON --> Monitor