• Google Summer of Code Project for Plone Web Services

last modified August 10, 2009 by pumazi

A Google Summer of Code project to implement web services for Plone has been approved! It will build on work that has already been done by Mike Mulich in his wsapi4plone project, which provides an XML-RPC web services interface to Plone.

Participants

From Penn State

  • Kevin Kalupson (mentor)
  • Mike Mulich (student)

From Team Rubber

  • ­­Matthew Wilkes (mentor)

Google Summer of Code

  • ­Chelsea Bingiel (student)

wsapi4plone.parfait

wsapi4plone.parfait will be a Web Services Gateway Interface (WSGI) middleware application that provides an Atom Publishing Protocol interface to a Plone site. (This builds on the thinking done at the 2008 Plone Conference - see the project homepage.)  The process looks something like: atompub_diagram.png


Requirements

  • Configure it to interface to a (single) Plone site
  • Takes AtomPub requests for elements on the Plone site - a content item, a folder/collection, or an Open Search
  • Reformats to a wsapi4plone xmlrpc request and sends to Plone site
  • Gets back Plone's response in xmlrpc format
  • Reformats response into AtomPub and sends back
  • Should be as simple and fast as possible
wsapi4plone.parfait only needs to speak AtomPub - no web browsing interface is required.

Implementation Platform

­
If wsapi4plone.parfait is to work with existing Plone sites, it cannot be a WSGI component (as most existing Plone sites are not WSGI-ified). However it should be designed so that it will be easy to turn it into a WSGI component in the future.

In order to keep it as lean and fast as possible, we are thinking of building it using repoze.bfg.

URIs


The Plone site provides browsable, human readable content, and the wsapi4plone.parfait application provides machine readable AtomPub formated content. They are reached at different URIs. For example, if the Plone site is at http://myplone.org, the parfait middleware application could be at http://atom.myplone.org  (just an example - it could also be at http://myplone.org:8181 or http://foobar.com).  If a page lives at http://myplone.org/folder/page, and parfait lives at http://atom.myplone.org, then the page's AtomPub representation would be located at http://atom.myplone.org/folder/page.

collective.opensearch


It would be useful for Plone to directly support the Open Search standard without going through parfait. The work done by Hector Jose Rico Garcia on the Jaop product has been moved to the collective.opensearch project.

Make Plone Speak Json

It would be nice if a Plone content item, a folder, a collection, or an Open Search, could directly provide easily mashup-able content. For a content item, this means getting name-value pairs for every field; for a folder, collection, or search result this means getting a list of titles, descriptions, and URI links to all children/results. The most commonly used format for these kind of mashable results these days is json.

We propose to extend the wsapi4plone interface to have the option of returning results in JSON, in addition to XML-RPC. This could be done based on the HTTP request header (text/xml gets XML-RPC, anything else gets JSON) or based on the method name (get_object returns XML-RPC, get_jason returns JSON).