Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, device, server and storage medium for realizing reentrant PHP kernel

A core and memory technology, applied in the computer field, can solve problems such as the inability to reuse business codes and low development efficiency, and achieve the effect of improving concurrent processing capabilities

Active Publication Date: 2022-05-17
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the traditional programming mode based on event asynchronous callback processing is very inefficient in the scenario of processing complex business logic; and the original business code cannot be reused

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device, server and storage medium for realizing reentrant PHP kernel
  • Method, device, server and storage medium for realizing reentrant PHP kernel
  • Method, device, server and storage medium for realizing reentrant PHP kernel

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0026] The embodiment of the present invention provides a PHP kernel framework. The PHP kernel can be Zend Engine (PHP official engine). see figure 1 , the PHP kernel includes: Zend API (Application Programming Interface, application programming interface), Executor (actuator), Garbage Collector (garbage collector), Compiler (encoder), Language Parser (language analyzer), Language Lexer ( Language Dictionary), Mem Manager (Memory Manager) and TSRM (Thread Safe Resource Manager, Thread Safe Resource Manager).

[0027] Among them, Mem Manager is used to implement memory management of the entire PHP kernel; Language Lexer is used to implement lexical analysis of PHP scripts; Language Parser is used to implement syntax analysis of PHP sc...

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 Login to View More

Abstract

The invention discloses a method, a device, a server and a storage medium for realizing reentrant PHP kernel, and belongs to the technical field of computers. The method includes: when the server receives a processing request, assigning a coroutine to the PHP kernel to be re-entered; running the PHP kernel through the coroutine to obtain a running instance of the PHP kernel; according to the global instance of the PHP kernel table, select an instance ID of an idle instance, store at least one instance ID and the corresponding relationship of the instance state in the global instance table; according to the instance ID, switch the running instance of the PHP kernel to the selected idle instance, And according to the instance identifier, switch the access to the structure pointer resource in the PHP kernel to the resource corresponding to the idle instance. The invention realizes the reentrancy of the PHP kernel, makes the PHP kernel have the feature of coroutine, and improves the concurrent processing capability of the PHP kernel.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method, device, server and storage medium for realizing reentrant PHP kernel. Background technique [0002] In a multi-threaded environment, PHP-FPM (FastCGI Process Manager, FastCGI Process Manager) is generally used to process the processing request. When PHP-FPM receives a processing request, it will allocate a service process for the processing request. The service process uses the processing mode of synchronous blocking IO (Input / Output, input / output) for processing, but the processing mode of synchronous blocking IO is serious Limits the processing capacity of PHP-FPM to handle high concurrent requests. The most effective way to improve concurrency is to asynchronously handle IO. The traditional method of asynchronous IO processing is often implemented based on event asynchronous callback processing. However, the traditional programming mode based on event asynchrono...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/48
CPCG06F9/4881
Inventor 郑榕孙琦
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products