Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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:
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.
EventMachine supports Ruby 1.8.7 through 2.6, REE, JRuby and works well on Windows as well as many operating systems from the Unix family (Linux, Mac OS X, BSD flavors).
Install it with RubyGems
gem install eventmachine
or add this to your Gemfile if you use Bundler:
gem "eventmachine"
For an introduction to EventMachine, check out:
Here's a fully-functional echo server written with EventMachine:
require 'eventmachine'
module EchoServer
def post_init
puts "-- someone connected to the echo server!"
end
def receive_data data
send_data ">>>you sent: #{data}"
close_connection if data =~ /quit/i
end
def unbind
puts "-- someone disconnected from the echo server!"
end
end
# Note that this will block current thread.
EventMachine.run {
EventMachine.start_server "127.0.0.1", 8081, EchoServer
}
Currently we only have reference documentation and a wiki.
EventMachine is copyrighted free software made available under the terms of either the GPL or Ruby's License.
Copyright: (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
If you are unhappy with EventMachine and want to use Ruby, check out Celluloid.
FAQs
Unknown package
We found that eventmachine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.