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.

Getting started

Server example: Echo server

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

require'eventmachine'moduleEchoServerdefpost_initputs"-- someone connected to the echo server!"enddefreceive_datadatasend_data">>>you sent: #{data}"close_connectionifdata=~/quit/ienddefunbindputs"-- someone disconnected from the echo server!"endend# Note that this will block current thread.EventMachine.run{EventMachine.start_server"127.0.0.1",8081,EchoServer}