Overview of My Submission
This is an API made with Spring Web, uses springdoc-openapi-ui to expose a swagger-ui on http://localhost:8080/swagger-ui/index.html
Using datasets from kaggle we load up Redis with movies and TV show information and then it provides endpoints to query the database.
jedis is used to interact with Redis.
Submission Category:
Wacky Wildcards
Language Used
Java/Spring
Link to Code
Removies
Removies is an api that lets you search movies and tv shows information from a database of movies from several streaming services.
How it works
How the data is stored:
The data is stored as JSON documents using RedisJSON
public void insert(String key, MediaDTO mediaDTO) {
jedisPooled.jsonSet(key, gson.toJson(mediaDTO))
}
MediaDTO
is the object to be inserted but first it needs to be represented as JSON so we use gson
for that.
How the data is accessed:
To access data several indexes need to be created Then RediSearch is used to make queries.
jedisPooled.ftSearch(
"titleIdx", new Query("@title:(" + cleanTitle + ")").returnFields("title"));
}
How to run it locally?
Prerequisites
- Have an instance of redis-stack running.
- Apache Maven 3.8.6
- Java 17
Local installation
- Download the following…
Additional Resources / Info
For reading the datasets opencsv is used.
More libraries used:
Datasets used:
- Disney+ Movies and TV Shows
- Netflix Movies and TV Shows
- Amazon Prime Movies and TV Shows
- Hulu Movies and TV Shows
You can find the code and how to run it on https://github.com/jsedano/removies.
- Check out Redis OM, client libraries for working with Redis as a multi-model database.
- Use RedisInsight to visualize your data in Redis.
- Sign up for a free Redis database.
Top comments (0)