On Sun, Dec 25, 2005 at 05:42:43AM +0100, Jake J. wrote:
} I have a Rails web app that is database-centric (go figure). What I
} would like to do is expose certain parts of this database to an
} application running on a Windows box (or whatever). For the moment,
} let’s consider the read-only case, but authentication will be
} Is SOAP what would be used for something like this? Are there better
} The existing Windows app already has an interface to a local database
} using ODBC. Would it be reasonable to write an ODBC wrapper for the
} SOAP connection and essentially re-use this existing interface? The
} alternative (that I see at the moment) is to write the interface to my
} db as a plugin for that application.
It very much depends on your environment. In particular, it depends on
level of trust and your business requirements. If you have strong
requirements and do not trust the client (e.g. this client will be
distributed outside your company), SOAP is a plausible solution.
if you don’t trust the transportation mechanism (e.g. you need SSL
you are going over untrusted network links), SOAP is plausible. If,
however, this is an intranet client (e.g. a weekly report generator or
something) that deals with the same database as the web-facing Rails
I’d go with a straight connection between the client app and the
itself, without Rails being involved.
Even if you do have strong security requirements, a direct database
connection may be the right choice. If you give the client a DB login
very limited permissions (e.g. can run a limited set of stored
each of which requires authentication tokens in its arguments) and run
connections over SSL (or other encrypted network transport), that can
If it’s a matter of business rules that are already implemented in Ruby,
however, you will want some variety of RPC (remote procedure call, e.g.
SOAP) implemented in Ruby.