-
Notifications
You must be signed in to change notification settings - Fork 2
2. Description and Improvement Item
Sanjoy Kumer Deb edited this page Oct 19, 2017
·
5 revisions
This is a simple spring boot application. This Projects have some targets which are described below.
- Projects have some location from where one can deliver his goods to another location. My AIM is to find all possible paths to transfer goods.
- Goods can transfer from one place to another place via Road,Ocean,Air.
- To transfer goods from one location to another location have some cost based on distance and transport type.
- To transfer different size container has different cost.
- So to transfer goods from one location to another have a case for minimum cost or goods safety(based on route and transport type)(This case not implemented)
- If users defined destination not available on company's predefined locations then need to find nearest location to transfer goods. This project search 50KM distance to find predefined location. But if this location also not reachable then goods can not be transferable.
Technical Description And Improvement Items:
- Used Spring Boot for simplicity for project configuration related issue.
- I created two tables. One is _**place **_for locations and another is _**path **_for paths and its cost and distance.
- I can separate container info on separate table. But I for this simple project I thinks that's ok.
- I tried to use hibernate-spatial to get nearest locations. But Circle with predefined radius don't give exact result. I have inserted POINT type data with latitude and longitude and then try to find nearest location within this circle but not giving accurate result.Then skip it and use mysql query.
- CRUD operation for Place and Path not completed yet. Just Add operation working.
- I used Recursive algorithm to find all possible paths from source to destination.
- I used google map to find latitude and longitude of unknown destination for nearest locations.
- I Used Jpa Repository for DB operations.
- I make this project multilayered.
- Its not recommended to work with DB entity in service layer there also need a dto layer between service and dao layer.
- I used jpa repository directly from service layer but it is not recommended. there will be a DAO class to access db entity.
- I have returned only plain id without json format when creating place and path. It will be JSON format.
- Caching can be introduce. I usually use redis to manage cache. I will implement it later.