This solution has a CPF query service that makes available the personal data stored in MySQL.
Each call in this service sends an event to an event queue on RabbitMQ.
A worker processes these events and stores them in MongoDB and updates the last record in Elasticsearch.
- Very sensible database - MySQL
- Light sensible database - MongoDB
- Fast database - Elasticsearch
It stores accounts data.
It stores events related data.
It stores the latest event associated to an account.
- Create
.envfile
MYSQL_ROOT_PASSWORD=example
RABBITMQ_DEFAULT_PASS=example
COMPOSE_FILE=docker-compose.yml:whois-api/nested-docker-compose.yml- Run docker-compose
$ docker-compose up- Run database migration
$ virtualenv venv
...
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
...
(venv) $ yoyo apply -p
Password for mysql://root@localhost/secure-database:
... applied- Call whois-api endpoints