Processing method and system from WebSocket to foreground

A processing system and processing mechanism technology, applied in the transmission system, digital transmission system, data exchange network, etc., can solve problems such as waste, and achieve the effect of less data transmission and reduced bandwidth resources

Pending Publication Date: 2020-08-28
山东汇贸电子口岸有限公司
11 Cites 2 Cited by

AI-Extracted Technical Summary

Problems solved by technology

However, the HTTP request may contain a long header, and the real valid data in this long...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention relates to the field of Devops assembly lines at an angular front end, and particularly provides a processing method and system from WebSocket to a front end. The system client sends WebSocket connection to a server, and the server responds, the client and the server directly exchange data, and the server regularly detects whether the Pipeline state of Jenkins changes or not and displays the state in a page. Compared with the prior art, the processing method and system based on WebSocket to the front endcan effectively reduce data transmission and bandwidth resources, can monitorthe Pipeline state of Jenkins in real time and display the Pipeline state in a foreground page, and have good popularization value.

Application Domain

Technology Topic

Image

  • Processing method and system from WebSocket to foreground

Examples

  • Experimental program(1)

Example Embodiment

[0022] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.
[0023] A best embodiment is given below:
[0024] The WebSocket protocol used in the present invention supports full-duplex communication between a client (which runs untrusted code in a controlled environment) and a remote host (which chooses to join the code for communication). The security model used for this is the original-based security model commonly used by web browsers. The protocol includes an open handshake and subsequent message frames on the TCP layer. The goal of this technology is for browser-based, two-way communication with the server (the server cannot rely on opening multiple HTTP connections (for example, using XMLHttpRequest or And long polling)) The application provides a communicator.
[0025] Jenkins is an open source software project, a continuous integration tool based on Java, used to monitor continuous repetitive work, and aims to provide an open and easy-to-use software platform that makes continuous software integration possible.
[0026] Such as figure 1 As shown, the processing method based on WebSocket to the foreground in this embodiment, the client sends a WebSocket connection to the server, the server responds, the client and the server directly exchange data, the server regularly detects whether the Jenkins pipeline status has changed, and The status is displayed on the page.
[0027] It includes the following steps:
[0028] S1. The client sends a WebSocket connection to the server in URL format;
[0029] S2. The server responds to the WebSocket request sent by the client and establishes a long connection. The client and server can directly exchange data via TCP;
[0030] S3. The server background regularly monitors the changes in the pipeline status of Jenkins. If the pipeline status does not change, continue to detect;
[0031] S4. If the server backend regularly monitors the Jenkins Pipeline status for changes, the server integrates a piece of Pipeline data through the agreed data format, and sends the integrated Pipeline data to the client, and the client uses the unique identifier of the Pipeline to match the corresponding Pipeline, update the corresponding piece of Pipeline data, and display the status change of the Pipeline on the foreground page;
[0032] S5. The client will periodically monitor the readyState of the WebSocket. If the readyState of the WebSocket is CONNECTING or OPEN, no processing will be performed;
[0033] S6. When the client periodically monitors the readyState of the WebSocket, if the readyState of the WebSocket is CLOSING or CLOSED, the connection is re-established to the client.
[0034] The system that implements the above method is a processing system based on WebSocket to the foreground. The system includes a client and a server. The client is used to send a WebSocket connection to the server in URL format via TCP. The server is used to respond to the client's connection and periodically detect Jenkins Whether the pipeline status has changed, and display the status on the page.
[0035] The server backend is used to periodically monitor the changes in the pipeline status of Jenkins. If the changes in the pipeline status do not change, continue to detect;
[0036] If the status of the Pipeline changes, the server is used to integrate a piece of Pipeline data through the agreed data format and send the integrated Pipeline data to the client, which is used to match the corresponding Pipeline through the unique identifier of the Pipeline, Update the corresponding piece of Pipeline data, and display the status change of the Pipeline on the foreground page.
[0037] The client is also used to periodically monitor the readyState of the WebSocket. If the readyState of the WebSocket is CONNECTING or OPEN, no processing is performed;
[0038] If the readyState of the WebSocket is CLOSING or CLOSED, the connection is re-established to the backend.
[0039] The above-mentioned specific implementations are only specific cases of the present invention. The scope of patent protection of the present invention includes but is not limited to the above-mentioned specific implementations. Anything that complies with the present invention’s WebSocket-based processing method and system claims and any Appropriate changes or substitutions made by those of ordinary skill in the technical field shall fall within the scope of patent protection of the present invention.
[0040] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention. And variations, the scope of the present invention is defined by the appended claims and their equivalents.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Micro-grid control method, computer equipment, storage medium and micro-grid system

InactiveCN112350385AReduce data transferSave network resourcesAc-dc network circuit arrangementsAc network circuit arrangementsComputer equipmentPower grid
Owner:恒创锦思(深圳)科技有限公司

Classification and recommendation of technical efficacy words

  • Reduce data transfer
  • Save bandwidth resources

Method for keeping snapshot image in a storage system

ActiveUS20060085663A1Reduce data transferReduce unnecessary consumptionError detection/correctionMemory systemsData transmissionOperating system
Owner:GOOGLE LLC

Blade detection method based on line structured light

ActiveCN110926364AReduce mistakesReduce data transferUsing optical meansGlobal coordinate systemEngineering
Owner:SICHUAN UNIV

Method and system for realizing realtime transmission protocol message redundancy

ActiveCN101030832ASave bandwidth resourcesGuaranteed service QoS requirementsError preventionReal-time Transport ProtocolReal-time computing
Owner:HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products