[erlang-questions] Rest wrong, Append instead of PUT?

Joe Armstrong erlang@REDACTED
Mon Mar 17 21:12:03 CET 2008

I think I wanted both POST and PUT to be replaced by APPEND.

Why? APPEND destroys no data and I like the idea of immutable state.

For a long time I have thought that things like email, instant messaging,
clusters of nodes performing computations could all be programmed using
persistent queues (call them job queues if you like).

Many problems need to "put the data *somewhere* when processing is not
taking place" - traditionally many programs use two places to "put the
data then not
processing" these are in a database or in a file. Putting the data
somewhere when not processing has many advantages (we can change the
code, by taking the
data out of the program, changing the program, then putting the data back in) -
we can move both the data and the code to a new processor and so on. We can
turn the machine off ...

Putting data in a database when not using it is often overkill - email just
appends data to an inbox, persistent queues seem to be a very convenient data
structure for many problems. Just append requests to a persistent queue, then
wait for an anwser to be appended to your answer queue - wait long
enough and you should get an answer.

Email is pretty much like Erlang. Pid ! X appends X to Pid's message queue,
just like mailing to somebody@REDACTED The difference is that the mail case
posts to a persistent queue not a dynamic process.

Things like the Amazon Simple Queue service take up this idea.

I haven't implement this but a fault-tolerant persistent queue  object would be
highly useful.

     queue:append("Hostname", "queuename", Term) would do the job

 then an API to read the queue doing selective receive etc ....

 sending email would be

   queue:append("Host", "inbox", {email, From To, ...})



/Joe Armstrong

On Mon, Mar 17, 2008 at 3:42 PM, bryan rasmussen
<rasmussen.bryan@REDACTED> wrote:
> Hi,
>  I was just reading that at the recent Qcon that Joe Armstrong said in
>  one of the talks that Rest was wrong and PUT should be disallowed and
>  there should instead be an APPEND. The description was no more
>  detailed than that. I'm supposing that this reflects some particular
>  part of Erlang philosophy, probably somebody (or even Joe himself)
>  would be able to describe why this should be so? I'm just interested
>  in reading the particular argument which will probably be
>  enlightening.
>  Best Regards,
>  Bryan Rasmussen
>  _______________________________________________
>  erlang-questions mailing list
>  erlang-questions@REDACTED
>  http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list