摘要: What This Tutorial Focuses OnIn the previous tutorial we built a simple logging system. We were able to broadcast log messages to many receivers.之前的教程我们构建了简单的日志系统。我们已经能够广播日志消息给多个接收端。In this tutorial w... 阅读全文
posted @ 2020-01-18 16:22 InfiniteCodes 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Publish/Subscribe发布/订阅What This Tutorial Focuses OnIn the previous tutorial we created a work queue. The assumption behind a work queue is that each task is delivered to exactly one worker. In this pa... 阅读全文
posted @ 2020-01-17 23:46 InfiniteCodes 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Work QueuesPrerequisitesAs with other Python tutorials, we will use the Pika RabbitMQ client version 1.0.0.就像其他的Python教程一样,我们使用Pika RabbitMQ客户端版本1.0.0 ... 阅读全文
posted @ 2020-01-17 16:10 InfiniteCodes 阅读(184) 评论(0) 推荐(0) 编辑
摘要: IntroductionRabbitMQ is a message broker: it accepts and forwards messages. You can think about it as a post office: when you put the mail that you want posting in a post box, you can be sure that Mr.... 阅读全文
posted @ 2020-01-11 17:52 InfiniteCodes 阅读(260) 评论(0) 推荐(0) 编辑
摘要: RabbitMQ介绍以下内容搬运自RabbitMQ官网RabbitMQ is the most widely deployed open source message broker.RabbitMQ是使用最广泛的开源的消息中转器With tens of thousands of users, RabbitMQ is one of the most popular open source messa... 阅读全文
posted @ 2020-01-11 11:04 InfiniteCodes 阅读(373) 评论(0) 推荐(0) 编辑
摘要: Select版FTP需求:实现文件上传及下载功能 支持多连接并发传文件 使用select or selectors 阅读全文
posted @ 2020-01-05 14:39 InfiniteCodes 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Selectors This module allows high-level and efficient I/O multiplexing, built upon the select module primitives. Users are 该模块允许高级和高效的I/O多路复用,在原select 阅读全文
posted @ 2020-01-05 14:28 InfiniteCodes 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Select()版Socket Python的select()方法直接调用操作系统的IO接口,它监控sockets,open files, and pipes(所有带fileno()方法的文件句柄)何时变成readable 和writeable, 或者通信错误,select()使得同时监控多个连接变 阅读全文
posted @ 2020-01-03 17:53 InfiniteCodes 阅读(118) 评论(0) 推荐(0) 编辑
摘要: select,poll,epoll都是IO多路复用的机制。I/O多路复用就是通过一种机制,一个进程可以监视多个描述符,一旦某个描述符就绪(一般是读就绪或者写就绪),能够通知程序进行相应的读写操作。但select,poll,epoll本质上都是同步I/O,因为他们都需要在读写事件就绪后自己负责进行读写 阅读全文
posted @ 2020-01-03 16:34 InfiniteCodes 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 事件驱动与异步IO 通常,我们写服务器处理模型的程序时,有以下几种模型: (1)每收到一个请求,创建一个新的进程,来处理该请求; (2)每收到一个请求,创建一个新的线程,来处理该请求; (3)每收到一个请求,放入一个事件列表,让主进程通过非阻塞I/O方式来处理请求 上面的几种方式,各有千秋, 第(1 阅读全文
posted @ 2020-01-03 16:04 InfiniteCodes 阅读(144) 评论(0) 推荐(0) 编辑