Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > drb server using file/tail to read file, and update client?

Reply
Thread Tools

drb server using file/tail to read file, and update client?

 
 
Christopher Aldridge
Guest
Posts: n/a
 
      08-09-2005
Hi!

I'm probably doing something completely stupid which is why I'd like
your suggestions please.

[scenerio]
I'm using the file/tail module on a drb server to tail an httpd access
log(for example).

When a client connects, it tells the server to read the log and then
(the client)reports to stdout each new line that the server finds.
[/scenerio]

The only way I could get this to work, was to listen on a drb object
on the client within a new thread.. Then send the file/tail request to
the drb server, (along with the client connection details)..

After which, the server reads each new line of the logfile and calls
the client object which simply does:
puts line

This works, but I feel like there is (or should be) some way of making
the client persistently accept each new line all within the <client>
initiated transaction.

Any suggestions or am I doing it the only way it can be done?

Thanks all!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DRB: can't run subshell in drb server? Ittay Dror Ruby 1 10-21-2008 11:28 AM
DRb connection error with more than 250+ DRb services J. Wook Ruby 16 05-16-2007 11:32 AM
More DRb; SSL & DRB & errors Kirk Haines Ruby 0 07-01-2005 06:29 PM
DRb / dRuby - freezes on DRb::DRbUndumped - any ideas? Miles Keaton Ruby 3 03-30-2005 03:37 PM
DRb and Exceptions when using DRbUndumped Martin Hart Ruby 2 01-15-2004 08:10 PM



Advertisments