Is it possible to model eventually consistent side effects?

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? -- Daryoush

Daryoush Mehrtash
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) [1]. 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. [1] http://haskell.org/haskellwiki/Software_transactional_memory Greets, Ertugrul. -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://blog.ertes.de/
participants (2)
-
Daryoush Mehrtash
-
Ertugrul Soeylemez