search for: eventmachin

Displaying 20 results from an estimated 84 matches for "eventmachin".

Did you mean: eventmachine
2008 Jan 06
5
Having very odd problems with UDP.
I am using eventmachine 0.8.1 on windows XP and am having very odd problems. This snippet of code gives the error that follows it. class EchoServer def receive_data data puts data send_data ">>>you sent: #{data}" if data =~ /quit/i puts "quitting" close...
2008 Apr 23
2
Status of EventMachine.fork
Hi All, I''m currently looking into doing a bit of evented network programming in ruby and i''m currently looking into packet, eventmachine and rev. The problem is that I need to be able to fork and start a new reactor within the forked child (it also should open a socket and write status information back to the main process). I have not been able to do this with EventMachine. When searching the mailinglist I found a mention of Even...
2007 Nov 09
1
EventMachine::run - How can I ensure that this
Friends, I am writing an event system which has an interface on a web site which can create events. The creation of events opens up EventMachine::run and connects to the event server, and sends messages. The problem comes if this is run inside of say, event driven mongrel, where it will crash fatally, the same as: EventMachine::run { EventMachine::run { } } The only solution that doesn''t involve heavy monkey patching (load scrip...
2008 Aug 22
6
EventMachine website down?
Hi all Is the EventMachine website (www.rubyeventmachine.com) down? I can''t access it from South Africa, and have tried using tor as well with no luck. I''m kinda new to EventMachine, so I first have a lot of examples to work through and reading to do before I start pestering the mailing list with question...
2007 Feb 25
6
Crash occurs where EventMachine.connect is
Hi everyone, If you subclass EventMachine::Connection and call it outside an EventMachine::run event loop, EventMachine crashes! Example: class Put < EventMachine::Connection include EventMachine::Deferrable HOST="localhost" PORT=8080 def self.request(data) EventMachine.connect(HOST, PORT, self) {|c|...
2007 May 24
4
Multiple EM connections on separate threads
Hi EM Gurus, I''m hoping someone can shed some light on the following... I''m using a 3rd party (legacy) server that can accept up to 8 simultaneous connections on one port. I''ve been able to make multiple connections to this server from within one call to EventMachine::run {...}. Specificaly, I can access each connection separately using: em_thread = Thread.new do EventMachine::run { t = Thread.current [:c1, :c2, :c3].each do |i| t[i] = EventMachine...
2009 Mar 15
2
How can I add TimeoutHandler to EvenmentMachine
...;t work 2. How can I add TimeoutHandler to the connection? Thanks! /Jack -- Jack Tang Software Engineer at Vobile Email: himars at gmail.com http://www.linkedin.com/in/jacktang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/eventmachine-talk/attachments/20090315/eabc1a0b/attachment.html>
2008 Jan 14
10
Using EventMachine to listen from non-network
I''ve actually found a way to make EventMachine listen to events from a serial port, but only by using the pure Ruby version, using Guilliame Pierronnet''s Ruby/SerialPort library. It turned out to be simpler than I thought it would be: require ''serialport'' $eventmachine_library = :pure_ruby require ''eventma...
2011 Sep 26
2
undefined method `options' for #<EventMachine::HttpClien
...task contains the following code: consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, :site => ''http://twitter.com'') access_token = OAuth::AccessToken.new(consumer,ACCESS_TOKEN,ACCESS_TOKEN_SECRET) oauth_params = {:consumer => consumer, :token => access_token} EventMachine.run do # now, let''s subscribe to twitter site stream # check informaiton on twitter site http = EventMachine::HttpRequest.new(''http://stream.twitter.com/1/statuses/sample.json'').get oauth_helper = OAuth::Client::Helper.new(http, oau...
2006 Nov 03
6
How to send data,
...a application that includes ruby-debug is started, it starts listening for 2 connections; 8989, 8990 The connection is made by calling the connectToApp method. This sets up 2 connections, which works. I had to place them in a Thread, because the gui obviously has to resume during the event loop of EventMachine. When the other app that has the debugger server gets to a breakpoint, it sends data to the client. This works as it should, the receive_data method of the DebuggerClient module gets called and sends the data to the received_client_data method of the Controller class. This method then assigns the...
2007 Nov 07
4
Gracefully stopping EventMachine?
Hello all, I''ve been learning Ruby and playing with a chat server I built using GServer. After into an issue I found with GServer, that no one else seemed to notice (actually, similar to this question, GServer is hard to kill nicely, especially when you want to.), I found references to EventMachine, and rebuilt my server using it. I much prefer EventMachine''s model. The problem I am having is I''d like it to be possible to shutdown the server, for whatever reason. I have a command coded that should tell everyone who is connected that ''So-and-so has executed a shu...
2008 Feb 01
6
epoll increasing latency big time
Sorry this is going to be a bit vague, but I''ve noticed something rather odd going on with EventMachine on Linux. I''ve written something uses EventMachine to proxy HTTP to other processes. On OS X, it works great, adding only about 20% extra latency into the connection when proxying versus connecting to the original backend process directly, so a 5ms connection might now take 6ms. On a Lin...
2007 Sep 14
3
epoll appears to break
The following program is a minor variant on the sample given in the README with eventmachine-0.8.1. I am running under CentOS 4.5 (kernel 2.6.9-55.0.2.plus.c4) with a ruby-1.8.5 RPM from the CentOS testing repository. When I run it, I find that set_comm_inactivity_timeout doesn''t do anything. That is, if I client opens a connection, it stays open indefinitely. However, if I com...
2006 Aug 08
11
Core dump using sample DumbHttpClient
...45b5b5 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.5 #4 0x28460795 in __cxxabiv1::__terminate () from /usr/lib/libstdc++.so.5 #5 0x284607d2 in std::terminate () from /usr/lib/libstdc++.so.5 #6 0x28460712 in __cxa_throw () from /usr/lib/libstdc++.so.5 #7 0x2829f75d in EventMachine_t::ConnectToServer () from /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/rubyeventmachine.so #8 0x282a4433 in evma_connect_to_server () from /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6/rubyeventmachine.so #9 0x282a25fe in t_connect_server () from /usr/local/lib/ruby/site_ruby/1.8/i386-free...
2007 Feb 26
9
libevent
Francis, I read in the list archives back that a future EventMachine release will support epoll on Linux (i.e., it''s in the trunk). Better still, is there a possibility that EM will rely on libevent so that it will be architecture independent (i.e. epoll on Linux, kqueue on FreeBSD/Mac OS X, /dev/poll on Solaris)? This is how memcached is implemented, an...
2008 Mar 18
1
Eventmachine utils
I''m working on StrokeDB* right now and put pieces of networking stuff into a separate repository "Eventmachine utils". There are 3 useful libs already: protocol chaining, messaging protocol and marshalled messaging protocol. Check them out :-) Overview: http://gitorious.org/projects/eventmachine-utils Files: http://gitorious.org/projects/eventmachine-utils/repos/mainline/trees/master/lib Chaining (...
2007 Dec 09
38
libevent
Hello, I have been looking at the Ruby/EventMachine. First let me say it look very good. Reactor model with no threads makes for fast reliable server, and I have read about marvelous Twisted framework for Python and am glad to see something similar for Ruby. I am writing network app with Ruby threads now and it very slow, and I try new Ruby 1.9...
2006 Jul 11
32
Database Concurrency Without a Web Server?
My Rails application requires a very busy worker process running in the background at all times. I am launching this non-interactive process using script/runner. This process is very busy and is communicating with the MySQL server constantly. As I started putting some load on the system to test, I started running into performance issues. I have since discovered that Rails is only using 1
2006 Dec 15
5
Testing event driven Socket classes
Ok, here is the class, I want to Unit Test, its part of a large app and is based on EventMachine library. I want to mock the class TickServer ( i.e not stub it) . Since in actual scenario, you can''t do this on this class: @server = TickServer.new # will toss an exception at your face you must initialize the server like this: EventMachine.run { EventMachine.start_server("19...
2007 Aug 15
2
Interfaces for accessing SSL/TLS certificates
Hi everyone. Does anyone have any preferences or ideas for an interface for SSL certificates, both client-side and server-side? At present, the only interface is EventMachine::Connection#start_tls, which uses a built-in self-signed cert on the server side. On the cilent side, it accepts any well-formed cert (that is, it doesn''t check that the remote cert is signed by a trusted authority). I''m thinking of adding a very simple interface to EventMachine...