Webmachine as an application front-end
Justin Sheehy - Justin Sheehy - August 26, 2009Webmachine 1.4 is pushed to bitbucket, and is providing the HTTP face for a few interesting new software systems.
The very cool guys at Collecta have built a different sort of search engine, great for watching the flow of social-network sorts of conversation occurring about whatever topics you are interested in. The REST API powering that engine is written in Webmachine, and takes advantage of some of Webmachine’s more interesting features while interacting with other components. I’ll leave more detailed explanation of their technology to their excellent team and just say that they’ve built something very deserving of attention.
We have also used Webmachine to provide the HTTP interface to our decentralized document store: Riak. Webmachine’s ability to provide the full richness of HTTP’s capabilities while not dictating anything else about the shape of your application makes it a natural fit for the front end of a system like Riak. The first incarnations of Riak and Webmachine were each built at about the same time: late 2007. As they grew up together there were some internal interface design decisions that were more obvious to us as a result. The structure of Riak’s core operations map nicely to the universal interface that includes GET, PUT, POST, and DELETE not just by name but by their essential properties such as idempotency, safety, and defined semantics.
One aspect of the Web that has been essential to its success as the biggest distributed system in the world is the notion of links. This is also one of the things that differentiates Riak from some other data storage systems. It’s not exactly a graph database, but it adds some elements of a graph database on top of the great benefits that come with having a decentralized key/value store at the core. Documents in a Riak cluster can have links to other documents in that cluster. Riak itself can take great advantage of this internally, as the MapReduce programming model that we use is ideally suited to walking links in order to build up inputs for the next phase of computation.
These links ought to also be useful to clients, and in the context of HTTP this should be possible in a way that does not assume application knowledge on the part of a client. To that end, the newest release of Riak includes support for the Link header in HTTP responses. This allows clients to explore the link structure of a set of related documents without having to read or understand the body of those documents. Based on our past experience building applications atop Webmachine and Riak, we expect this to be an added bonus for rapid development.
Categories: Blogs Justin Sheehy
Comments
Guys from Collecta it is valid good fellows, have created really convenient system
Posted by Aleks on 06 Sep 2009 at 11:02
Add comment
Erlang on Twitter
» ingojaeckel (ingo jaeckel): Even more awesome, free Erlang resources http://t.co/blGINLJd
» DiTeam (Тимурка): @multybuq @ukhin руби хороший вариант :) можно даже без rails..попробуй erlang еще :)
» michelir5 (Micheli Gelatinous): @pharkmillups Still seeing it. I might just have to manually install it. The version of Erlang required by Riak is not current version in HB
» Angry_Lawyer (Tony Aldridge): @rvirding @saghul If Erlang kills you, does a supervisor automatically create a replacement of you?
» rvirding (Robert Virding): Softly I hope. RT @saghul: Slowly making progress… erlang is killing me.
» jsvd (João Duarte): RT @FrancescoC: Woot! RT @valdo404: Practical Erlang Programming at #QConLondon I want to go there
» saghul (Saúl Ibarra Corretgé): Slowly making progress… erlang is killing me.
» dlsspy (Dustin Sallings): @IbnFirnas heh. The erlang parts are still solid. The currently active alerting box is arm5, failed over from a pc that died one day.
» quercialwji2 (Quercia Quinn): @MikeSmooth_ABCs http://t.co/pPiIpTCx
» levicole (Levi Kennedy): @pharkmillups the homebrew version of erlang is the most recent version, and riak requires R14B I think.
Statistics
Number of aggregated posts: 10456
Number of comments: 1445
Most recent article: February 06, 2012
Latest comments
» simple smile on Scale means Skills: Very informative article. Pretty sure people would love to go to that place for shopping. Specially to those who are…
» simplesmile on 27 January 2012: Erlang Solutions embarks on an Erlang Embedded KTP: Your article will make the world better. Thanks again and good luck to you in your life. See you next time.simplesmile
» tandblekning easewhite on 08 February 2012: Erlang Express 3-day Course in San Francisco on 8 February: ncomprehensible to me now, but in general, the usefulness and significance is overwhelmingtandblekning easewhite