RESTful API which provides the service to determine the geographic distance between two postcodes in UK.
You are required to build a simple microservice (RESTful) that provide the service to determine the geographic distance between two postcodes in UK.
The UK postcode coordinate data source is available in this website: https://www.freemaptools.com/download-uk-postcode-lat-lng.htm
You are free to use CSV or any databases. Make sure you provide clear instructions on how to setup the database you use.
Please design the REST APIs that able to achieve the purpose of this microservice. The result should fulfill following:
- JSON formatted
- Contains both location postcode and coordinate (latitude and longtide) in degree.
- Distance (for e.g. in KM measurement).
- The unit of measurement (for e.g. fixed string as “km”).
Evaluation criteria:
- Requirement understanding.
- Microservice (RESTful) understanding.
- Design pattern.
- Performance & memory management.