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

Lua coroutine-based program concurrent IO optimization method and system

An optimization method and coroutine technology, applied in the direction of program code conversion, program control design, program control device, etc., can solve the problems of no system-level thread switching overhead, large memory occupation, and many resources, so as to achieve small resource occupation, Preserve the effect of concurrency and facilitate maintenance

Pending Publication Date: 2021-04-30
湖南同有飞骥科技有限公司
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] For genvent, although concurrent IO is realized with the help of greenlet coroutines, there is no system-level thread switching overhead, and the development efficiency is extremely high, but the essence of greenlet coroutines is a supplementary implementation of python's native stack, and the memory usage is still large
[0007] For go-routine, the performance is higher, but some design ideas and characteristics of go (such as compiling, static linking, and built-in GC), which appear in large size and occupy more resources, determine its design adaptation is still General application layer scenarios for large high-end servers

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
  • Lua coroutine-based program concurrent IO optimization method and system
  • Lua coroutine-based program concurrent IO optimization method and system
  • Lua coroutine-based program concurrent IO optimization method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.

[0025] The present invention realizes a concurrent IO optimization scheme that satisfies high concurrency, good maintainability and scalability, and is suitable for scenarios such as low-end server environment applications, system-level software development, and storage development applications.

[0026] see figure 1 , the present invention mainly adopts the following architecture:

[0027] 1. The business code runs in the business layer in the form of Lua coroutine;

[0028] 2. The IO event loop (such as epoll) implemented in C (or other system-level programming language) runs in the core scheduling layer;

[0029] 3. The business layer registers IO operations to...

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 provides a Lua coroutine-based program concurrent IO optimization method and system. The method comprises the following steps: when a service layer needs to execute IO operation, a coroutine running in the service layer circularly submits an IO monitoring request to an IO event through an intermediate interface; and after the IO event circularly waits for an IO handle corresponding to the IO monitoring request to be ready, the IO handle is called to execute a corresponding IO operation. According to the Lua coroutine-based program concurrent IO optimization method and system provided by the invention, a concurrent IO optimization scheme which simultaneously meets high concurrency, maintainability and good expandability can be realized.

Description

technical field [0001] The invention relates to the technical field of parallel processing, in particular to a Lua coroutine-based program concurrent IO optimization method and system. Background technique [0002] Today, with the development of the Internet and improved data, parallel processing of large amounts of data has become a daily basic scenario for servers. Based on this, the server's ability to handle concurrent IO has become an important indicator for judging business performance. [0003] For the requirements of concurrent IO, the traditional two types of solutions are the callback scheme based on asynchronous IO and the parallel scheme based on multi-process (thread). At present, some new solutions have been born in the industry, with their own advantages, such as gevent and go-routine. [0004] For callback schemes based on asynchronous IO (such as select and epoll), the form of callback cuts off the continuous function code context, which makes software deve...

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
IPC IPC(8): G06F9/455G06F9/48G06F9/50G06F8/41
CPCG06F8/443G06F9/45512G06F9/4843G06F9/5027
Inventor 舒克俭杨恒袁鹏飞文中领周泽湘
Owner 湖南同有飞骥科技有限公司
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