Hi,
Summary:
We are close to finishing an industry strength yet simple REST Web-Service interface that exposes most of OpenACS/]po[. The code is available under the GPL V2 or higher at:
cvs -d :pserver:mailto:anonymous@cvs.project-open.net:/home/cvsroot checkout intranet-rest
We are posting this information because we would like to receive feedback on the structure of the REST interface.
Here is the Story:
For a recently acquired customer we have to create a Web services that exposes _all_ of OpenACS/]project-open[ to 3rd party (M$-) applications via a Web service.
Fortunately, the customer is pretty neutral with respect to the type of Web-Service used. Going the REST way, I believe we are - finally - getting closer to a truly universal Web-Service that fulfills the dream of:
- Being simple to understand, use and maintain
- Cover all important areas of OpenACS/]po[
Looking at Twist and XoSOAP in the past months, I just didn't get a good feeling. XoSOAP seems to be quite advanced, but probably too complex for 98% of all developers in this world. Considering that more then 10 different applications will have to access the Web-Service, we need something simple, robust, maintainable and interoperable with the Microsoft world.
So in the last weeks we have put together an advanced prototype of a REST-based Web-Service that exposes basically all OpenACS/]project-open[ objects.
The basic idea of this "intranet-rest" service is to use existing meta-information from acs_object_types and acs_object_type_tables to implement generic "CRUL" operations:
- R=Read: Return all fields of an object by going through the object's database tables and their columns. Just map database columns and their values to XML tags.
- U=Update: Update the object's database columns in the same way as R=Read.
- L=List: List the objects for a given object type, allowing the user to pass a security-checked WHERE-query via the URL.
- C=Create: We have decided to use custom TCL procedures per object type to handle object creation. That seems OK, because our customer's applications actually need to "create" only few object types.
Please see http://www.project-open.org/documentation/download/file/PO-Dev-REST-Interface.091218c.ppt for a detailed design document.
The advanced prototype is already running in the Internet. Please go to http://po34demo.project-open.net/, login as "Ben Bigboss" and then enter the URL /intranet-rest. The "HTML mode" will allow you to browse and explore the REST resources interactively. For XML access just try a query like this one:
wget -O - --user=bbigboss@tigerpond.com --password=ben --auth-no-challenge http://po34demo.project-open.net/intranet-rest/im_project/16030
As I said: We would be very interested to receive feedback.
Cheers!
Frank