January 2018
Intermediate to advanced
366 pages
9h 7m
English
Inside of each microservice directory, we will create two more directories. In each of these new directories will be a Dockerfile with configurations for the database. We will use two different databases for each microservice to use CQRS. One database is for CommandStack and one for QueryStack.
With these changes, the directory structure for the News microservices looks like this:
├───FamousNewsService
│ ├───command_db
│ └───query_db
├───PoliticsNewsService
│ ├───command_db
│ └───query_db
└───SportsNewsService
├───command_db
└───query_db
I'll show the code changes only in the famous_news_service microservice, but such changes should be applied in the other two News microservices.
Inside the command_db directory, we ...
Read now
Unlock full access