Need Ruby binding to open source middleware

I’ve been asked by someone if there’s a Ruby binding to my
open-source middleware, isectd (see sig line). There is not.

I am curious if a) I can enlist anyone’s help here doing it
and b) how difficult do you think it might be?

I’ve written interfaces to it in Python, PHP, Java,
Smalltalk, C (it’s native interface), and a few others have
been contributed.

If I were to try doing it on my own where is it recommended
I start? I’m assuming I’ll need:

1) a version to run on Linux
2) some introductory material on the language and
   its syntax

Anything else you think I’ll need?

Any volunteers?

···


…tom
remove dashes in email for replies
http://isectd.sourceforge.net

“Thomas Gagné” tgagne@wide-open-west.com wrote in message
news:3DDBE15E.3080600@wide-open-west.com

I am curious if a) I can enlist anyone’s help here doing it
and b) how difficult do you think it might be?

It’s fairly easy to write Ruby extensions, and since the API is pretty
straightforward, it shouldn’t be a major concern.

I don’t know how the other language bindings were written, but given that
the entire system is socket based, it would be really nice if the client API
could be written in 100% pure Ruby.
Ruby already has good socket support and most of isectd client code is
socket abstraction in C. The benefit would be that any Ruby program would be
able to interoperate out of the box without requiring extension dll’s which
would have to be ported and installed. Furthermore, it would make the Ruby
port simpler, although writing a binding as not difficult.

If you consider 100% pure Ruby as a viable approach, I suggest reading the
DDJ article - it’s got simple client server examples and is a quick read.
Although we know Ruby better than you, you know isectd better than us, and
Ruby is not difficult. Just be aware of some socket issues on Windows that
supposedly has been fixed in Ruby stable release 1.6.8 and dev. release
1.7.3.
I’m not into Ruby on Linux, but it’s readily avaialbe. There are good
installers for Windows.

Ruby in itself functions as similar middleware and there has been written
several distributed projects - see for instance drb:
http://www.pragmaticprogrammer.com/ruby/articles/drb.html and
http://www.ddj.com/articles/2002/0209/ (DDJ seems down at the time of
writing).

Still it would be nice to plug into a cross language, cross platform system
such as isectd.

References:

http://www.ruby-lang.org

http://c2.com/cgi/wiki?RubyLanguage

Ruby kickstart:
good DDJ article: http://www.ddj.com/articles/2001/0101/0101b/0101b.htm
Presentation:
http://www.pragmaticprogrammer.com/talks/introruby/introruby.htm

There is an online version of the Pragmatic Programmers “Programming Ruby”,
aka “The Pick Axe book” which is the de facto Ruby Bible - rubycentral DNS
currently doesn’t work for the time being, so use the IP version below.
http://www.rubycentral.com/book
http://165.193.140.17/book/

Mikkel

Look at SWIG, given that you prbably have a C header to interface to
your library, SWIG will likely wrap your interface fairly quickly.
http://www.swig.org/

···

On Thu, Nov 21, 2002 at 05:33:13AM +0900, Thomas Gagn? wrote:

If I were to try doing it on my own where is it recommended
I start? I’m assuming I’ll need:

  1. a version to run on Linux
  2. some introductory material on the language and
    its syntax

Anything else you think I’ll need?


Alan Chen
Digikata Computing
http://digikata.com

In article 3DDBE15E.3080600@wide-open-west.com,

···

Thomas Gagné tgagne@wide-open-west.com wrote:

I’ve been asked by someone if there’s a Ruby binding to my
open-source middleware, isectd (see sig line). There is not.

I am curious if a) I can enlist anyone’s help here doing it
and b) how difficult do you think it might be?

I’ve written interfaces to it in Python, PHP, Java,
Smalltalk, C (it’s native interface), and a few others have
been contributed.

If I were to try doing it on my own where is it recommended
I start? I’m assuming I’ll need:

  1. a version to run on Linux
  2. some introductory material on the language and
    its syntax

Anything else you think I’ll need?

Any volunteers?

.tom
remove dashes in email for replies
http://isectd.sourceforge.net

Don’t know anything about how your app is written or organized, but if
it’s essentially a library of C functions then you can pretty easily build
an extension for Ruby using Swig (http://www.swig.org). As a side benefit
you can also use swig to build extensions for lots of different scripting
languages.

Phil