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

Discussion in 'Ruby' started by Christopher Aldridge, Aug 9, 2005.

  1. 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!
    Christopher Aldridge, Aug 9, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miles Keaton
    Replies:
    3
    Views:
    179
    Miles Keaton
    Mar 30, 2005
  2. Kirk Haines

    More DRb; SSL & DRB & errors

    Kirk Haines, Jul 1, 2005, in forum: Ruby
    Replies:
    0
    Views:
    123
    Kirk Haines
    Jul 1, 2005
  3. J. Wook
    Replies:
    16
    Views:
    279
    Robert Klemme
    May 16, 2007
  4. Ittay Dror
    Replies:
    1
    Views:
    132
    Ittay Dror
    Oct 21, 2008
  5. Terry Michaels

    Tail Call Optimization (Tail Recursion)

    Terry Michaels, Apr 18, 2011, in forum: Ruby
    Replies:
    16
    Views:
    309
    Robert Klemme
    Apr 20, 2011
Loading...

Share This Page