Multitasking server?

Disclaimer: Ruby newbie here.

Does Ruby have a multitasking server that will react to events and run
user code based on those events? I'm not looking for a specialized
server that is only web or tcp. I would like to handle other things as
well, say for example incoming serial data.

In Perl, I would use POE (http://poe.perl.org/?What_POE_Is) for such a
thing, and in Python there is the Twisted framework
(http://twistedmatrix.com/).

Thanks in advance.

···

--
Mark Thomas

mrt@thomaszone.com wrote:

Disclaimer: Ruby newbie here.

Does Ruby have a multitasking server that will react to events and run
user code based on those events? I'm not looking for a specialized
server that is only web or tcp. I would like to handle other things as
well, say for example incoming serial data.

In Perl, I would use POE (POE: What POE Is\) for such a
thing, and in Python there is the Twisted framework
(http://twistedmatrix.com/\).

Thanks in advance.

You have threads and DRB (which uses threads internally). Although
threads are non native they do their job pretty good. Is it that what you
looked for?

Kind regards

    robert

Robert Klemme wrote:

···

mrt@thomaszone.com wrote:
> Disclaimer: Ruby newbie here.
>
> Does Ruby have a multitasking server that will react to events and run
> user code based on those events? I'm not looking for a specialized
> server that is only web or tcp. I would like to handle other things as
> well, say for example incoming serial data.
>
> In Perl, I would use POE (POE: What POE Is\) for such a
> thing, and in Python there is the Twisted framework
> (http://twistedmatrix.com/\).
>
> Thanks in advance.

You have threads and DRB (which uses threads internally). Although
threads are non native they do their job pretty good. Is it that what you
looked for?

Not really, though I can't find much in English about DRB. However,
using those terms to search RAA brought up IO::Reactor, which looks
like the kind of thing I'm looking for EXCEPT for the fact that it
hasn't been updated since 2003. Is it dead?

- Mark.

i have a tool which makes it trivial to set up a system which reacts to
filesystem events by running arbitrary programs... can you elaborate on what
kinds of events you want to react to and how you want to react to them (eg
external programs, functions called, etc)

cheers.

-a

···

On Sat, 18 Jun 2005 mrt@thomaszone.com wrote:

Robert Klemme wrote:

mrt@thomaszone.com wrote:

Disclaimer: Ruby newbie here.

Does Ruby have a multitasking server that will react to events and run
user code based on those events? I'm not looking for a specialized
server that is only web or tcp. I would like to handle other things as
well, say for example incoming serial data.

In Perl, I would use POE (POE: What POE Is\) for such a
thing, and in Python there is the Twisted framework
(http://twistedmatrix.com/\).

Thanks in advance.

You have threads and DRB (which uses threads internally). Although
threads are non native they do their job pretty good. Is it that what you
looked for?

Not really, though I can't find much in English about DRB. However,
using those terms to search RAA brought up IO::Reactor, which looks
like the kind of thing I'm looking for EXCEPT for the fact that it
hasn't been updated since 2003. Is it dead?

--

email :: ara [dot] t [dot] howard [at] noaa [dot] gov
phone :: 303.497.6469
My religion is very simple. My religion is kindness.
--Tenzin Gyatso

===============================================================================

mrt@thomaszone.com wrote:

<snip>

Not really, though I can't find much in English about DRB. However,
using those terms to search RAA brought up IO::Reactor, which looks
like the kind of thing I'm looking for EXCEPT for the fact that it
hasn't been updated since 2003. Is it dead?

- Mark.

No, just stable. :slight_smile:

The author, Michael Granger, is still around and can even be found in #ruby-lang from time to time.

Regards,

Dan

Actually, it was last updated November of 2004 - currently it's at version
0.0.6 .

http://raa.ruby-lang.org/project/io-reactor/0.0.6

I'm glad this was brought up, because I was actualy looking for something
along these lines as well.

···

On Friday 17 June 2005 09:10 am, mrt@thomaszone.com wrote:

However, using those terms to search RAA brought up IO::Reactor, which looks
like the kind of thing I'm looking for EXCEPT for the fact that it
hasn't been updated since 2003.

I can suggest (because I wrote it :slight_smile:
http://www.rubygarden.org/ruby?DrbTutorial

···

On Sat, Jun 18, 2005 at 01:10:33AM +0900, mrt@thomaszone.com wrote:

> You have threads and DRB (which uses threads internally). Although
> threads are non native they do their job pretty good. Is it that what you
> looked for?

Not really, though I can't find much in English about DRB.

i have a tool which makes it trivial to set up a system which reacts to
filesystem events by running arbitrary programs... can you elaborate on what
kinds of events you want to react to and how you want to react to them (eg
external programs, functions called, etc)

I'd be interested in seeing this. I was trying to get FAM and inotify
to work last week, and had little luck with either. How are you doing
it?

Corey wrote:

Actually, it was last updated November of 2004 - currently it's at version
0.0.6 .

http://raa.ruby-lang.org/project/io-reactor/0.0.6

That's odd. The Changelog doesn't have any entries past 2003.

You're right - my bad; I misinterpreted the "Last update:" on the RAA page.

( that's what I get for trying to be pedantic! )

<grin>

Sorry for the noise!

···

On Saturday 18 June 2005 08:45 pm, Mark Thomas wrote:

Corey wrote:
> Actually, it was last updated November of 2004 - currently it's at
> version 0.0.6 .
>
> http://raa.ruby-lang.org/project/io-reactor/0.0.6

That's odd. The Changelog doesn't have any entries past 2003.

Corey wrote:

> That's odd. The Changelog doesn't have any entries past 2003.
You're right - my bad; I misinterpreted the "Last update:" on the RAA page.

( that's what I get for trying to be pedantic! )

No, no, you're correct. The last update to the *module* was on
2004-11-16; it's just that I haven't updated the Changelog in a while.
I'll rectify that, but in the meantime you can see the revision log
(from which I generate the Changelog anyway) at:

  http://www.deveiate.org/projects/IO-Reactor/log/trunk

And Dan's right; just because it hasn't been updated in a while doesn't
mean it's dead. I haven't gotten any bug reports or feature requests
for it, and it works for me just fine (see

for an example). If there's something you expected to see since
November, please do let me know.

···

On Saturday 18 June 2005 08:45 pm, Mark Thomas wrote: