Skip to content

rinzyDavid/drone-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Drones

A simple solution to demonstrate how to use microservices architecture to solve business problems. This design allows the system to be easily extended to add more features and independently scallable

Introduction

There is a major new technology that is destined to be a disruptive force in the field of transportation: the drone. Just as the mobile phone allowed developing countries to leapfrog older technologies for personal communication, the drone has the potential to leapfrog traditional transportation infrastructure.

The service should allow:

  • registering a drone;
  • loading a drone with medication items;
  • checking loaded medication items for a given drone;
  • checking available drones for loading;
  • check drone battery level for a given drone;

Solution

The solution uses microservices architecture with 3 services, namely

  1. DroneMicroservice : This service is incharge of the drone activities like registering and loading drones
  2. DroneMonitorservice: This service runs a periodic task to check drone health and generate logs.
  3. DroneDiscoveryservice : This is used for service discovery for inter-microservices communication

To run the applicatiion, follow this order:

  1. Start the discovery service : type ./mvnw spring-boot:run (in the project directory)
  2. Start the drone-microservice
  3. Start the drone-monitorservice

To access the api: Please check out the swagger page for the api documentation: http://localhost:8182/swagger-ui.html.

To access the Logs generated by the drone-monitorservice http://localhost:8081/api/v1/audits

To run Unit tests.

  1. Start the discovery service (This is necessary because the unit test loads the application instance and the microservices will try to connect to eureka server).
  2. run $ mvn test -Dtest="DroneServiceImplTest"

Releases

No releases published

Packages

 
 
 

Contributors

Languages