How 96glory/syk-springboot-webservice works
Main Components
a. Client Layer:
• Web Browser (Client)
• Static Resources (JS, Mustache templates)
• Nginx (Reverse Proxy for zero-downtime deployment)
b. Application Layer:
• Spring Boot Application (Two instances for zero-downtime deployment)
• Core Components:
• Web Controllers (REST APIs)
• Service Layer
• Repository Layer
• Security Configuration
• OAuth2 Integration
c. Data Layer:
• MariaDB (AWS RDS)
• H2 Database (Testing)
d. External Services:
• Google OAuth2
• AWS Services (S3, CodeDeploy)
• Travis CI
[Client Layer]
• ↓
[Nginx Layer]
• ↓
[Application Layer]
• ↓
[Data Layer]
[GitHub] → [Travis CI] → [AWS S3] → [AWS CodeDeploy] → [EC2 Instances]
Component Relationships to Highlight
a. Request Flow:
Client → Nginx → Spring Boot (8081/8082) → Database
b. Authentication Flow:
Client → Spring Security → Google OAuth2 → User Session
c. Deployment Flow:
GitHub → Travis CI → S3 → CodeDeploy → EC2 (Nginx + Spring Boot)
Key Technical Details
a. Application Components:
• Controllers: HelloController, IndexController, PostsApiController
• Services: PostsService
• Repositories: PostsRepository, UserRepository
• Security: SecurityConfig, CustomOAuth2UserService
• Domain: Posts, User entities
b. Infrastructure Details:
• Nginx load balancing between ports 8081 and 8082
• MariaDB RDS connection
• Session management
• AWS EC2 instance configuration
Additional Elements
• Component types
b. Annotations for:
• Port numbers
• Database schemas
• Key configuration files
• API endpoints
Zero-Downtime Deployment Flow
Process of:
Traffic redirection
• The separation of concerns between layers
• The role of each AWS service
• The security implementation
• The zero-downtime deployment strategy
• The test coverage and CI/CD pipeline
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this project unique, such as the zero-downtime deployment strategy and the OAuth2 implementation.