-
Notifications
You must be signed in to change notification settings - Fork 28
Composing distributed Web applications
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:
| Intro
| How-to
| Backtracking to undo IO actions and more
| Finalization: better than exceptions
| Event variables: Publish Suscribe
| Checkpoints(New), suspend and restore
| Remote execution: The Cloud monad
| Clustering: programming the cloud
| Mailboxes for cloud communications
| Distributed computing: map-reduce