嵌入式软件异步编程(3):应用案例

来源:互联网 发布:dnf如果合约到期知乎 编辑:程序博客网 时间:2024/05/16 14:58

异步编程有很多成功的应用,例如lwIP、Nginx、Node.js、Linux AIO、JavaScript等。可以将这些成功案例的设计经验引入到嵌入式软件。

http://blog.csdn.net/zoomdy/article/details/61916610
mingdu.zheng at gmail dot com

lwIP

The raw TCP/IP interface allows the application program to integrate better with the TCP/IP code. Program execution is event based by having callback functions being called from within the TCP/IP code.

The raw TCP/IP interface is not only faster in terms of code execution time but is also less memory intensive.

lwIP
lwIP@wikipedia

《基于回调的lwIP raw API》

Nginx

Nginx uses an asynchronous event-driven approach to handling requests. Nginx’s modular event-driven architecture can provide more predictable performance under high loads.

Nginx
Nginx@wikipedia

《深入理解Nginx:模块开发与架构解析(第2版) 》

  • 第8章 Nginx基础架构
    • 8.2 Nginx的架构设计
    • 8.2.2 事件驱动架构
    • 8.2.3 请求的多阶段异步处理

Node.js

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

Node.js
Node.js@wikipedia

《深入浅出Node.js》

  • 第 3 章 异步I/O
  • 第 4 章 异步编程

Linux AIO

使用异步 I/O 可以帮助我们构建 I/O 速度更快、效率更高的应用程序。如果我们的应用程序可以对处理和 I/O 操作重叠进行,那么 AIO 就可以帮助我们构建可以更高效地使用可用 CPU 资源的应用程序。

《使用异步 I/O 大大提高应用程序的性能》

JavaScript

《JavaScript异步编程:设计快速响应的网络应用》

  • 第1章 深入理解JavaScript事件
  • 第2章 分布式事件

《你不知道的JavaScript(中卷)》

  • 第二部分 异步和性能
    • 第 1 章 异步:现在与将来
    • 第 2 章 回调
0 0
原创粉丝点击