effect-handlers icon indicating copy to clipboard operation
effect-handlers copied to clipboard

Feature request

Open ohad opened this issue 10 years ago • 6 comments

Do you think you could implement transparent code migration?

ohad avatar Nov 10 '14 12:11 ohad

If I understand correctly you are talking about migrating a computation in progress to another machine.

At first glance it seems to me like a restricted version of this is possible. The restrictions being:

  • the two machines share complete codebase
  • the representation of the computation is serializable

These restrictions seem quite severe but I think it just means integrating CloudHaskell.

edofic avatar Nov 10 '14 12:11 edofic

Not at all!

The idea is that a computation returning a serializable value and involving algebraic effects whose parameter and arity types are serializable can be (extensionally) serialized into a value in the free monad (in a highly inefficient way!). The computation itself may involve non-serializable sub-parts, but these will not be sent over the network, merely be pre-computed.

The only thing the two machines should share is the interpreter part which reads a computation off the connection and executes it.

The handler implementation should be quite compact

ohad avatar Nov 10 '14 14:11 ohad

And what happens to non-terminating computations? Don't they generate rather large values in the free monad? Ok, you said it was inefficient...

andrejbauer avatar Nov 11 '14 09:11 andrejbauer

Non-termination is a computational effect. What kind of strange programming language would include non-termination by default and still consider itself pure?

ohad avatar Nov 11 '14 19:11 ohad

Haskell. Which is incidentally the language we are using.

edofic avatar Nov 11 '14 20:11 edofic

I think there's general leg pulling going on here. Let's just get back to coding ;-)

andrejbauer avatar Nov 11 '14 23:11 andrejbauer