# Eventmachine - pure Ruby port

**URL:** <https://rubytalk.org/t/eventmachine-pure-ruby-port/34555>\
**Category:** ruby-talk\
**Created:** [17 January 2007 17:31 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555 "2007-01-17T17:31:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Haliday](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Mark\_Haliday](https://rubytalk.org/u/Mark_Haliday)\
**Post date:** [17 January 2007 17:31 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/1 "2007-01-17T17:31:00Z")

</div>

There was talk this past fall of a pure Ruby port of Eventmachine that  
Francis was working on. Is there any status updates? I peeked in the  
mailing list archive for Eventmachine but didn't seen anything new in  
there.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Jason\_R](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jason\_R](https://rubytalk.org/u/Jason_R)\
**Post date:** [17 January 2007 19:20 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/2 "2007-01-17T19:20:32Z")

</div>

I do believe the pure Ruby EM is perfectly functional and pretty close to as  
featureful as the C++ version. He hasn't posted new releases for a while but  
will gladly send you a recent build himself. His email is:  
garbagecat10@gmail.com (if he doesn't see this post).

Just a warning, the pure-Ruby EM is dog slow comparatively. I'd suggest  
using the native version if you can.

Jason

> **···**
>
> On 1/17/07, Mark Haliday \<markhaliday@yahoo.com\> wrote:
> 
> > There was talk this past fall of a pure Ruby port of Eventmachine that  
> > Francis was working on. Is there any status updates? I peeked in the  
> > mailing list archive for Eventmachine but didn't seen anything new in  
> > there.
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Mark\_Haliday](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Mark\_Haliday](https://rubytalk.org/u/Mark_Haliday)\
**Post date:** [17 January 2007 20:27 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/3 "2007-01-17T20:27:06Z")

</div>

Jason Roelofs wrote:

> Just a warning, the pure-Ruby EM is dog slow comparatively. I'd suggest  
> using the native version if you can.

This is something I'm wondering about. I've seen and used Twisted for  
Python and its robust and can handle large amounts of traffic. I wonder  
why Ruby seems to lack the robustness in the arena of sockets, etc. that  
Python seems to have no issues with? Perhaps I'm seeing this all wrong,  
so please correct me. Eventmachine as it is now is coded in C or C++,  
correct? Yet even with the improvements in the Ruby core for sockets  
the pure implementation of EM is going to be much slower. I have to  
think Ruby has some issues still then in the arena of sockets? Will  
YARV help any?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Francis\_Cianfrocca](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@Francis\_Cianfrocca](https://rubytalk.org/u/Francis_Cianfrocca)\
**Post date:** [18 January 2007 02:45 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/4 "2007-01-18T02:45:41Z")

</div>

Hi guys. I don't do much production work with the pure Ruby version myself  
but it hasn't been particularly tuned for performance. There is a small  
number of low-level socket things that aren't easy to do in pure Ruby (like  
the ability to do an asynchronous TCP connect). But I think with some  
careful profiling and tuning, it can become a lot faster.

> **···**
>
> On 1/17/07, Jason Roelofs \<jameskilton@gmail.com\> wrote:
> 
> > I do believe the pure Ruby EM is perfectly functional and pretty close to  
> > as  
> > featureful as the C++ version. He hasn't posted new releases for a while  
> > but  
> > will gladly send you a recent build himself. His email is:  
> > garbagecat10@gmail.com (if he doesn't see this post).
> > 
> > Just a warning, the pure-Ruby EM is dog slow comparatively. I'd suggest  
> > using the native version if you can.

---

<div class="post-metadata">

**Author:** ![Francis\_Cianfrocca](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@Francis\_Cianfrocca](https://rubytalk.org/u/Francis_Cianfrocca)\
**Post date:** [18 January 2007 02:54 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/5 "2007-01-18T02:54:08Z")

</div>

I've done some experiments with the low-level pure Ruby socket functions and  
with all the cruft stripped out, pure Ruby is about half as fast as C in  
tests that heavily stress network I/O. That's life in the big city, I think,  
but the hybrid EM will always be supported. I envision that as the  
alternative for really high-stress and high-scale applications, and I  
believe EM will be able to handle most of the requirements people can throw  
at it.

By the way, is anyone interested in joining the team? Tony is now an EM  
committer and I'd like to have some more. Especially people who know a lot  
about Twisted. I want to see EM match Twisted's feature set. As far as  
stability is concerned, EM is in a very good place now, but it needs a lot  
more features, a lot more documentation, case studies, and evangelism.

> **···**
>
> On 1/17/07, Mark Haliday \<markhaliday@yahoo.com\> wrote:
> 
> > Jason Roelofs wrote:  
> > \>  
> > \> Just a warning, the pure-Ruby EM is dog slow comparatively. I'd suggest  
> > \> using the native version if you can.
> > 
> > This is something I'm wondering about. I've seen and used Twisted for  
> > Python and its robust and can handle large amounts of traffic. I wonder  
> > why Ruby seems to lack the robustness in the arena of sockets, etc. that  
> > Python seems to have no issues with? Perhaps I'm seeing this all wrong,  
> > so please correct me. Eventmachine as it is now is coded in C or C++,  
> > correct? Yet even with the improvements in the Ruby core for sockets  
> > the pure implementation of EM is going to be much slower. I have to  
> > think Ruby has some issues still then in the arena of sockets? Will  
> > YARV help any?

---

<div class="post-metadata">

**Author:** ![Chuck\_Remes](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@Chuck\_Remes](https://rubytalk.org/u/Chuck_Remes)\
**Post date:** [18 January 2007 03:42 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/6 "2007-01-18T03:42:38Z")

</div>

I'm looking at adding netstrings support to EM so it's easier to add new text-based protocols. I don't have an immediate need so I haven't worked on this yet, but it's on my list. I'll be sure to wrap it up in tests and write the appropriate docs too.

cr

> **···**
>
> On Jan 17, 2007, at 8:54 PM, Francis Cianfrocca wrote:
> 
> > (snip)  
> > By the way, is anyone interested in joining the team? Tony is now an EM  
> > committer and I'd like to have some more. Especially people who know a lot  
> > about Twisted. I want to see EM match Twisted's feature set. As far as  
> > stability is concerned, EM is in a very good place now, but it needs a lot  
> > more features, a lot more documentation, case studies, and evangelism.

---

<div class="post-metadata">

**Author:** ![Francis\_Cianfrocca](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@Francis\_Cianfrocca](https://rubytalk.org/u/Francis_Cianfrocca)\
**Post date:** [18 January 2007 14:49 UTC](https://rubytalk.org/t/eventmachine-pure-ruby-port/34555/7 "2007-01-18T14:49:02Z")

</div>

Sounds great, looking forward to seeing that.

> **···**
>
> On 1/17/07, cremes.devlist@mac.com \<cremes.devlist@mac.com\> wrote:
> 
> > On Jan 17, 2007, at 8:54 PM, Francis Cianfrocca wrote:
> > 
> > \> (snip)  
> > \> By the way, is anyone interested in joining the team? Tony is now  
> > \> an EM  
> > \> committer and I'd like to have some more. Especially people who  
> > \> know a lot  
> > \> about Twisted. I want to see EM match Twisted's feature set. As far as  
> > \> stability is concerned, EM is in a very good place now, but it  
> > \> needs a lot  
> > \> more features, a lot more documentation, case studies, and evangelism.
> > 
> > I'm looking at adding netstrings support to EM so it's easier to add  
> > new text-based protocols. I don't have an immediate need so I haven't  
> > worked on this yet, but it's on my list. I'll be sure to wrap it up  
> > in tests and write the appropriate docs too.
> > 
> > cr
