Skip to content

ivanshilyaev/order-planning-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Order Planning Problem

Task

API

Key decisions

  • Customers and warehouses are points with coordinates (x; y)

  • This solution uses a database. The database has several predefined warehouses containing products

  • When a new customer is added, the distance between customer and each warehouse is calculated and saved to a separate table

  • In the same way, when a new warehouse is added, the distance between warehouse and each customer is calculated and saved to the very same table

  • When a new order is placed, the nearest to the customer warehouse containing the product is found. The process is fairly quick, since we've already calculated all the distances. If there is no such warehouse containing the product, the corresponding message is displayed

  • API for all main entities (Customer, Warehouse, Order & Product) has been implemented. There is a possibility to create and read all of them. There is also a possibility to update and delete customers and warehouses

  • The developed solution is a microservice built using Java and Spring Boot

  • The solution also contains unit and integration tests for key scenarios

Technology stack

Java 11, Spring Boot, Spring Data, H2 database.

There is also another version of the app that uses PostgreSQL and Docker. See branch v2-postgres.

About

A test task repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages