- Database
Location
is partitioned based onuser_id
column for fast retrieval since a user can have thousands of entries. created_on
column has been indexed as well for doing time frame query.- The
id
column is an auto-increment column so the latest location of the user is the last value inserted in the partition.
- To first start the User microservice run the Server as well as the Gateway so that the Eureka Discovery service can register it.
- You would also need to start up the Location-Writer microservice as well.
- Run the
PostgreSQL
docker-compose file using the commanddocker-compose -f util/postgres.yml up -d
- Run the
ApacheKafka
docker-compose file present in Location-Writer microservice.