This service is meant to provide crypto data insights
The entire list of requirements can be checked here
- Dynamically generate a Spring Batch Job containing
- a series of steps for loading token data from each resource defined in application.yml - it is very scalable to add new tokens in the future (add a new token symbol and token resource, NO code changes required)
- an additional step for creating the lookup tables used for improving the performance of future RMQ (Range Minimum/ Maximum Queries) - to understand this solution, check Medium post on Sparse Tables
- Create the service logic for answering the RMQ in the requirements
- Expose the endpoints for answering the RMQ
- Safeguard our API by checking for blacklisted client IPs, missing params, invalid params, constraint violations, etc. before processing any request
- Centralize the exception handling logic
- Create a documentation for our endpoints using OpenAPI 3.0
- once you run the project locally, you can check the documentation by accessing http://localhost:8080/swagger-ui/index.html
- Create a Postman collection for both the positive and negative scenarios - very handy for e2e manual testing/ debugging
- Memory Complexity - M * O(NlogN), where M is the number of tokens, N is the maximum number of data points per token
- Time Complexity - O(1), constant time for the RMQ received on any of the exposed endpoints