Micro-Frontend Routing Architecture for Multi-Framework Loading
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing micro-frontend frameworks rely on inefficient Nginx services for routing, leading to complex disaster recovery solutions and high maintenance costs, and lack support for multi-framework sub-application running and cross-domain resource invocation.
Innovation Solution
A micro-frontend system with an independently maintained Node backend routing registration service, a command line tool, and a micro-frontend running framework that provides routing information, sub-application loading, and deployment capabilities, along with mechanisms for JavaScript sandboxing, cross-domain processing, and communication between applications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If Nginx service is used for routing, then routing functionality is provided, but disaster recovery becomes complex and maintenance cost increases
Solution Approach 1:
The patent segments the monolithic Nginx routing service into multiple independent microservice nodes. Each node operates autonomously and can be independently deployed, maintained, and recovered. This segmentation eliminates the single point of failure problem and simplifies disaster recovery by allowing individual node replacement without affecting the entire routing system.
Solution Approach 2:
The patent changes the operational parameters of the routing service from a single centralized Nginx instance to multiple Node.js microservice instances with dynamic registration and discovery mechanisms. This parameter change enables flexible scaling, improved reliability through redundancy, and simplified maintenance by allowing individual service instances to be updated without restarting the entire system.
2Reliability
If Nginx service is used for routing, then routing functionality is provided, but maintenance cost increases due to configuration modification requirements
Solution Approach 1:
The patent implements a self-service routing architecture where microservice nodes automatically register themselves with the routing service and dynamically update their routing information. This eliminates the need for manual configuration modifications and system restarts when adding or updating services. The routing service automatically discovers new nodes and integrates them into the routing network, significantly reducing maintenance effort and costs.
3Adaptability or versatility
If traditional micro-frontend framework is used, then basic routing is supported, but multi-framework sub-application running and cross-domain resource invocation are not supported
Solution Approach 1:
The patent creates a universal routing service architecture that can handle multiple frontend frameworks (Vue, React, Angular, etc.) and different resource types (HTML, JavaScript, CSS, APIs) through a single unified interface. The service accepts standardized registration requests from diverse sub-applications and provides universal routing capabilities, enabling multi-framework support without requiring framework-specific routing logic or increasing architectural complexity.
Data Source
AI summary
Embodiments of the disclosure provide a micro-frontend system, a sub-application loading method, an electronic device, a computer program product and a computer-readable storage medium. The micro-frontend system includes: a routing registration service, a command line tool and a micro-frontend running framework. The routing registration service is an independently maintained and run Node backend service, configured to provide routing information of a sub-application, a loading manner of the sub-application and deployment information of the sub-application for the micro-frontend running framework of a primary application; the command line tool is configured to provide a sub-application creation function, a sub-application access function and a service registration function through a command line; and the micro-frontend running framework is a framework running in the primary application and is configured to load and run, based on a network request, the sub-application and provide a multi-framework sub-application running ability.


