A simple prototype for a multi-tenancy, async request/reply system, as shown in the figure:
To avoid AWS expenses we run both the Requester and Replier applications locally. ElasticCache also have been replaced by Redis running in Docker.
Attention: this architecture is a prototype and was developed as a study-case only. It haven't been stressed yet.
- Create a terraform.tfvars file containing the tenants id as follows:
tenants = [
"97fbac68-fe8e-4495-99d4-27e4163c405d",
"5bdd5391-d2b9-41d5-98ad-d6c18f30e21c"
]
- Run terraform apply.
- Access SQS Console and get the requests-queue.fifo URL.
- Create a virtual-env and install the requirements listed in requirements.txt
- Open two terminals; one for running the Requester application and another one for the Replier.
- Before executing the code, export the Queue URL as follows:
export QUEUE_URL=''