API for an online database.

Armitage

Banned
Feb 23, 2001
8,086
0
0
So we have a site that we're going to be publishing "soon". Perl scripting with a MySQL DB behind it. We would like to also develop an API that users could incorporate directly into their applications to access the database over the net and retrieve data. My guess is we'd publish a reference implementation in some scripting language (probably Perl or Python), and folks can reimplement in the language of their choice.

Any suggestions on how to go about this? My first thought is to just have the API functions send a regular http request with the function name & parameters as get args to a CGI handler script on the server side that processes the request, and sends back the data. On receiving the data, the API function parses it out and inserts it into a native data structure.

Sound reasonable? Ideas? Suggestions?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Sounds like a web service. The client-side calls will easily work across multiple platforms and languages.

Here's a quick and dirty article that explains how to set up a SOAP server in Perl. I'm sure there are other guides out there.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
SOAP is shiny new, but adds overhead compared to just using CGI code. Use SOAP if it saves you a lot of time, but don't use it just because you can.

SOAP, like XML, doesn't magically make servers and clients interoperate. You not only have to spend time on the WSDL, but both the client and server need to use XML + SOAP toolkits for the transaction, and that only gets you parameter encoding and decoding, both ends still need to write code to send data and process the recieved results.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: DaveSimmons
SOAP is shiny new, but adds overhead compared to just using CGI code. Use SOAP if it saves you a lot of time, but don't use it just because you can.

SOAP, like XML, doesn't magically make servers and clients interoperate. You not only have to spend time on the WSDL, but both the client and server need to use XML + SOAP toolkits for the transaction, and that only gets you parameter encoding and decoding, both ends still need to write code to send data and process the recieved results.


So, you're suggesting that something along the lines of my original suggestion my be a more efficient way to go?

Although, I doubt that performane is really my primary driver here ... more likely it's ease of implementation & maintenence.

Are SOAP libraries available for most platforms & languages ... especially Windows, SGI, & Linux/C C++ & Java?

Well, off to do some reading...
Thanks
 

arcain

Senior member
Oct 9, 1999
932
0
0
Originally posted by: Armitage
Originally posted by: DaveSimmons
SOAP is shiny new, but adds overhead compared to just using CGI code. Use SOAP if it saves you a lot of time, but don't use it just because you can.

SOAP, like XML, doesn't magically make servers and clients interoperate. You not only have to spend time on the WSDL, but both the client and server need to use XML + SOAP toolkits for the transaction, and that only gets you parameter encoding and decoding, both ends still need to write code to send data and process the recieved results.


So, you're suggesting that something along the lines of my original suggestion my be a more efficient way to go?

Although, I doubt that performane is really my primary driver here ... more likely it's ease of implementation & maintenence.

Are SOAP libraries available for most platforms & languages ... especially Windows, SGI, & Linux/C C++ & Java?

Well, off to do some reading...
Thanks


Amazon has 2 interfaces for its web services. One is SOAP I believe (I don't remember, it was a while ago since I worked with it, and I chose not to use this option), and the other was more in line with what you described (passing in parameters in the URL, and returning data in the body. Amazon passed it back in XML). I had read somewhere that the majority of the users of Amazon's webservices was using hte second method (passing params in the URL).
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |