lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Nov 14, 2011 at 7:05 PM, Stefan Reich
<> wrote:

> "Mobility", here, is defined as the ability of any program to move to
> another computer at any time while preserving its full inner state
> (code+data+threads). (Outside connections, naturally, may have to be
> recreated after moving.)

You may be interested in Obliq.
(start with the slides)

Obliq allows closures to pass over the network, but it preserves
lexical scoping. In Lua terms:

local myio = io
function root()
  local fn ="/etc/passwd")
  return fn:read()

In this case, the value of myio is copied as an upvalue of root.
However, to preserve meaning, myio continues to refer to io on the
sending machine; it's replaced with a proxy if necessary. So the same
result will be printed whether computeServer is part of the same
process, a different local process, or a remote process: it prints the
first line of /etc/passwd on your machine.

computeServer may expose local objects as an argument to root.

You may want to borrow liberally from E ( ) as well.


(Obliq predates JavaScript by about a year; March of 1994.