How pkuhpc/openscow works
Main components
• Frontend/Web Clients:
– apps/portal-web and apps/mis-web (user interfaces and dashboard components)
– Other UI modules in apps/notification and components within libraries (e.g., libs/web)
• Backend Services:
– apps/portal-server for portal business logic and interaction with clusters
– apps/mis-server for managing MIS operations (billing, user models, etc.)
– apps/auth for authentication and user management services
– apps/audit-server for logging and auditing operations
– apps/gateway for API/proxy functions
– Additional utilities such as apps/cli (command-line deployment and management)
• Domain-Specific Services:
– apps/ai for AI compute management with specific configurations and deployment scripts.
– Integration with scheduling systems (e.g. via libs/scheduler-adapter, libs/scowd, and others).
• Supporting Libraries:
– A series of libraries under libs (auth, config, decimal, hook, libconfig, operation-log, protos, server, ssh, web, utils, etc.) that encapsulate shared logic, API definitions, data models, and error handling.
• Infrastructure and Deployment:
– Docker and dev container configurations, Vagrant deployment scripts (deploy/vagrant, dev/vagrant) and configuration files for clusters, authentication, audit, etc.
– Config management for external integrations (clusters’ slurm config, AI configurations, etc.)
Relationships and interactions
• A central audit mechanism is provided by apps/audit-server, receiving logs and operation events from other services.
• The gateway and file proxy services (found in apps/gateway and portal-server’s clusterops) mediate communications between external client requests and the underlying compute clusters (managed by slurm or other schedulers).
• Data persistence is managed behind the scenes (via migrations in apps/ai, apps/audit-server, and mis-server) so include a central database component that many services interact with.
• The deployment and configuration files (seen in deploy/*, docs/*, and dev/* directories) indicate a well-organized orchestration, so show that the entire system sits on top of a deployment infrastructure that uses Docker, Vagrant, and Kubernetes (if applicable).
Architectural patterns and design principles
• Modular/Microservices: Each “app” under the apps directory acts as an independent microservice or web application.
• Separation of Concerns: The presentation layer (web UIs), business logic (portal-server, mis-server, auth, audit-server), and configuration/integration internals (various libs, protos, config files) are clearly separated.
• API-First: Multiple APIs (rest/trpc/gRPC) are used to communicate between services and the front ends.
• Layered Architecture: Presentation (web UIs) → API Gateway → Services (business logic and cluster adapters) → Database/External Systems.
• Extensibility: The use of libraries (under libs) and clearly separated configuration (apps/*/config) allows plug-and-play updates or customization, supporting both open-source and enterprise editions.
Relevant technologies and frameworks
• Frontend: Next.js framework (as seen in next.config files in the portal-web and mis-web apps), React components, and integration for multilingual support (i18n).
• Backend: Node.js with TypeScript, TRPC endpoints, MikroORM for database interactions, and possibly a RESTful architecture.
• DevOps/Deployment: Docker, Vagrant, and CI workflows (.github/workflows) for build/testing/deployment.
• Communication: gRPC or TRPC endpoints for inter-service communications, plus custom protocol buffers defined in the protos directories.