Sinatra并发性提升扩展 Sinatra::Synchrony

码农软件 · 软件分类 · 并发/并行处理框架 · 2019-09-03 09:27:31

软件介绍

Sinatra::Synchrony是 Sinatra的一个小扩展,它动态提升了Sinatra网络应用的并发性。由于EventMachine和EM-Synchrony的支持,当你有很多 传输和低速IO请求时(如向外部APIs发送的HTTP请求),它增加了你的应用每个过程可服务的客户的数量。由于它内部使用Fibers处理堵塞的 IO,所以没有回调的需要。这意味着我们可以像写一个正常的Sinatra网络应用那样进行开发。

Sinatra::Synchrony允许我们做异步程序,除了那些在Fibers中封装了回调操作的。这让我们能够实现同步程序的同时利用异步代码的优势。除了可以这样简单地变成,它也让我们根据需要可以转换一个不同的并发策略。

本文地址:https://www.codercto.com/soft/d/13770.html

Distributed Algorithms

Distributed Algorithms

Wan Fokkink / The MIT Press / 2013-12-6 / USD 40.00

This book offers students and researchers a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. It avoids mathematical argumentat......一起来看看 《Distributed Algorithms》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具