How ouqiang/gocron works
Main Components
a) Frontend Layer:
• Vue.js based web interface (located in /web/vue)
• Element UI components integration
• API communication layer
b) Backend Components:
• Main Server (gocron)
• Node Agents (gocron-node)
• Database (MySQL)
• RPC Communication Layer
c) Integration Services:
• Notification Systems (Email, Slack, Webhook)
• HTTP Client for external task execution
Architecture Representation
[User Interface Layer]
[API/Router Layer]
[Service Layer]
[Data Layer]
[Node Communication]
Component Details
a) UI Layer (Blue):
• Vue.js Frontend
• Element UI Components
• Web Router
• API Client
b) API/Router Layer (Green):
• HTTP Endpoints (/internal/routers)
• Authentication
• Task Management
• Host Management
• User Management
c) Service Layer (Yellow):
• Task Scheduler
• Task Executor
• Notification Service
• RPC Service
d) Data Layer (Purple):
• MySQL Database
• Models (Task, User, Host, etc.)
e) Node Communication (Orange):
• gRPC Protocol
• Node Pool Management
• Authentication/Certification
Connection Flows
• HTTP/API calls between frontend and backend
• gRPC communication between main server and nodes
• Database interactions
• External service calls (notifications)
Technical Details
Technologies:
• Macaron Web Framework
• XORM
• gRPC
• Cron Scheduler
• Vue.js + Element UI
Integration points
Keep the abstraction level high enough to be understandable but detailed enough to show the system's complexity and distributed nature. Focus on showing how the scheduler coordinates with nodes and how tasks are managed and executed across the system.
Remember to include the notification system's integration points and the security layer between components, as these are crucial aspects of the system's architecture.