Forum: Ruby on Rails Rails + SOAP ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jake J. (Guest)
on 2005-12-25 06:42
Hello-

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 required.

Is SOAP what would be used for something like this?  Are there better
alternatives?

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.

I'm very new to some of this terminology, but would be interested in
hearing more of it!

   Jake
Gregory S. (Guest)
on 2005-12-25 07:19
(Received via mailing list)
On Sun, Dec 25, 2005 at 05:42:43AM +0100, Jake J. wrote:
} Hello-
}
} 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
required.
}
} Is SOAP what would be used for something like this?  Are there better
} alternatives?
}
} 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
the
level of trust and your business requirements. If you have strong
security
requirements and do not trust the client (e.g. this client will be
distributed outside your company), SOAP is a plausible solution.
Likewise,
if you don't trust the transportation mechanism (e.g. you need SSL
because
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
app,
I'd go with a straight connection between the client app and the
database
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
with
very limited permissions (e.g. can run a limited set of stored
procedures,
each of which requires authentication tokens in its arguments) and run
all
connections over SSL (or other encrypted network transport), that can
work
equally well.

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.

}    Jake
--Greg
Jake J. (Guest)
on 2005-12-26 20:21
Gregory S. wrote:
> It very much depends on your environment. In particular, it depends on
> the
> level of trust and your business requirements. If you have strong
> security
> ...
> --Greg

Thanks for your comments Greg.  In my case, this will be a web
deployment to a number of businesses and other customers, so security is
important.  Although I'm not very well versed in SOAP, I've looked at
its XML syntax and some very rudimentary implementations and it seems
quite appropriate for what I'd like to do.

My main questions now are how to develop the server and client software.
The server would ideally be implemented as a plugin of sorts (or
first-class citizen, really) to my existing Rails application.  Would it
be implemented in Ruby?  Better as another accessor to the MySQL backend
in some other language?

As for the client, what development environments are favored?  .NET?
C++?  Others?

  Jake
Gregory S. (Guest)
on 2005-12-26 20:28
(Received via mailing list)
On Mon, Dec 26, 2005 at 07:21:19PM +0100, Jake J. wrote:
} Gregory S. wrote:
} > It very much depends on your environment. In particular, it depends
on
} > the
} > level of trust and your business requirements. If you have strong
} > security
} > ...
} > --Greg
}
} Thanks for your comments Greg.  In my case, this will be a web
} deployment to a number of businesses and other customers, so security
is
} important.  Although I'm not very well versed in SOAP, I've looked at
} its XML syntax and some very rudimentary implementations and it seems
} quite appropriate for what I'd like to do.

Ideally, you shouldn't have to think about the SOAP syntax at all, and
the
Ruby (or other) framework should just deal with it.

} My main questions now are how to develop the server and client
software.
} The server would ideally be implemented as a plugin of sorts (or
} first-class citizen, really) to my existing Rails application.  Would
it
} be implemented in Ruby?  Better as another accessor to the MySQL
backend
} in some other language?

Ruby, and part of your Rails app.

} As for the client, what development environments are favored?  .NET?
} C++?  Others?

It depends on your taste. If I were writing a Windows app that made SOAP
calls, I'd almost certainly use .NET. Then again, I develop .NET apps
for a
living, so YMMV.

}   Jake
--Greg
Jake J. (Guest)
on 2005-12-26 20:36
Gregory S. wrote:
> It depends on your taste. If I were writing a Windows app that made SOAP
> calls, I'd almost certainly use .NET. Then again, I develop .NET apps
> for a
> living, so YMMV.
>
> }   Jake
> --Greg

Thanks again, Greg.  Last question -- any good examples of this?  The
"soap4r" thing that many folks point to is a client-side application.
Are there any good server side samples?

   Jake
This topic is locked and can not be replied to.