Web services concept question

Hi

I am researching web services area area, I am interested in calling a
library written in C, more specifically a scripting language written in
C on another computer from a web client (sorry for sounding so naive!).

I assume the steps are something like this :

On client user enters, say:

x = y + z (return)

parse this script language into XML

<>x<>
<>=<>
<>y<>

send to server:

parse XML into script

process

send to client XML of expected responses
(including possibly a widget or graphics window)

hold this state waiting for next user input (or stop)

So I nend some package (Sinatra? ) provides, obviously a method for
passing calls in XML (or JSON).
I was wondering what the other issues are, not having done this before.

Could someone provide a rough road map to such a project. Do I need to
do anything to the C library, recompile , etc? Do I need to look at
additional or other packages? I realize this is a big question, but if
you could point me somewhere else to research this subject, that would
be great.

Thanks!

Brian

On Tue, Feb 2, 2010 at 9:37 PM, Brian W. [email protected] wrote:

Hi

I am researching web services area area, I am interested in calling a
library written in C, more specifically a scripting language written in C on
another computer from a web client (sorry for sounding so naive!).

Could someone provide a rough road map to such a project. Do I need to do
anything to the C library, recompile , etc? Do I need to look at additional
or other packages? I realize this is a big question, but if you could point
me somewhere else to research this subject, that would be great.

The approach you outlined looks very similar to an XML-RPC style of web
service. You are invoking a method/function in a service residing on
another
machine, by marshaling the invocation into an agreed upon XML syntax.

Web services is a big field - many would say unnecessarily
overcomplicated.
You will need to do a bit more research on this or you are going to feel
some true pain - there are a LOT of different pieces to the puzzle that
allow you to execute remote code.

You should consider going straight for a RESTful approach rather than an
RPC
based one. Your Web services will then start to look more like
conventional
web design (so the same skills are useful), except that you are
processing/returning XML or JSON.

regards,
Richard.

Your question is too vague to answer in full, but as far as implementing
web services goes, Sinatra + REXML is a great way to do this in Ruby.

You will probably want to come up with a more meaningful XML format than
“<>x<>”, though :wink:

Nick B. wrote:

Your question is too vague to answer in full, but as far as implementing
web services goes, Sinatra + REXML is a great way to do this in Ruby.

You will probably want to come up with a more meaningful XML format than
“<>x<>”, though :wink:

Or no XML format at all. JSON or YAML would be much less cumbersome.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs