RFC: ruote-kit

0 views
Skip to first unread message

Kenneth Kalmer

unread,
Mar 6, 2009, 8:20:39 AM3/6/09
to openwfe...@googlegroups.com
Hi all

John and myself have been talking about cleaning up ruote-rest for quite a while now, and today we concluded that I'll be starting a brand new project called ruote-kit. The name is definitely gonna raise a few eye brows, but that is besides the point. One of the goals is to free up John's time to focus more on ruote itself and ruote-web2, while I focus on making a container for ruote that eases using it from any language/platform.

I've made a gist (http://gist.github.com/74844) with my current wishlist for the project.

I'm looking for some feedback from other users before I start writing a single line of code, so please have a look and pass feedback here.

Kind regards

--
Kenneth Kalmer
kenneth...@gmail.com
http://opensourcery.co.za

John Mettraux

unread,
Mar 6, 2009, 10:03:46 AM3/6/09
to openwfe...@googlegroups.com
On Fri, Mar 6, 2009 at 10:20 PM, Kenneth Kalmer
<kenneth...@gmail.com> wrote:
> Hi all
>
> John and myself have been talking about cleaning up ruote-rest for quite a
> while now, and today we concluded that I'll be starting a brand new project
> called ruote-kit. The name is definitely gonna raise a few eye brows, but
> that is besides the point. One of the goals is to free up John's time to
> focus more on ruote itself and ruote-web2, while I focus on making a
> container for ruote that eases using it from any language/platform.
>
> I've made a gist (http://gist.github.com/74844) with my current wishlist for
> the project.

Hi Kenneth,

about "fast fast fast", there is one important thing we have to
leverage, it's conditional GETs. Ruote-rest is already leveraging it,
but it's custom made. The newer releases of Rack provide middlewares
for simplifying that. Worth considering.

Looking forward to ruote-kit !

--
John Mettraux - http://jmettraux.wordpress.com

Pat G Cappelaere

unread,
Mar 6, 2009, 1:20:58 PM3/6/09
to openwfe...@googlegroups.com
Ken,

You may want to look at the work done by the OGC and Workflow Management Coalition with a RESTful interface (WfXML) for workflows.
I still need to update the spec but it is a good starting place.
Pat.

Kenneth Kalmer

unread,
Mar 9, 2009, 4:19:00 AM3/9/09
to openwfe...@googlegroups.com
Thanks Pat, I've applied for group membership and will be researching the topic in the coming days.

Best

John Mettraux

unread,
Mar 12, 2009, 10:12:19 PM3/12/09
to openwfe...@googlegroups.com
On Mon, Mar 9, 2009 at 5:19 PM, Kenneth Kalmer <kenneth...@gmail.com> wrote:
> Thanks Pat, I've applied for group membership and will be researching the
> topic in the coming days.

Hi List,

I discussed the subject with Kenneth on #ruote. I was thinking about a
tiny step toward the ideal of REST :

making sure that all the representations returned by ruote-kit (and
ruote-web2) include links to the other top resources and flag those
links with a decent "rel" value.

For example, right now, requesting a workitem as JSON, yields something like :

{
"last_modified":"today",
"type":"OpenWFE::InFlowWorkItem",
"participant_name":"hector",
"attributes":{"count":2,"car":"prius"},
"links":[{"href":"\/workitems","rel":"via"},{"href":"\/workitems\/20080919-equestris\/0_0","rel":"self"}],
"dispatch_time":"yesterday",
"flow_expression_id": {
"expression_id":"0.0",
"workflow_definition_url":"http:\/\/test\/test.xml",
"engine_id":"this",
"workflow_definition_name":"test",
"workflow_definition_revision":"1.0",
"workflow_instance_id":"20080919-equestris",
"owfe_version":"0.9.20",
"expression_name":"do-test"}
}

the links in this example are limited (but present) :

"links":[
{"href":"\/workitems","rel":"via"},
{"href":"\/workitems\/20080919-equestris\/0_0","rel":"self"}
]

(note that ruote-web2 and ruote-rest will return absolute links)

I'm planning on adding link to the top resources. In this exampe,
there is only a link to the "/workitems" top resource flagged "via".
I'd like to output something like

"links":[
{"href":"\/workitems","rel":"via"},
{"href":"\/workitems\/20080919-equestris\/0_0","rel":"self"},

{"href":"\/processes","rel":"http://openwferu.rubyforge.org/rels/processes"},
{"href":"\/workitems","rel":"http://openwferu.rubyforge.org/rels/workitems"},
{"href":"\/expressions","rel":"http://openwferu.rubyforge.org/rels/expressions"},
{"href":"\/history","rel":"http://openwferu.rubyforge.org/rels/history"}
]

Note the use of URIs as rel values. Those URIs could be simply markers
in the beginning (ie pointing to nothing), maybe later, the endpoints
could hold something sensible. At least it spares us from petitioning
a microformat [0]. See also [1] and [2].

XML and HTML representations would follow that model as well.

I think that meaningful links and decent representations are at the
heart of a good [tending towards the ideal of] REST interface. REST
doesn't care about nice-looking and human readable URIs for resources,
but fortunately, such URIs are easy to come up with.


What do you guys think ? (In summary, it wouldn't change much, but I
want to communicate that emphasis)


Best regards,


[0] http://microformats.org/wiki/Main_Page
[1] http://tools.ietf.org/id/draft-nottingham-http-link-header-03.txt
- "A link relation type identifies the semantics of a link..."
[2] http://blog.unto.net/web/a-survey-of-rel-values-on-the-web/

Reply all
Reply to author
Forward
0 new messages