eventmachine 0,1,-1,0,1,0,1,0 travis-ci ruby Rubygems

EventMachine: fast, simple event-processing library for Ruby programs

About EventMachine Code Climate

What is EventMachine

EventMachine is an event-driven I/O and lightweight concurrency library for Ruby. It provides event-driven I/O using the Reactor pattern, much like JBoss Netty, Apache MINA, Python’s Twisted, Node.js, libevent and libev.

EventMachine is designed to simultaneously meet two key needs:

  • Extremely high scalability, performance and stability for the most demanding production environments.
  • An API that eliminates the complexities of high-performance threaded network programming, allowing engineers to concentrate on their application logic.

This unique combination makes EventMachine a premier choice for designers of critical networked applications, including Web servers and proxies, email and IM production systems, authentication/authorization processors, and many more.

EventMachine has been around since the early 2000s and is a mature and battle-tested library.

What EventMachine is good for?

What platforms are supported by EventMachine?

EventMachine supports Ruby 1.8.7 through 2.3, REE, JRuby and works well on Windows as well as many operating systems from the Unix family (Linux, Mac OS X, BSD flavors).

Install the gem

Install it with RubyGems

gem install eventmachine

or add this to your Gemfile if you use Bundler:

gem "eventmachine"

Getting started

For an introduction to EventMachine, check out:

Server example: Echo server

Here’s a fully-functional echo server written with EventMachine:

 require 'eventmachine'

 module EchoServer
   def post_init
     puts "-- someone connected to the echo server!"

   def receive_data data
     send_data ">>>you sent: #{data}"
     close_connection if data =~ /quit/i

   def unbind
     puts "-- someone disconnected from the echo server!"

# Note that this will block current thread.
EventMachine.run {
  EventMachine.start_server "", 8081, EchoServer

EventMachine documentation

Currently we only have reference documentation and a wiki.

Community and where to get help

  • Join the mailing list (Google Group)
  • Join IRC channel #eventmachine on irc.freenode.net

License and copyright

EventMachine is copyrighted free software made available under the terms of either the GPL or Ruby’s License.

Copyright: © 2006-07 by Francis Cianfrocca. All Rights Reserved.


If you are unhappy with EventMachine and want to use Ruby, check out Celluloid.

Related Repositories



EventMachine: fast, simple event-processing library for Ruby programs ...



Ruby EventMachine file tailing and friends. 'gem install eventmachine-tail' to install. ...



EventMachine-LE (Live Edition), a "branch" of EventMachine with fixes and more features ...



RSpec extensions for testing EventMachine code ...



ZK client for EventMachine-based applications ...

Top Contributors

tmm1 sodabrew raggi jakedouglas igrigorik smparkes dj2 portertech account-settings bklang davidsmalley fabiokung wyhaines luislavena nolman vishnugopal michaelklishin deiv Flameeyes razielgn hsbt benburkert piki paddor garbagecat phiggins gnufied funny-falcon josh mpalmer


-   v1.2.0.1 zip tar
-   v1.2.0 zip tar
-   v1.2.0.dev.2 zip tar
-   v1.2.0.dev.1 zip tar
-   v1.0.9.1 zip tar
-   v1.0.9 zip tar
-   v1.0.8 zip tar
-   v1.0.7 zip tar
-   v1.0.6 zip tar
-   v1.0.5 zip tar
-   v1.0.4 zip tar
-   v1.0.3 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v1.0.0.rc.4 zip tar
-   v1.0.0.rc.3 zip tar
-   v1.0.0.rc.2 zip tar
-   v1.0.0.rc.1 zip tar
-   v1.0.0.beta.3 zip tar
-   v1.0.0.beta.2 zip tar
-   v1.0.0.beta.1 zip tar
-   v0.12.10 zip tar
-   v0.12.8 zip tar
-   v0.12.6 zip tar
-   v0.12.4 zip tar