[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Multitasking server?

mrt

6/17/2005 3:31:00 PM

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/?W...) for such a
thing, and in Python there is the Twisted framework
(http://twistedm...).

Thanks in advance.

--
Mark Thomas

10 Answers

Robert Klemme

6/17/2005 3:39:00 PM

0

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 (http://poe.perl.org/?W...) for such a
> thing, and in Python there is the Twisted framework
> (http://twistedm...).
>
> 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

mrt

6/17/2005 4:08:00 PM

0



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 (http://poe.perl.org/?W...) for such a
> > thing, and in Python there is the Twisted framework
> > (http://twistedm...).
> >
> > 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.

Ara.T.Howard

6/17/2005 4:24:00 PM

0

Berger, Daniel

6/17/2005 4:36:00 PM

0

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. :)

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

Regards,

Dan


tsuraan

6/17/2005 7:33:00 PM

0

> 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

6/18/2005 8:13:00 AM

0

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.
>

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

http://raa.ruby-lang.org/project/io-rea...

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





Brian Candler

6/18/2005 9:25:00 AM

0

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 can suggest (because I wrote it :-)
http://www.rubygarden.org/ruby?D...


mrt

6/19/2005 3:43:00 AM

0



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-rea...

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

Corey

6/19/2005 5:41:00 AM

0

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-rea...
>
> 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!



Michael Granger

6/22/2005 8:20:00 PM

0

Corey wrote:
> On Saturday 18 June 2005 08:45 pm, Mark Thomas 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...

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
http://www.deveiate.org/projects/RMemCache/browser/trunk/lib/m...
for an example). If there's something you expected to see since
November, please do let me know.