This project is a Tweeter Insight Engine that provides insights based on user input. The project is structured using Kubernetes and consists of several components including a webapp, an analyzer, an ingestor, and a Redis database.
The project is structured into two main folders:
-
k8s: This folder contains Kubernetes configurations for the different components of the project. These include:- Webapp (Deployment and Service[Load Balancer])
- Analyzer (Deployment and Service)
- Ingestor (Deployment and Service)
- Redis (Deployment and Service)
- Persistent Storage Claim
-
images: This folder contains the images for the ingestor, webapp, and analyzer.
The workflow of the project is as follows:
- The webapp, which serves as the frontend, receives input from the user (keywords and source[API, CSV]) and sends it to the analyzer for analysis.
- The analyzer sends the keywords and source to the ingestor, which checks if the data exists in the Redis database. If not, it fetches the data from the source (API or CSV) and loads it into Redis.
- Once the data is loaded into Redis, the ingestor sends a 200 OK response back to the analyzer. The analyzer then fetches the data from Redis and performs analysis on it.
- The results of the analysis, which could be text data or image names, are returned as a list of JSON objects back to the webapp. If the analysis involves images, the image names are saved in the persistent storage claim that is shared between the webapp and the analyzer.
- Finally, the webapp displays these insights in HTML format to the user.
To get started with this project, you need to have Kubernetes installed and configured on your machine. Once you have that, you can clone this repository and run deploy.sh, which runs all the k8s configurations.