Running the project: I have used the embedded tomcat of Spring Boot You can run like java application with InterstellarApplication.java Endpoints:
-
To import the data first (mandatory - ddl-auto=create-drop). http://localhost:8080/data/import
-
To calculate the minimum distance http://localhost:8080/distance/calculate_distance
Project Design and Tools Used:
- Dependency and build management - maven.
- Apache POI for importing the data from Excel sheet.
- Embedded database - Apache Derby for relational transaction.
- Hibernate for Entity management.
- Spring boot parent and MVC architecture to serve the business purpose.
- Servlet container - Apache tomcat
Areas to Improve:
- Could have used JSP servlet and spring Model View resolver (Haven’t used MVC for application development – Have exposed the rest services which bill be used by the Angular application for view).
- Caching could be implemented to prevent repetitive computation in a session.
- Swagger framework can be used to test the exposed rest service.
- Exception Handling with resource bundle to delegate appropriate error message.
- Logging could be implemented.
- Method and class level comments for code readability.
- Algorithm performance tuning using Priority Queue for weighted graphs.
- Good UX and UI design.