Gem from StackOverflow

Post date: Jul 10, 2011 6:39:25 AM

Found in notes to this question on Stack Overflow:

I want to implement the business layer in Erlang and then access it via multiple front-ends using REST.

First comment:

"Do you really mean a RESTful interface or RPC over HTTP? Building a RESTful interface on top of an existing layer is more work than just exposing existing methods via HTTP. I'd suggest to use mochiweb or yaws to implement a (generic) rpc layer."

Response:

"As already mentioned Yaws or Mochiweb are a great way to go but if you'd like a dead simple way to get your RESTful API done quickly and correctly then use Webmachine. It's a layer on top of Mochiweb that implements proper HTTP behavior based on Alan Dean's amazing HTTP flow diagram and makes it easy to get REST done right.

This diagram is illustrative of the flow of processing that a webmachine resource goes through from inception to response.

Version 1 of this diagram, from Alan Dean, was the inspiration for webmachine_decision_core. Versions 2 and 3 were created in collaboration between Alan Dean and Justin Sheehy.

A copy of Version 3 is found in the webmachine source tree for convenience.

Available under Creative Commons attribution license to BitBucket and Justin Sheehy, creator of Webmachine.

Original version of Webmachine: Original version of Webmachine

A REST-based system for building web applications The RESTful way

Click on diagram, click on URL and select "original" to view full size image on left.

Version 2, by Justin Sheehy and Alan Dean: https://bitbucket.org/justin/webmachine/wiki/BigHTTPGraph

The official location of Webmachine is now http://webmachine.basho.com/.

Welcome to Webmachine!

Webmachine is not much like the Web frameworks you're used to. You can call Webmachine a REST toolkit if you like, and we won't argue with you.

It is an application layer that adds HTTP semantic awareness on top of the excellent bit-pushing and HTTP syntax-management provided by mochiweb, and provides a simple and clean way to connect that to your application's behavior.

Webmachine logo and information from Mercurial/ Atlassian:

An update via Justin Sheehy

"I would add that we have deprecated that older location for webmachine, and if you always want to see the latest version you want to look for the copy under the "basho" user, not my name: bitbucket.org/basho/webmachine or github.com/basho/webmachine."