this is part 24 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.
And I will cover lot of tools as we move on.
basically microservices is dividing our big application to small apps , each app can have his own front-end and backend but they can communicate with each other.
This image explain how this project work .
.A front-end web app in Python or ASP.NET Core which lets you vote between two options
.A Redis or NATS queue which collects new votes
.A .NET Core, Java or .NET Core 2.1 worker which consumes votes and stores them in…
.A Postgres or TiDB database backed by a Docker volume
.A Node.js or ASP.NET Core SignalR webapp which shows the results of the voting in real time
we are going to use docker official example go to this link and copy link to clone it locally
go the the terminal and type
git clone https://github.com/dockersamples/example-voting-app.git
now the project is ready to build , we can see many docker-compose files run what ever is compatible with your machine.
I am going to use docker-compose-javaworker.yml
javaworker will use the java version not dotnet
docker-compose -f docker-compose-javaworker.yml up
have fun with it try to vote and see change live !
if you see they are using different services each use it's own front-end and back-end , and they are connected together using docker network you can see that vote and result connected to both networks back and front , but redis and worker and postgres are only to back-end.
that's a real example of power of docker how it's connected together to make a complete microservice app.
Also There is a deployment stack , it will be later later in the end when we cover all the tools , I will try to make an app contain all what we learn together :)