02 Semi-synchronous semi-reactor thread pool

Basic framework of server programming It is mainly composed of I/O units, logic units and network storage units, and each unit communicates through request queues to complete tasks cooperatively. Among them, the I/O unit is used to handle client connections and read and write network data; the logic unit is used to process business logic […]

Semi-synchronous semi-reactor thread pool (3)

This chapter explains the basic knowledge involved in the thread pool, including the basic framework of the server, I/O model, event processing mode, etc. It mainly introduces the knowledge involved in the server project. If you want to know more about it, please refer to “High Performance Server Programming under Linux”. 1. Basic framework of […]

[TinyWebServer source code analysis] (2) Semi-synchronous semi-reactor thread pool

This article is an analysis of the source code of tens of thousands of star projects on github, for everyone to learn and communicate project address: https://github.com/qinguoyi/TinyWebServer 2. Semi-synchronous semi-reactor thread pool (threadpool) Semi-synchronous/half-reactor thread pool ================= Using a work queue completely decouples the main thread from the worker threads: the main thread inserts tasks […]

How ObjectARX monitors entity double-click events (using hook functions or reactors)

Table of Contents 1 Implementation method 1 – hook function 1.1 The role of the hook function 1.2 Use the hook function to monitor the double-click event 2 Implementation Method 2 – Reactor 2.1 The role of the reactor 2.2 Using the editor reactor to monitor double-click events ?In the development of ObjectARX, it is […]

Research and Implementation of High Performance Network Model Multiple Reactor + ThreadPool

Article directory foreword 1. MainReactor class Constructor Connect and listen Create an epoll instance and enter the main loop Two, SubReactor class Constructor monitor start up server test Simple client implementation Foreword Prerequisite knowledge to complete this project: The principle and implementation of thread pool In-depth analysis of io multiplexing principle Implementation of io multiplexing […]

2.2 Event-driven reactor network design model

Various network I/O methods are introduced in network io, io multiplexing select/poll/epoll, and event-driven reactor, especially event-driven reactor. Its development efficiency is higher than using IO multiplexing directly. It is generally single-threaded, and the design goal is to hope that one thread can use all the resources of the CPU. The main function of IO […]

[Netty] Reactor model (10)

Article directory foreword 1. Design model of traditional services 2. NIO distribution model 3. Reactor model 3.1. Process of Reactor processing requests 3.2. Three roles of Reactor 4. Single Reactor single thread model 4.1. Message processing flow 4.2. Disadvantages 5. Single Reactor multithreading model 5.1. Message processing flow 5.2. Disadvantages 6. Master-slave Reactor multithreading model […]

Analysis of Linux network IO model (five) reactor model analysis and implementation method

reactor model analysis and implementation method Network Model for Highly Concurrent Network Programming Reactor Reactor Introduction and Composition Advantages of reactors Analysis of the implementation part of reactor Reactor related definitions Reactor part module introduction reactor initialization (multiplexer initialization) Event Registration (Registration of Handlers) Iterations of processing, event turn calls (dispatchers & triggers) Test Results […]

Webserver 02 semi-synchronous semi-reactor thread pool

Directory Thread Pool: Why use a thread pool? How to create a thread pool? semi-synchronous/semi-reactor Five IO models Blocking and non-blocking IO The difference between non-blocking IO and asynchronous IO Synchronous IO and asynchronous IO Difference between event processing mode Reactor and Proactor mode Synchronous IO simulation proactor mode Is the more threads in multithreading […]