lua-users home
lua-l archive

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

On 15/11/11 00:29, Josh Simmons wrote:
> What are the advantages? More importantly, what are the use-cases?

Hmm... how about a mail client? It's talking to a back-end server via
IMAP, which is an interface that's effectively stateless (as the
connection can be broken and recreated on demand). It stores a bunch of
local state, including cached messages, user preferences, pending
messages, and all the UI state.

I'm running it on an Android device reading my mail on the bus. I start
replying to an interesting message on Lua-L. My stop arrives. I chuck
the device in the bag and go home. Once I get home, I get my device out,
point it at my PC, and the mail client moves over to the desktop. I'm
still looking at the Lua-L folder, the compose window is open with my
text in it, and the cursor is exactly where I left it.

Given the MVC triad, the M part lives on the cloud and the VC part is

> To me the issue with writing applications that run across multiple
> machines is reliable concurrent access to shared data, not maintaining
> a consistent internal program state.

That's actually pretty easy. Most cloud RPC protocols these days are
stateless, or nearly so, because it makes a huge number of problems go
away. Traditional AJAX involves setting up and tearing down a TCP/IP
session for every RPC request...

I think the biggest problem, though, is that data fundamentally cannot
be moved, only copied. But we really, really don't want two copies of
your app running at once. The move process needs to be destructive; once
the app has successfully transferred itself to another device the
version on the original device must not be allowed to run. Otherwise we
end up forking the state of the app, which means that both clones can
mutate independently, and *then* we end up with hideous issues trying to
merge them back together.

Stefan, what's the architecture? What APIs are available to such an app?
I assume they're in tough sandboxes with very restricted access to the
outside world.

┌─── ───── ─────
│ "Never attribute to malice what can be adequately explained by
│ stupidity." --- Nick Diamos (Hanlon's Razor)

Attachment: signature.asc
Description: OpenPGP digital signature