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
<stefan.reich.maker.of.eye@googlemail.com> 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. http://lucacardelli.name/Obliq.html
(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 = myio.open("/etc/passwd")
  return fn:read()
end
print(computeServer.run(root))

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 ( http://erights.org/ ) as well.

Jay

(Obliq predates JavaScript by about a year; March of 1994.
news:2mjegu$13k@src-news.pa.dec.com
http://groups.google.com/group/comp.lang.modula3/msg/58fa5c4067c4690d
)