CN113535396B - Cloud application non-service architecture implementation system and method - Google Patents

Cloud application non-service architecture implementation system and method Download PDF

Info

Publication number
CN113535396B
CN113535396B CN202110795097.XA CN202110795097A CN113535396B CN 113535396 B CN113535396 B CN 113535396B CN 202110795097 A CN202110795097 A CN 202110795097A CN 113535396 B CN113535396 B CN 113535396B
Authority
CN
China
Prior art keywords
http
function service
cloud
http request
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110795097.XA
Other languages
Chinese (zh)
Other versions
CN113535396A (en
Inventor
钱晓林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tibet Ningsuan Technology Group Co ltd
Original Assignee
Tibet Ningsuan Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tibet Ningsuan Technology Group Co ltd filed Critical Tibet Ningsuan Technology Group Co ltd
Priority to CN202110795097.XA priority Critical patent/CN113535396B/en
Publication of CN113535396A publication Critical patent/CN113535396A/en
Application granted granted Critical
Publication of CN113535396B publication Critical patent/CN113535396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a cloud application non-service architecture realization system and a cloud application non-service architecture realization method. The HTTP trigger module is used for monitoring an HTTP request sent by a user to a network through a browser in real time, triggering the starting and closing of the function service, triggering the function service when the HTTP request exists, and closing the function service when the HTTP request does not exist in a period of time; the function service module is used for processing an HTTP request sent by a user, namely pulling a cloud front-end code and returning the cloud front-end code to the browser through the HTTP trigger module; the database service module is used for storing other data required by the browser when the cloud front-end code is executed. According to the invention, the state of the function service is monitored in real time through the HTTP trigger to realize automatic expansion and contraction, and the number of the function service can be reduced to 0 when no network request exists, so that the cloud resources are thoroughly released, and the effective utilization of the resources is realized.

Description

Cloud application non-service architecture implementation system and method
Technical Field
The invention relates to a cloud application non-service architecture realization system and a cloud application non-service architecture realization method, and belongs to the technical field of cloud non-service architecture realization.
Background
The existing front-end project deployment needs to start at least one container all the time at the cloud end, and a user accesses the container through the browser to acquire a front-end static file and display the front-end static file on the browser. The disadvantage is that the container needs to be always opened regardless of whether the user accesses the container currently, and resources of the cloud are wasted.
In response to the above drawbacks, the industry exists for front-end deployments that respond to user network requests by launching a web container. The existing Faas technology is to execute a stateless function in a cloud, and dynamically expand and contract a function instance of the cloud through a function trigger. However, the execution of the function still needs to consume cloud resources, so that the cloud resources cannot be saved maximally in the prior art.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the invention provides a cloud application non-service architecture implementation system and a cloud application non-service architecture implementation method, which reduce the number of containers to zero when no user accesses through dynamic expansion and contraction, so that the waste of cloud resources is reduced.
The invention adopts the following technical scheme for solving the technical problems:
the cloud application non-service architecture implementation system comprises an HTTP trigger module, a function service module and a database service module;
the HTTP trigger module is used for monitoring an HTTP request sent by a user to a network through a browser in real time, intercepting the HTTP request when the HTTP request is monitored, checking whether available function services exist in the running function service examples, and starting a new function service example if the available function services do not exist; if available function service exists, the http request is transferred to a function service module;
the function service module is used for processing an HTTP request sent by a user, namely pulling a cloud front-end code and returning the cloud front-end code to the browser through the HTTP trigger module;
the HTTP trigger module is also used for transferring cloud front-end codes returned by the function service module to the browser;
the database service module is used for storing other data required by the browser when executing the cloud front-end code;
the HTTP trigger module is also used for starting a timer corresponding to the function service instance while starting a new function service instance, and when the timer reaches a specified time and the function service instance is not dispatched with a new HTTP request, the HTTP trigger module closes the function service instance and releases cloud resources; and if the function service instance is dispatched with a new HTTP request within the appointed time of the timer, the HTTP trigger module resets the timer to make the timer count again.
As a preferred embodiment of the system of the present invention, the specified time is configured to be 2 minutes.
A cloud application non-service architecture implementation method is implemented based on a cloud application non-service architecture implementation system, and comprises the following steps:
step 1, a user sends an http request to a network through a browser;
step 2, the HTTP trigger module monitors an http request sent by a user in real time, intercepts the http request when the http request is monitored, and simultaneously checks whether available function services exist in the running function service instance, if not, the step 3 is carried out, and if so, the step 4 is carried out;
step 3, the HTTP trigger module starts a new function service instance, and at the same time, starts a timer corresponding to the function service instance, if the function service instance is not dispatched with a new http request within a specified time, step 5 is performed, and if the function service instance is dispatched with a new http request, step 6 is performed;
step 4, transferring the HTTP request sent by the user to a function service module, and processing the HTTP request by the function service module, namely pulling a cloud front-end code and returning the cloud front-end code to the browser through an HTTP trigger module;
step 5, when the appointed time is reached, the HTTP trigger module closes the function service instance and releases cloud resources;
and 6, resetting the timer by the HTTP trigger module to make the timer count again.
As a preferred embodiment of the method of the present invention, the specified time is configured to be 2 minutes.
A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the cloud application out-of-service architecture implementation method when the computer program is executed.
A computer readable storage medium storing a computer program which when executed by a processor implements the steps of the cloud application out-of-service architecture implementation method.
Compared with the prior art, the technical scheme provided by the invention has the following technical effects:
1. the invention realizes automatic expansion and contraction by monitoring the state of the function service in real time through the HTTP trigger, reduces the number of the function service to 0 when no network request exists, thoroughly releases the cloud resources, and realizes the effective utilization of the resources
2. The invention fully utilizes the high-performance characteristic of the browser to divide the calculation task to the user side so as to relieve the cloud pressure.
Drawings
Fig. 1 is an overall architecture diagram of a cloud application service-free architecture implementation method of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings. The embodiments described below by referring to the drawings are exemplary only for explaining the present invention and are not to be construed as limiting the present invention.
According to the method and the device, the function instance is transmitted to the user browser through the network request, and the corresponding function and method are executed through the browser, so that cloud resources are saved to the greatest extent. The resource utilization rate of the front-end project at the cloud end is maximized, the resources of the user browser are fully utilized, and the resource utilization pressure of cloud service is reduced.
The invention provides a cloud application non-service architecture realization system which mainly comprises an HTTP trigger module, a function service module and a database service module.
The HTTP trigger is mainly responsible for monitoring browser requests in real time, triggering the starting and closing of function services, triggering the function services when HTTP requests exist, and closing the function services when the HTTP requests do not exist in a period of time.
The function service is mainly responsible for pulling the cloud front-end code and returning the cloud front-end code to the browser database service through the HTTP trigger, and is mainly responsible for data request and cloud storage of normal business.
As shown in fig. 1, an architecture diagram of a cloud application service-free architecture implementation method provided by the invention is implemented by the following steps:
1. a user accesses a web application through a browser;
2. the HTTP trigger intercepts the HTTP request and checks if there is a function service available in the running function service instance (if the currently started function service is all busy, it is considered that there is no function service available). Step 3 is not carried out, and step 4 is carried out if the step is not carried out;
3. the HTTP trigger starts a function service instance;
4. the HTTP trigger transfers the network request to the function service, and the function service processes the request and returns the front-end code to the trigger;
5. the trigger transmits the result returned by the function service to the browser;
6. when the browser executes the front-end code, if other data are needed, the browser can request the data stored in the database service module;
7. the function service is automatically closed when no request is received within a period of time, and cloud resources are released.
Function service automatic closing implementation mode: the HTTP trigger starts a timer at the same time as the function service is started, and when the timer reaches a specified time, the function service starts a shutdown process without any request being dispatched, and when a dispatch request is dispatched within the specified time, the time of the timer is reset and reckoned. The specified time is: user configurable, default to 2 minutes.
The function service can automatically close and release the cloud resources after a period of time is idle, and can automatically expand capacity when busy, so that the effect of fully utilizing the cloud resources is achieved.
The function service only can speak the front-end code to return to the browser, and the calculation and the processing in the specific code are given to the browser of the user, so that the using pressure of cloud resources is further reduced.
The above embodiments are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereto, and any modification made on the basis of the technical scheme according to the technical idea of the present invention falls within the protection scope of the present invention.

Claims (6)

1. The cloud application non-service architecture implementation system is characterized by comprising an HTTP trigger module, a function service module and a database service module;
the HTTP trigger module is used for monitoring an HTTP request sent by a user to a network through a browser in real time, intercepting the HTTP request when the HTTP request is monitored, checking whether available function services exist in the running function service examples, and starting a new function service example if the available function services do not exist; if available function service exists, the http request is transferred to a function service module;
the function service module is used for processing an HTTP request sent by a user, namely pulling a cloud front-end code and returning the cloud front-end code to the browser through the HTTP trigger module;
the HTTP trigger module is also used for transferring cloud front-end codes returned by the function service module to the browser;
the database service module is used for storing other data required by the browser when executing the cloud front-end code;
the HTTP trigger module is also used for starting a timer corresponding to the function service instance while starting a new function service instance, and when the timer reaches a specified time and the function service instance is not dispatched with a new HTTP request, the HTTP trigger module closes the function service instance and releases cloud resources; and if the function service instance is dispatched with a new HTTP request within the appointed time of the timer, the HTTP trigger module resets the timer to make the timer count again.
2. The cloud application out-of-service architecture implementation system of claim 1, wherein the specified time is configured to be 2 minutes.
3. The cloud application non-service architecture implementation method based on the cloud application non-service architecture implementation system of claim 1 is characterized by comprising the following steps:
step 1, a user sends an http request to a network through a browser;
step 2, the HTTP trigger module monitors an http request sent by a user in real time, intercepts the http request when the http request is monitored, and simultaneously checks whether available function services exist in the running function service instance, if not, the step 3 is carried out, and if so, the step 4 is carried out;
step 3, the HTTP trigger module starts a new function service instance, and at the same time, starts a timer corresponding to the function service instance, if the function service instance is not dispatched with a new http request within a specified time, step 5 is performed, and if the function service instance is dispatched with a new http request, step 6 is performed;
step 4, transferring the HTTP request sent by the user to a function service module, and processing the HTTP request by the function service module, namely pulling a cloud front-end code and returning the cloud front-end code to the browser through an HTTP trigger module;
step 5, when the appointed time is reached, the HTTP trigger module closes the function service instance and releases cloud resources;
and 6, resetting the timer by the HTTP trigger module to make the timer count again.
4. The method for implementing a cloud application no-service architecture according to claim 3, wherein the specified time is configured to be 2 minutes.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the cloud application no-service architecture implementation method of any of claims 3-4.
6. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the cloud application no-service architecture implementation method according to any of claims 3-4.
CN202110795097.XA 2021-07-14 2021-07-14 Cloud application non-service architecture implementation system and method Active CN113535396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110795097.XA CN113535396B (en) 2021-07-14 2021-07-14 Cloud application non-service architecture implementation system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110795097.XA CN113535396B (en) 2021-07-14 2021-07-14 Cloud application non-service architecture implementation system and method

Publications (2)

Publication Number Publication Date
CN113535396A CN113535396A (en) 2021-10-22
CN113535396B true CN113535396B (en) 2023-08-15

Family

ID=78099071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110795097.XA Active CN113535396B (en) 2021-07-14 2021-07-14 Cloud application non-service architecture implementation system and method

Country Status (1)

Country Link
CN (1) CN113535396B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199150A (en) * 2020-08-13 2021-01-08 北京航空航天大学 Online application dynamic capacity expansion and contraction method based on micro-service calling dependency perception
CN112291104A (en) * 2020-12-30 2021-01-29 望海康信(北京)科技股份公司 Micro-service automatic scaling system, method and corresponding equipment and storage medium
CN112532683A (en) * 2020-10-30 2021-03-19 北京盛和信科技股份有限公司 Edge calculation method and device based on micro-service architecture
US11023558B1 (en) * 2020-04-03 2021-06-01 International Business Machines Corporation Executing functions on-demand on a server utilizing web browsers

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111279314A (en) * 2017-09-30 2020-06-12 甲骨文国际公司 Providing tenant isolation in a multi-tenant API gateway using micro-service containers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11023558B1 (en) * 2020-04-03 2021-06-01 International Business Machines Corporation Executing functions on-demand on a server utilizing web browsers
CN112199150A (en) * 2020-08-13 2021-01-08 北京航空航天大学 Online application dynamic capacity expansion and contraction method based on micro-service calling dependency perception
CN112532683A (en) * 2020-10-30 2021-03-19 北京盛和信科技股份有限公司 Edge calculation method and device based on micro-service architecture
CN112291104A (en) * 2020-12-30 2021-01-29 望海康信(北京)科技股份公司 Micro-service automatic scaling system, method and corresponding equipment and storage medium

Also Published As

Publication number Publication date
CN113535396A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN106407031B (en) A kind of RAM leakage localization method and electronic equipment
CN107479990A (en) Distributed software service system
CN108595282A (en) A kind of implementation method of high concurrent message queue
US9231995B2 (en) System and method for providing asynchrony in web services
CN101741912A (en) Method, network apparatus and distributed network system for processing computation task
CN111427751A (en) Method and system for processing service based on asynchronous processing mechanism
CN110958281A (en) Data transmission method and communication device based on Internet of things
CN110071880A (en) Message forwarding method, retransmission unit, server and storage medium
CN111143069A (en) Service management method, device, electronic equipment and storage medium
CN111459681B (en) Dynamic elastic telescoping method based on micro-service load
CN102446144A (en) Method, device and system for scheduling serial port resources
CN102385536A (en) Method and system for realization of parallel computing
CN113535396B (en) Cloud application non-service architecture implementation system and method
CN106547566B (en) Communications service process pool management method and system
CN109388501B (en) Communication matching method, device, equipment and medium based on face recognition request
CN108667920B (en) Service flow acceleration system and method for fog computing environment
CN114827033B (en) Data flow control method, device, equipment and computer readable storage medium
CN105528024A (en) Electronic device for internet protocol communications
US10250515B2 (en) Method and device for forwarding data messages
CN106997304B (en) Input and output event processing method and device
CN111090627B (en) Log storage method and device based on pooling, computer equipment and storage medium
CN101349975A (en) Method for implementing interrupt bottom semi-section mechanism and embedded system thereof
CN106991119A (en) Processing data method and device based on distributed file system
CN115022243B (en) Data flow control method, device and system, electronic equipment and storage medium
CN111026809A (en) Distributed execution system for scheduling process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230224

Address after: 11 / F, Liuwu building, Liuwu New District, Lhasa City, Tibet Autonomous Region, 850000

Applicant after: Tibet ningsuan Technology Group Co.,Ltd.

Address before: 210033 building A1, Huizhi Science Park, 8 Hengtai Road, Qixia District, Nanjing City, Jiangsu Province

Applicant before: DILU TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant