Local server-client communication

Discussion in 'Ruby' started by Javier 12, Nov 2, 2010.

  1. Javier 12

    Javier 12 Guest

    Hi, i'm coding a linux local server (daemon) and it will have a command
    line tool to communicate with it.

    What I want to accomplish is something like iptables tool, you write
    some rules on the command line and they are sent to the "daemon", in
    this case the kernel module.

    How can I achieve it? I've seen ruby does not support mkfifo, and a
    solution based on system() calls is really ugly.

    Unix socket? plain file?

    what do you use?
    thanks in advance

    --
    Posted via http://www.ruby-forum.com/.
    Javier 12, Nov 2, 2010
    #1
    1. Advertising

  2. On 11/02/2010 07:51 AM, Javier 12 wrote:
    > Hi, i'm coding a linux local server (daemon) and it will have a command
    > line tool to communicate with it.
    >
    > What I want to accomplish is something like iptables tool, you write
    > some rules on the command line and they are sent to the "daemon", in
    > this case the kernel module.
    >
    > How can I achieve it? I've seen ruby does not support mkfifo, and a
    > solution based on system() calls is really ugly.
    >
    > Unix socket? plain file?
    >
    > what do you use?
    > thanks in advance


    Unix sockets are fine for this purpose. You can write your own protocol
    on top of them, or use druby (assuming the client is in ruby too).
    Joel VanderWerf, Nov 2, 2010
    #2
    1. Advertising

  3. Javier 12

    Roger Pack Guest

    > Unix sockets are fine for this purpose. You can write your own protocol on
    > top of them, or use druby (assuming the client is in ruby too).


    Drb might work for you, as well.
    Roger Pack, Nov 2, 2010
    #3
  4. On 11/02/2010 09:59 AM, Roger Pack wrote:
    >> Unix sockets are fine for this purpose. You can write your own protocol on
    >> top of them, or use druby (assuming the client is in ruby too).

    >
    > Drb might work for you, as well.


    Just so the OP knows, drb and druby are the same thing. (I'm sure you
    know, Roger!)
    Joel VanderWerf, Nov 2, 2010
    #4
    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. Chris LaJoie

    Client-Server communication through ASP.NET

    Chris LaJoie, Sep 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    600
    Ron Vecchi
    Sep 21, 2003
  2. Russ
    Replies:
    1
    Views:
    554
    =?Utf-8?B?Q2hhcmxlcyBDaGVu?=
    Nov 29, 2004
  3. Dustin
    Replies:
    2
    Views:
    1,049
    G. S. Hayes
    Aug 9, 2004
  4. Bruce

    client-to-client communication via SOAP

    Bruce, Mar 21, 2005, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    250
    [MSFT]
    Mar 28, 2005
  5. Bruce

    client-to-client communication via SOAP

    Bruce, Mar 24, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    146
    Bruce
    Mar 24, 2005
Loading...

Share This Page