[Haskell-cafe] Re: Is it possible to model eventually consistent
es at ertes.de
Fri Jan 23 09:17:20 EST 2009
Daryoush Mehrtash <dmehrtash at gmail.com> wrote:
> I am trying to figure out if there is a way to model cloud computing
> computations in Haskell.
> My specific problems is that in cloud computing, as in Amazon
> WebServices, side effects (writes to storage, simple database, queue)
> follow the eventually consistent model. Which means even if your
> writes succeeds, it may or may not be immediately available for reads.
> Each call to the services may also temporarily experience network
> errors or end-system unavailability. Virtual machines can mount a
> local disk that does offers consistent storage, but the storage wont
> survive a reboot (after a crash).
> I am trying to find out if I can model computation (and its
> compositions) where I can hide reliability and consistency issues. And
> also be able to reason about a computation to make sure no combination
> of errors and inconsistencies would break my logic.
> Is it possible? If so is there a good starting point?
Haskell implements cheap concurrency, with which you can do these kinds
of things. There are a few communication and synchronization concepts.
You may be particularly interested in software transactional memory
(STM) . However, unfortunately we have not approached network
transparency yet, so you cannot use this with cloud computing for now.
However, of course nothing stops you from implementing the communication
between the hosts yourself. This shouldn't be too difficult.
nightmare = unsafePerformIO (getWrongWife >>= sex)
More information about the Haskell-Cafe