A front-end multi-developer independent running system and method
By introducing a registry center and load balancing components into a multi-person development environment, parallel development by multiple developers was achieved, resolving resource dependency issues, improving development efficiency and resource utilization, and saving project expenses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-03-31
AI Technical Summary
In a multi-person development environment, front-end developers are highly dependent on shared resources, which leads to slower development speeds and periods of inactivity, increasing labor costs.
It adopts an independent operating system for multiple front-end developers, automatically matches request addresses through a registry center, and uses load balancing components and proxy servers to enable parallel development by multiple developers. It also combines hash algorithms and gateways for instance location to reduce resource dependence.
It enables parallel development by multiple developers, improves development efficiency, reduces resource dependency issues, saves project expenses, and enhances positioning efficiency and resource utilization.
Smart Images

Figure CN115766736B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to an independent operating system and method for multiple front-end developers. Background Technology
[0002] In daily multi-person development environments where the front-end and back-end are not separated, when multiple front-end developers finish developing their new features, they rely heavily on shared resources and their needs for the same resources are mutually exclusive. This greatly reduces the development speed, causing developers to be idle during self-testing and increasing labor costs. Summary of the Invention
[0003] To overcome the shortcomings of the above technologies, this invention provides an independent operating system and method for multiple front-end developers, which automatically matches the request addresses initiated by multiple developers to the registration center, enabling parallel development by multiple developers.
[0004] The technical solution adopted by this invention to overcome its technical problems is:
[0005] The first aspect of this invention proposes an independently operating system for multiple front-end developers, comprising at least a front-end and a back-end server that are not separated. The front-end includes at least several independent development platforms, all developed in the same development environment. Each development platform runs a first service, and a first load balancing component corresponding to the first service. The back-end server includes at least a registry center, a gateway connected to the registry center, and a proxy server connected to the gateway. The first load balancing component is used to register instance information corresponding to the first service with the registry center when the first service starts. The proxy server is used to forward network requests from any development platform to the gateway. The gateway is used to search for and confirm the corresponding instance information in the registry center based on the IP address and / or instance name in the received network request. The registry center is also used to notify the gateway and the proxy server to return the instance corresponding to the network request to the corresponding development platform. The first load balancing component is also used to call the returned instance.
[0006] Furthermore, the backend server also includes several second services registered to the registration center, and a second load balancing component corresponding to the second service.
[0007] Furthermore, the proxy server is Nginx, and both the first load balancing component and the second load balancing component are Ribbon.
[0008] The second aspect of this invention proposes a method for the independent operation of a front-end multi-developer system based on the aforementioned independent operation system for multiple front-end developers. Specifically, the method includes: a first development platform starting a corresponding first service and registering the first service with a registration center through a first load balancing component; the registration center storing first instance information corresponding to the first service based on the service name and / or IP address; the first development platform initiating a network request to request the first instance, and filtering and distributing the network request to a gateway through a proxy server; the gateway searching for the first instance in the registration center based on the IP address and / or instance name in the network request; if a corresponding first instance is found, the first development platform returns the first instance through the gateway; otherwise, a second instance is returned based on a preset mechanism.
[0009] Furthermore, the backend server registers the second service with the registration center through the second load balancing component; the registration center stores the instance information corresponding to the second service based on the service name and / or IP address; the first development platform initiates a network request to request the instance information corresponding to the second service, and filters and distributes the network request to the gateway through the proxy server. The gateway searches for the instance information corresponding to the second service in the registration center based on the IP address and / or instance name in the network request; if the instance information corresponding to the second service is found, the first development platform returns the instance information corresponding to the second service through the gateway; otherwise, it returns other instances based on a preset mechanism.
[0010] Furthermore, the preset mechanism includes polling or randomization.
[0011] Furthermore, the gateway obtains a calculated hash value based on the hash algorithm and the IP address in the network request, and then looks up the IP address stored in the registry center based on the calculated hash value.
[0012] The beneficial effects of this invention are:
[0013] 1. In a multi-person development environment where the front-end and back-end are not separated, the dependence of multiple front-end developers on common resources when testing new features after development is completed is reduced. Developers can develop in parallel without waiting for the server to release resources, which solves the problem of dependency on the same resource and improves development efficiency.
[0014] 2. For accessing the same resource, load balancing is performed through the load balancing component Ribbon and the modified gateway Gateway, thereby enabling the corresponding instance to be called by instance name and specified IP.
[0015] 3. The use of a hash algorithm for service location significantly improves location efficiency when dealing with large-scale deployments;
[0016] 4. Using the same set of gateways and other resources for development saves project expenses and makes full use of gateway resources. Attached Figure Description
[0017] Figure 1 A schematic diagram of a non-separated front-end and back-end software architecture pattern;
[0018] Figure 2 This is a schematic diagram of a system architecture where multiple front-end developers can operate independently, according to an embodiment of the present invention.
[0019] Figure 3 This is a schematic diagram of the method flow for multiple developers to run the front end independently, according to an embodiment of the present invention. Detailed Implementation
[0020] First, some abbreviations and key terms mentioned in this invention will be explained.
[0021] Microservice architecture: Microservice architecture breaks down a monolithic application into individual microservices. Each microservice runs in its own process and communicates using lightweight mechanisms, typically HTTP RESTful APIs. These services are divided around business capabilities and deployed independently through automated deployment mechanisms. These services can use different programming languages and different databases to ensure minimal centralized management.
[0022] The service registry is responsible for storing and scheduling services, enabling communication between services and the registry itself, as well as between services themselves. The service registry can be considered the "address book" in a microservice architecture, recording the mapping between services and their addresses. In a distributed architecture, services register here, and when a service needs to call another service, it finds the service's address here and makes the call.
[0023] API Gateway: An API gateway is a system that sits in front of an application or service (providing a REST API interface service). It manages authorization, access control, and traffic restrictions, thus protecting the REST API interface service and making it transparent to all callers. Therefore, the business systems hidden behind the API gateway can focus on creating and managing services without having to deal with these strategic infrastructure issues.
[0024] Nginx: A unified entry point for proxy services. It is a high-performance, lightweight web server, reverse proxy server, and email (IMAP / POP3) proxy server.
[0025] Ribbon's main function is to provide client-side software load balancing algorithms and service calls. The Ribbon client component offers a comprehensive set of configuration options, such as connection timeout and retries. Simply put, you list all the machines behind the LoadBalancer (LB) in the configuration file, and Ribbon will automatically help you connect to these machines based on certain rules (such as simple round-robin, random connections, etc.). We can easily use Ribbon to implement custom load balancing algorithms.
[0026] Front-end / back-end not separated software architecture: In this architecture, the effects seen on the front-end are controlled by the back-end, which renders or redirects the page. In other words, the back-end needs to control the front-end display, resulting in a high degree of coupling between the front-end and back-end. A diagram illustrating this front-end / back-end not separated software architecture is shown below. Figure 1 As shown.
[0027] To facilitate a better understanding of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The following are merely exemplary and do not limit the scope of protection of the present invention.
[0028] For example Figure 2 Taking the schematic diagram of the independent operating system architecture for multiple front-end developers as an example, the independent operating system for multiple front-end developers of the present invention includes a front-end development platform and a back-end server that are not separated from the back-end. The front-end development platform includes several independent development platforms, all of which are developed based on the same development environment. Each development platform runs a first service, and a first load balancing component corresponding to the first service. The back-end server includes a registration center, a gateway connected to the registration center, and a proxy server connected to the gateway. The first load balancing component is used to register the instance information corresponding to the first service to the registration center when the first service starts. The proxy server is used to forward network requests from any development platform to the gateway. The gateway is used to search for and confirm the corresponding instance information in the registration center based on the IP address and / or instance name in the received network request. The registration center is also used to return the instance corresponding to the network request to the corresponding development platform through the gateway and the proxy server. The first load balancing component is also used to call the returned instance.
[0029] Figure 2 The diagram shows four independent development platforms, operated by four developers: A, B, C, and D. The IP addresses corresponding to each platform are 192.168.0.101, 192.168.0.102, 192.168.0.103, and 192.168.0.104, respectively.
[0030] Developers A, B, C, and D develop software on their respective development platforms, and thus start services A1, A2, A3, and A4 respectively. They then register their respective services with the registry center through the first load balancing component, Ribbon. The registry center stores the service addresses and IP addresses corresponding to services A1-A4 respectively.
[0031] Developer A opens a local web browser and initiates a network request to the Nginx proxy server. All requests are proxied by Nginx, which performs initial filtering and distribution. The network request is then proxied to the microservice gateway. Upon receiving the request, the gateway checks the service registry for an instance with the same IP address as developer A. If a matching instance is found, the gateway is notified, and it either returns the corresponding instance or uses the first load balancer to download the instance to its local machine for execution. If no matching instance is found, a round-robin approach or a randomly selected instance is returned.
[0032] In some embodiments, the backend server of the present invention further includes several second services registered to the registration center, and a second load balancing component corresponding to the second services. The second load balancing component is Ribbon.
[0033] Another aspect of the present invention also proposes a method for independent operation of multiple front-end developers based on the aforementioned front-end multi-developer independent operation system. Specifically, the method includes: a first development platform starting a corresponding first service and registering the first service with a registration center through a first load balancing component; the registration center storing first instance information corresponding to the first service based on the service name and / or IP address; the first development platform initiating a network request to request the first instance, and filtering and distributing the network request to a gateway through a proxy server; the gateway searching for the first instance in the registration center based on the IP address and / or instance name in the network request; if the corresponding first instance is found, the first instance is returned through the gateway and proxy server; otherwise, a second instance is returned based on a preset mechanism; and the first development platform calling the returned instance through the first load balancing component.
[0034] The main improvement is achieved by modifying the gateway's processing logic, allowing multiple developers to work simultaneously without relying on other services.
[0035] by Figure 2 Taking the system architecture shown as an example, for Figure 3 The process of how multiple front-end developers can run the process independently will be explained in sequence.
[0036] S1, the first development platform starts the corresponding first service and registers the first service with the registration center through the first load balancing component.
[0037] Developers A, B, C, and D develop software on their respective computers, and thus start services A1, A2, A3, and A4 respectively, and register the corresponding services with the registry center through the first load balancer Ribbon.
[0038] In one embodiment of the present invention, the project is a front-end and back-end non-separated project, so the static resource files of the front-end, such as HTML, CSS, and JS, all need to access local resources. Developer A develops service A1 on its development platform. Service A1 is registered with the registry center through the first load balancer Ribbon. The registry center stores the instance information corresponding to service A1, including the service address and the IP address of service A1.
[0039] For example, when developing page A, the generated HTML and JS static resource files are saved on developer A's local development platform. Similarly, when developer B develops page B, the generated HTML and JS static resource files are saved on their local computer B. When developer A or developer B starts the service on their own development platform, the corresponding service is registered with the registry center. Furthermore, the static resource location is configured in the development tools for easy access.
[0040] S2, the registry center saves the first instance information corresponding to the first service based on the service name and IP address.
[0041] The registry center stores the service address and IP address corresponding to each service.
[0042] In some implementations, the instances of services A1, A2, A3, and A4 registered in the registry center may have the same instance name, but each instance has a different IP address.
[0043] S3, the first development platform initiates a network request to request the first instance, and filters and distributes the network request to the gateway through the proxy server. The gateway searches for the first instance in the registry center based on the IP address and / or instance name in the network request.
[0044] In some implementations, when developer A wants to generate a page, he accesses a proxy server through a web browser. The proxy server distributes developer A's network request to the gateway. After receiving the request, the gateway looks up the IP address in the request header of the HTTP protocol in the registry center.
[0045] Before adopting Benming's technical solution, if developer A only accesses through the microservice gateway, the static resource files in the registry will be randomly accessed, and the code written by developer A cannot be implemented and will only be returned to service A1.
[0046] The technical solution of this invention, by modifying the processing logic of the microservice gateway, ensures that the code developed by developer A is only visible to developer A, and other developers cannot see the code they developed.
[0047] S4. If the corresponding first instance is found, the first development platform returns the first instance through the gateway and proxy server; otherwise, it returns the second instance based on the preset mechanism.
[0048] If a request with the same IP address can be found in the registry, the corresponding instance will be returned.
[0049] In some implementations, if service A is accessed via the web, the static resource files required to generate the page are returned.
[0050] The preset mechanism can be either polling or random.
[0051] The corresponding instance is downloaded to the local machine from the registry center. When called, it is invoked through Ribbon and can also implement load balancing algorithms such as round-robin and LRU.
[0052] In some implementations, if developer A opens a web browser and sends a request to nginx, service A1 is the software being developed. If A1 modifies its code during development, developer A will call the local service A1. However, since the service is called through the microservice gateway running on the server, regardless of the version of service A1's code, it will not affect other developers.
[0053] Especially for applications with a limited number of servers but a large number of requested resources, using a single server to run the registry, gateway, ribbon, and nginx saves project expenses and makes full use of resources by sharing the same set of gateway, nginx, CAS, and other resources.
[0054] In some implementations, this also includes inter-service calls, where one backend service calls another. In this case, the microservice gateway first filters by service name and then makes the call based on the IP address of the requested service. The basic principle of the call is to prioritize calling local services and resources.
[0055] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0056] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
Claims
1. A method for front-end multi-developer independent running, characterized in that, Specifically comprising: The first development platform starts the corresponding first service, and registers the first service to the registration center through the first load balancing component; The registration center saves the first instance information corresponding to the first service based on the service name and / or IP address; The first development platform initiates a network request for requesting the first instance, and filters and distributes the network request to the gateway through the proxy server, and the gateway finds the first instance based on the IP address and / or instance name in the network request to the registration center; If the corresponding first instance is found, the first development platform returns the first instance through the gateway; Otherwise, a second instance is returned based on a preset mechanism; The background server also registers the second service to the registration center through the second load balancing component; The registration center saves the instance information corresponding to the second service based on the service name and / or IP address; The first development platform initiates a network request for requesting the instance information corresponding to the second service, and filters and distributes the network request to the gateway through the proxy server, and the gateway finds the instance information corresponding to the second service based on the IP address and / or instance name in the network request to the registration center; If the instance information corresponding to the second service is found, the first development platform returns the instance information corresponding to the second service through the gateway; otherwise, other instances are returned based on a preset mechanism.
2. The method of claim 1, wherein, The preset mechanism includes polling or random.
3. The method of claim 2, wherein, The gateway obtains a calculated hash value based on a hash algorithm and the IP address in the network request, and finds the IP address saved by the registration center based on the calculated hash value.
4. A front-end multi-developer independent running system for running the front-end multi-developer independent running method according to any one of claims 1-3, comprising at least a front-end and a back-end service end without separation of front-end and back-end, characterized in that, The development front end includes at least several independent development platforms, and each development platform is developed based on the same development environment, any of the development platforms runs the first service, and the first load balancing component corresponding to the first service; The background server includes at least the registration center, the gateway connected to the registration center, and the proxy server connected to the gateway; The first load balancing component is used to register the instance information corresponding to the first service to the registration center when the first service is started; The proxy server is used to forward the network request of any development platform to the gateway, and the gateway is used to find and confirm the corresponding instance information based on the IP address and / or instance name in the received network request to the registration center; The registration center is also used to notify the gateway and the proxy server to return the instance corresponding to the network request to the corresponding development platform; The first load balancing component is also used to call the returned instance.
5. The front-end multi-developer independent running system of claim 4, wherein The background server also includes several second services registered to the registration center, and the second load balancing component corresponding to the second service. The proxy server is Nginx, and the first load balancing component and the second load balancing component are both Ribbon.
6. The front-end multiple developer's standalone system of claim 5, wherein,
Citation Information
Patent Citations
Cloud platform expansion method and system based on micro-service architecture
CN108650262A
Method for directionally calling each version of micro-service based on Spring Gateway
CN110716815A