Hi,

On Mar 30, 2008, at 9:04 PM, Fabio Forno wrote:
On Sun, Mar 30, 2008 at 8:38 PM, Egon Willighagen
<[EMAIL PROTECTED]> wrote:

 BTW, let me say that asynchronous RPC support in XMPP is very
 interesting for scientific workflow environments. This proposal
 addresses two problems which are important limitations of current
 approaches like SOAP over HTTP.

Indeed, it's interesting in general ;)

 1. many different data types. This is particularly a problem in
[...]
 2. asynchronise calls. This is also a big limitation of our current
tools. Call-by-reference does solve the problem of HTTP time outs on
[...]
 These two items combined, make this proposal an excellent candidate
 for running webservices in sciences like chemistry and biology.

I understand the scenario, as I've written it's more general than
scientific or biological computations (e.g send the input events from
a UI widget placed somewhere to a remote service). Basically you'd
like to do something like this:
- retrieve a data scheme from an end point
- send data to that end point
- receive (also asynchronously) data from that end point

Let's try to RESTify it in order to have a more general solution:
- retrieving the data scheme is an operation on a particular node (a
GET), so we don't need a particular action, just get it from the
correct node, e.g. GET /nodename/schemata

<iq from="..." to="..." id="..." type="set">
    <rest node="/nodename/schemata" action="get" xmlns="api:rest"/>
</iq>

I would use type='get' here.

REST allows you to tunnel the PUT/DELETE verbs over POST in case your transport is "verb-limited" like XMPP (only has get-set mapping to GET-POST on the HTTP side). So I would use the type attribute for the action, overloading the set to do DELETE/PUT when the need arises.

Also, not quite sure why you need xmlns='api:rest'. Why not xmlns='/ nodename/schemata' ? You already have the 'to' attribute on the top level iq stanza to send this to the proper destination.


- sending data is another operation on the node (the semantics of the
operation on the data is given by the combination of the data and the
node): POST /nodename payload

<iq from="..." to="..." id="..." type="set">
    <rest node="/nodename" action="post" xmlns="api:rest">
      <header><!-- optional --></header>
      <body><!-- optional xml payload--></body>
    <rest/>
</iq>

Same comments above apply here.

Best regards,
--
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: [EMAIL PROTECTED]
Use XMPP!


Reply via email to