Skip to content

Composing distributed Web applications

Alberto edited this page May 30, 2016 · 8 revisions

Transient is a haskell library that allows the creation of Cloud and Web applications that can be composed to create more complex ones.

This is an example using the library transient that combines two cloud applications using the <|> operator:

 main =  keep $ do
   port <- getPort
   initWebApp port $  mapReduce <|>  chat <|>  addNode

It also combines a third console application for adding nodes.

The first is a distributed map-reduce app that get a text and count the frequencies of words. The other is a federated chat, with N server nodes. Each one has his own Web interface.

The code run both in the browser and server. atRemote executes the argument in the server. clustered executes the code in all the server nodes connected.

[This video] (https://www.livecoding.tv/agocorona/videos/M5axK-testing-webcloud-computing-library-2/) shows everything running. It is livecoding so it may be slow and boring, sorry.

References:

Clone this wiki locally