Your challenge is to build a backend for a car rental application that efficiently handles the creation and retrieval of rental offers. The system should provide functionality for partners to write offers and for customers to search and read them according to a given API specification.
The application must support searching offers using mandatory and optional filters using REST. For that, you are given a (virtual) server with root access that you implement your solution on. You'll need to maximize both the read- and write-performance under different scenarios.
The performance of your solution will be evaluated using an automated test suite you can manually trigger test runs with. These tests simulate a variety of use cases, ranging from simple business logic checks to highly concurrent read/write operations using randomly generated test data. Your submission will be scored and ranked based on overall correctness and speed. A live leaderboard displays the scores of your fellow competitors.
There are three endpoints you need to implement and expose via PORT 80:
POST /api/offers
to create a new offerGET /api/offers
to search for offersDELETE /api/offers
to delete all offers. This endpoint will be called before each scenario within a test run.Important: The POST
endpoint is expected to be blocking. Your solution should only return a response once the offers have been successfully processed and can be read from with new GET
requests. During this blocking time, there are no requests to the GET
endpoint that would require the offer to be present or change the expected result.
For a detailed description of the API, please refer to the API Specification.
The regions used for the offers are static and can be downloaded here.
The regions are structured as a tree with each region potentially having subregions. Each offer is assigned exactly one leaf region ID. When searching for a region, the system should return all offers that are located in any of the subregions of the requested region.
To ensure a fair competition and learn from your solutions, we require you to provide us with access to your repository. This will only be relevant for the winning competitors.