Sample search engine using Java, Spring Framework and AWS organized
under one source repository for convenience.
The project is configured to be deployed to either a local cluster or AWS EKS with Helm.
Spin up a Kubernetes cluster locally using Minikube
minikube start
minikube addons enable ingress
minikube tunnel
Run the environment locally
helm install env deployment/env --namespace osearch-env --create-namespace
Wait until all deployments are ready
kubectl get deployment --namespace osearch-env
Install the helm chart providing local configuration
helm install osearch deployment/osearch -f deployment/config/configuration.local.yaml
Wait until all deployments are ready
kubectl get deployment
Crawler: http://localhost/crawler
Indexer: http://localhost/indexer
Search: http://localhost/search
The project is made up of 4 microservices:
- Crawler - looks for new web pages
- Indexer - indexes web pages found by the Crawler extracting and analysing page content using CoreNLP natural language processing tool
- Ranker - ranks web pages indexed by the Indexer using different ranking algorithms
- Search - provides an API to access ranked pages
Each microservice is implemented with Java and Spring using hexagonal architecture principle. All services provide the following Spring profiles:
- DEBUG - run locally as a JAR without providing any configuration with enhanced logging
- LOCAL - run locally as a JAR without providing any configuration
- PROD - a profile for Kubernetes that requires configuration
- AWS - a profile for Kubernetes that requires configuration. When using this profile microservices will use AWS services (configure IAM role based authentication for RDS and MSK, use DynamoDB instead of MongoDB and Neptune instead of Neo4J)