- Kotlin
- Spring 5, Spring Boot 2, WebFlux
- Etc (Gradle, Swagger, Docker)
Clone this repo
coming soon ...
./gradlew build
./gradlew bootRun
http://localhost:port
- Overview
- Requirements
- Development process
- Build tools
- Functional requirements
- Bonus
- Non-functional requirements
The test task will cover the following areas:
- REST API design and implementation
- Work with remote services
- Work with async tasks.
- Error handling
- Work with databases using ORM
- Work with git
- Use public github repository. https://github.com/
- Work with the repo as you usually work in production (feature branches, commits, etc). Do not do just one commit with all your work. We want to see how your solution was evolving over the time.
- Write your code as you write production code (tests, javadoc, naming, codestyle, etc)
- Provide clear instructions how to build the code, how to run, what configuration options are available.
##Build tools
- Use any of the commonly used build tools — Apache Maven, Gradle, Apache Ant.
- Implement a Java web-service, which will provide REST-style API to get weather information.
- To get actual weather information — use https://openweathermap.org/ 2. Do async requests with timeout and error handling.
- Service should provide the following endpoints: 3. Get city weather 3. If city is registered — get information cached by background update (see below) 3. If city is not registered — do an actual call to the external API. 3. External response should be cached for 5 minutes and on a consequent request, cached information should be returned. 3. Register city 3. User should be able to register city. City information should be saved into a database (use h2 or sqlite) 3. To work with database use ORM 3. Get last weather for all registered cities 3. Unregister city 3. Delete city information from DB with all cached information 3. Endpoints should return JSON/XML depending on headers sent by Users.
- Background update: 4. Implement background updating of weather for a registered cities. 4. Weather information should be stored in a database.
1. Docker image
- Use Java 8+ or Kotlin
- Write Javadoc
- Write tests (unit, integration, mocks)
- Use frameworks: Spring, ORM (Hibernate/EclipseLink or via standard JPA