libevent ,一个强大的通讯框架库

libevent是个Linux下的开源项目,最初发起原因是,解决socket通讯中数万级别的大量连接请求的处理,实现高效高并发服务而设计。他是个面向消息的框架,使用者不用面对socket的底层函数,利用libevent的消息驱动框架,就能使其开发的服务轻松实现高效高连接高并发能力。

The libevent provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts.

libevent is meant to replace the event loop found in event driven network servers. An application just needs to call event_dispatch() and then add or remove events dynamically without having to change the event loop.

目前已经有很多应用基于此框架开发,看看下面的列表你就会知道它到底有多厉害了:

Programs using libevent

The usefulness of libevent API is demonstrated by the following applications:

  • Vomit – Voice Over Misconfigured Internet Telephones
  • Crawl – A Small and Efficient HTTP Crawler
  • Libio – an input/output abstraction library
  • Honeyd – a virtual honeynet daemon – can be used to fight Internet worms.
  • Fragroute – an IDS testing tool
  • Nylon – nested proxy server
  • Disconcert – a Distributed Computing Framework for Loosely-Coupled Workstations.
  • PLB – pure load balancer: a free high-performance load balancer for Unix.
  • Trickle – a lightweight userspace bandwidth shaper.
  • Memcached – a high-performance, distributed memory object caching system.
  • watchcatd – software watchdog designed to take actions not as drastic as the usual solutions, which reset the machine.
  • ScanSSH – a fast SSH server and open proxy scanner.
  • Nttlscan – a network topology scanner for Honeyd.
  • NetChat – a combination of netcat and ppp’s chat.
  • Io – a small programming language; uses libevent for network communication.
  • Tor – an anonymous Internet communication system.
  • Systrace – a system call sandbox.
  • SpyBye – detect malware on web pages.
  • GreenSQL – an SQL database firewall.
  • dnsscan – a fast scanner for identifying open recursive dns resolvers
  • Kargo Event – a PHP extension for libevent.

libevent ,一个强大的通讯框架库》有1个想法

发表评论

电子邮件地址不会被公开。