How cdsl-research/doktor-v2 works
Project Type and Purpose
• The project is a demo web application built with a microservices architecture. Its primary purpose is to provide search and download functionality for technical reports.
• The README also explicitly states that microservices are deployed on a Kubernetes cluster with Istio utilized as a service mesh, which implies that deployment, inter-service communication, and scaling are key aspects of the design.
Key Components
a. Microservices Layers:
• Author Service: Manages authors as indicated by the “author” directory (includes Dockerfile, deployment, and initialization scripts).
• Front Service: Provides the primary Web UI for end users (located in the “front” directory).
• Front-admin Service: Provides a management console (located in the “front-admin” directory).
• Fulltext Service: Powers full-text searching capabilities (from the “fulltext” directory).
• Paper Service: Manages technical papers (from the “paper” directory with its PDF samples and MongoDB initialization).
• Stats Service: Handles access history logs (from the “stats” directory).
• Thumbnail Service: Manages paper-related figures (from the “thumbnail” directory).
• (Though the README mentions “textize” for extracting text from PDFs, this component does not appear in the file tree; you might note it as a possible missing service or an external dependency.)
b. Supporting Components:
• Deployment Scripts: The “deploy” directory contains Kubernetes deployment configurations (namespaces, app definitions, service configurations for each microservice, Istio configuration, etc.).
• Dev Tools: The “dev_tools” directory includes supplementary scripts for tasks like uploading sample data.
• Documentation: The “docs_src” directory features scripts and files to generate API docs and OpenAPI specs.
• CI/CD Pipelines: GitHub workflows and configurations within the “.github” directory indicate build/test/deploy automation.
• Configuration Files & Kubernetes Tools: Files like .kube-linter and various YML files point to quality checks and cluster configurations.
Relationships and Interactions
• Each microservice is containerized (evidenced by Dockerfiles and docker-compose.yml files in every primary service directory).
• The services communicate over the network, likely through REST API calls (the existence of OpenAPI JSON files in docs_src supports this).
• The database interactions: Several services (such as author, paper, stats) appear to use MongoDB (initialization scripts and mongo-related deployment YAML files) and possibly MinIO for thumbnail/paper file storage.
Architectural Patterns and Design Principles
• Microservice Architecture: Each functional unit (service) is isolated, enabling scalability and independent deployment.
• Containerization and Orchestration: Each service is built into containers with Docker, orchestrated using Kubernetes.
• DevOps Automation: CI/CD pipelines with GitHub workflows ensure continuous integration and quality checks.
Implementation Details
• That each component/block is clearly labeled.
• Notes highlighting key details like “Containerized via Docker”, “Deployment via Kubernetes”, and “Service Mesh managed by Istio”.