-
Notifications
You must be signed in to change notification settings - Fork 28
Transient and HAXL
Asked here: https://news.ycombinator.com/item?id=11486401
Please correct me if the assumptions about Haxl are wrong:
Haxl is a great Haskell library and probably the biggest contribution to getting Haskell out of the academia. It is optimized for fetching querying and caching data sources, among other things, making use of parallelism and concurrency while maintaining a level close to the domain problem.
It uses a controlling thread that spawn worker threads and is single purpose. No distributed computing in the strong sense.
transient has no controlling thread. It run multiple threads and is general purpose.
The alternative operator <|> can spawn parallel threads/or parallel distributed computations that follow the flow of the monad. for example:
r <- runAt node1 foo <|> runAt node2 bar
lliftIO $ print r
will print two results, since there are two thread generated. Well there may be any number of results because any of the two branches may generate multiple threads or none, since they can stop without any result.
(if we need a single thread, we can use collect
)
note that foo
and bar
are distributed programs as well, so they can invoke other nodes and so on.
| 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