摘自stackflow的回答,主要从架构上说明了二者的区别:

As for design philosophy, libev was created to improve on some of the architectural decisions in libevent, for example, global variable usage made it hard to use libevent safely in multithreaded environments, watcher structures are big because they combine I/O, time and signal handlers in one, the extra components such as the http and dns servers suffered from bad implementation quality and resultant security issues, and timers were inexact and didn't cope well with time jumps.

Libev tried to improve each of these, by not using global variables but using a loop context for all functions, by using small watchers for each event type (an I/O watcher uses 56 bytes on x86_64 compared to 136 for libevent), allowing extra event types such as timers based on wallclock vs. monotonic time, inter-thread interruptions, prepare and check watchers to embed other event loops or to be embedded and so on.

The extra component problem is "solved" by not having them at all, so libev can be small and efficient, but you also need to look elsewhere for an http library, because libev simply doesn't have one (for example, there is a very related library called libeio that does asynchronous I/O, which can be used independently or together with libev, so you can mix and match).

So in short, libev tries to do one thing only (POSIX event library), and this in the most efficient way possible. Libevent tries to give you the full solution (event lib, non-blocking I/O library, http server, DNS client).

Or, even shorter, libev tries to follow the UNIX toolbox philosophy of doing one thing only, as good as possible.

Note that this is the design philosophy, which I can state with authority because I designed libev. Whether these design goals have actually been reached, or whether the philosophy is based on sound principles, is up to you to judge.

这是libev作者亲自解释。大家膜拜吧,呵呵!

libev与libevent区别的更多相关文章

  1. [译]libev和libevent的设计差异

    本文译自what's the difference between libev and libevent? 作者是libev作者 [问]两个库都是为异步io调度而设计,在Linux上都是使用epoll ...

  2. 转:libev和libevent的设计差异

    转:http://www.cnblogs.com/Lifehacker/p/whats_the_difference_between_libevent_and_libev_chinese.html [ ...

  3. Libev和LibEvent

    libev和libevent功能基本相同,名称相近,到底该用哪一个呢?zhouhh@zhh64:~$ sudo apt-cache search libeventlibevent-dev – Deve ...

  4. 使用 libevent 和 libev 提高网络应用性能——I/O模型演进变化史

    构建现代的服务器应用程序需要以某种方法同时接收数百.数千甚至数万个事件,无论它们是内部请求还是网络连接,都要有效地处理它们的操作. 有许多解决方案,但事件驱动也被广泛应用到网络编程中.并大规模部署在高 ...

  5. 使用 libevent 和 libev 提高网络应用性能

    使用 libevent 和 libev 提高网络应用性能 Martin C. Brown, 作家, Freelance 简介: 构建现代的服务器应用程序需要以某种方法同时接收数百.数千甚至数万个事件, ...

  6. libevent 和 libev 提高网络应用性能

    构建现代的服务器应用程序需要以某种方法同时接收数百.数千甚至数万个事件,无论它们是内部请求还是网络连接,都要有效地处理它们的操作.有许多解决方 案,但是 libevent 库和 libev 库能够大大 ...

  7. 简单对比 Libevent、libev、libuv

    Libevent.libev.libuv三个网络库,都是c语言实现的异步事件库Asynchronousevent library). 异步事件库本质上是提供异步事件通知(Asynchronous Ev ...

  8. 网络库libevent、libev、libuv对比

    Libevent.libev.libuv三个网络库,都是c语言实现的异步事件库Asynchronousevent library). 异步事件库本质上是提供异步事件通知(Asynchronous Ev ...

  9. libevent安装

    libevent : 名气最大,应用最广泛,历史悠久的跨平台事件库:libev : 较libevent而言,设计更简练,性能更好,但对Windows支持不够好:libuv : 开发node的过程中需要 ...

随机推荐

  1. Zend Studio 实用快捷键大全

    编辑功能 组合键 实现功能 适用条件 Ctrl+/ 单行注释.当前为php代码时,则在光标所在行添加双斜杠行注释,选择多行则每一行都添加双斜杠:而当代码为html时则在行前后添加<!-- --& ...

  2. DaoCloud加速docker镜像下载

    1. 注册DaoCloud用户; 2. 注册完成后,会进入dashboard页面,点击右上方的加速器.该页面提供了Linux.Windows和Mac的加速方案,我这里选择的是Linux: 3. 执行其 ...

  3. Git直接拉取远程分支

    用Git,一直有个疑惑,可不可以不拉取远程Origin主干,我直接pull一个分支下来 今天想了一下,找到了一个办法 本地分支关联 // 0.新建一个文件夹,然后初始化git git init // ...

  4. 异步 JS: Callbacks, Listeners, Control Flow Libs 和 Promises【转载+翻译+整理】

    http://sporto.github.io/blog/2012/12/09/callbacks-listeners-promises/ 或 http://www.ruanyifeng.com/bl ...

  5. spring 判断非空提示断言

    org.springframework.util.Assert Assert.notNull(object, "Bean object must not be null");

  6. fortune 计算公式

    fortune 计算PV值. 举例:一笔 120.00的债权; 12天还完,3.15号借款,3.16开始还款.等额本息还款计算出每天还款: 10.22 根据 现值计算公式 PV = CFn/(1+r) ...

  7. CSS综合(问题)

    1.为什么我外层div设置height:auto有效果,而位于这个div里面的一个div设置height:auto就没效果啦?      将三个DIV的高度都设置为自动,overflow:auto;, ...

  8. PAT《数据结构学习与实验指导》实验项目集 2-05 2-06 2-07 2-08

    题目地址:here pat 2-05 求集合数据的均方差 没什么可说的,大水题 #include<cstdio> #include<cmath> int main() { in ...

  9. 【DB】MYSQL相关细节

    在进行统计API模块测试时候,需要用SQL进行查询,并和API的返回结果进行对比: 而SQL中一些以前用过的细节需要记住: 补充一下show的部分用法: MySQL中有很多的基本命令,show命令也是 ...

  10. 如何随机获取数据库不连续ID的数据?

    这个问题的来由是我朋友要为一网站实现一个标签云功能,和我交流后我给出了一个方案,在此略作记录,亦求拍砖. 大概需求这是样的: 在数据库有一张表A如下图: 其中id字段的值未必是连续的,现在我朋友要做的 ...