web services concept question

B

Brian Wolf

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
 
R

Richard Conroy

[Note: parts of this message were removed to make it a legal post.]

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

Nick Brown

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 ;-)
 
M

Marnen Laibow-Koser

Nick said:
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 ;-)

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

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top