the official tarpipe blog

June 3, 2009

Extending tarpipe with the REST connector

[warning: technical information ahead]

We've created a connector that lets you easily extend any workflow by connecting to an external REST endpoint. The REST connector is compatible with the Yahoo! Pipes Web Service Module — the only difference is that we only process with a single entry instead of a feed of entries.

The connector POSTs a JSON encoded list of properties to a service URL and expects a JSON or RSS formatted response. Here's an example JSON response:

  1. {
  2. "items"[
  3. {
  4. "title" : "My title",
  5. "link" : "http://example.com",
  6. "description" : "My Description"
  7. }
  8. ]
  9. }

The compatibility means that you can use any existing Web Service that already worked with Yahoo! Pipes. OpenCalais offers a service with those characteristics and we decided to give it a try with our new REST connector.

This example workflow uses the REST connector to talk directly to the Calais Yahoo! Pipes Web Service. The OpenCalais URL (including the API key) is specified using the TextInput connector.

Creating your own external Web service is also very easy. All you have to do is wait for a POST, process the incoming JSON information and output a JSON formatted response. Here's an example written in PHP:

  1. <?php
  2. //
  3. // Obtain the input from the POST "data" field
  4. //
  5. $input = json_decode($_POST['data']);
  6.  
  7. if ($input) {
  8. //
  9. // As an example, the output is copied from the input
  10. //
  11. $output = array();
  12. $output['title'] = $input->items[0]->title;
  13. $output['link'] = $input->items[0]->link;
  14. $output['description'] = $input->items[0]->description;
  15.  
  16. //
  17. // Output JSON encoded response
  18. //
  19. echo json_encode(array('items' => array($output)));
  20. }
  21. ?>

We hope this new REST connector will create new possibilities and expand what you can already do with your workflow. Please let us know how you'll use it with your Web services.

Filed under: code, news, release, workflow — Bruno Pedro @ 9:48 pm UTC

October 17, 2008

OAuth based API

After the huge success of our first publishing API we heard your suggestions and decided to improve it in a number of ways.

We just released an OAuth based API with publishing and also reading features, providing a better integration to anyone who wishes to develop an application that uses tarpipe.

OAuth logo

On the reading side, you'll now be able to obtain information about services, user activity actions and workflows. This will, for instance, allow you to give information to your users about which actions they can execute.

One of the publishing features that we're very excited about is the ad-hoc workflow execution. This API method lets you publish information by sending the workflow definition on the request itself.

Find out more by reading the documentation and requesting a consumer key and secret. Please let us know if you find any bug or have any suggestions.

Filed under: api, code, news, release — Bruno Pedro @ 4:09 pm UTC

October 13, 2008

We’re sponsoring the WireIt library

As a part of our ongoing commitment to Open Source we're very happy to announce that tarpipe is sponsoring the development of WireIt. This Open Source library accelerated the development of our workflow interface and it makes all the sense to help it grow.

WireIt logo

So, what is WireIt and why should you use it? Quoting WireIt's official description, "it's an Open Source JavaScript library to create Web wirable interfaces for Data flow applications, Visual Programming Languages or Graphical Modeling." Basically, it will let you create interfaces similar to the one we're using on tarpipe:

tarpipe using WireIt example

Eric Abouaf, the author of WireIt, has a lot of plans for future releases of the library. If you're a JavaScript developer or a Web designer, please give a hand to this fantastic project.

Filed under: code, javascript, news, opensource — Bruno Pedro @ 11:41 am UTC

April 11, 2008

We’re releasing eCouch

We're thrilled to announce that tarpipe is releasing eCouch as an Open Source project. eCouch was developed because other CouchDB Erlang applications didn't satisfy our needs. eCouch is being released under the LGPL license, which means that you can use the code in proprietary software.

CouchDB

In a nutshell, eCouch is an Erlang application that provides an API to a CouchDB server. eCouch follows all the OTP design principles and can run stand-alone with its own supervision tree or be included inside an existing supervision tree. For more information, please visit the eCouch Google Code project.

Big thanks to:

Filed under: code, news, release — Bruno Pedro @ 1:28 pm UTC

Powered by WordPress