Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Latest commit

 

History

History
61 lines (39 loc) · 2.82 KB

README.md

File metadata and controls

61 lines (39 loc) · 2.82 KB

tests workflow image workflow coverage

Skylunch

The $100 hamburger is a phrase used to describe a recreational flight taken by pilots for the primary purpose of having a meal at a distant airport. The term is often used humorously to describe the high cost of general aviation, but it also represents the freedom and joy of flying for leisure.

Skylunch is a simple, non-blocking api built using Spring Webflux that, provided with an airport code, will return a detailed list of restaurants within a configurable radius.

The purpose of Skylunch is to help aviators find new and interesting destinations to elevate the enjoyment of their favorite hobby.

How it works

Technologies

Skylunch is built using the following technologies:

Data Storage and Access

diagram

Data is stored with Redis using Redis OM Spring.

Upon receiving a request, Skylunch will search the Redis cache/db for a result before querying the external api. External api calls will then be cached in Redis for subsequent requests.

Geographical searches are performed using the built-in functions of Redis OM:

val restaurants = restaurantRepository.findByLocationNear(
    location,
    Distance(restaurantProperties.radius.toDouble(), Metrics.METERS),
)

Local results will also be checked for 'staleness' according to the configuration properties. Results that are older than the threshold age will be re-queried by external api.

Note About Blocking Calls in Redis OM Java

As of version 0.5.1, a fully non-blocking application is not possible using the Redis OM. This is because Redis OM uses the Jedis library instead of the non-blocking Lettuce library to access Redis. Therefore, calls to the repository will be blocking.

Try It Out

Graphql

The application exposes the /graphiql endpoint which can be used to test the application and explore the schema. Queries are then made via /graphql.

Http

A typical http endpoint is also provided and can be used at /api/v1/search?code=<ICAO or IATA>. Example: /api/v1/search?code=lax.

Deployment

The infrastructure and deployment are covered in their own Readme.