Continuations in Jade

For questions and postings not covered by the other forums
allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Continuations in Jade

Postby allistar » Mon Oct 12, 2009 10:18 am

I have just watched the interesting video on "Swarm", an answer to "distributed computing in the cloud". The URL for the video is http://vimeo.com/6614042.

A particular feature being discussed is "continuations". In short, a continuation is where the state of execution of an application can be stored, and then continued later on. Kind of like a "save game", or "pause". Continuations become powerful when they can be continued on another process, or another computer altogether (a "remote continuation"). This would be a very powerful technology in Jade, as it would allow code to be distributed (and even parallelised) much more easily.

It seems to me that this is already implemented in Jade to a certain degree with the serverExecution method tag. By some magic Jade takes the call stack, all local variables and any transients it needs and executes the method on the server node. It then passes control back to the client node either when the method has completed, or when the clientExecution tag is encountered. From what I can tell this is kind of like a remote continuation.

It would be very nice if you could not only say "continue execution on the server", but "continue execution on a node/process that I specify". I know there are asynchronous methods, but they do not take the call stack, local variables or defined transients - an asynchronous method call spawns a call stack all of it's own. Parallelisation become a lot easier you could do something similar to a fork, where all required local data is fed to another process (which could be on another node) and then execution is continued there, with a result passed back to the calling process.

This concept could be extended by allowing a continuation to execute on an SDS system - so heavy data read processes (such as queries) can use data from multiple separate (read only) databases. Heavy data processing applications would benefit from this as the load could be spread not only among different nodes of the same system, but across different physical databases.

A question for other Jade developers: Has anyone started down the path of heavily parallelising the execution of a Jade system, or researched into getting a Jade system "in the cloud" (whatever that buzzword means to you)?

A question for the Jade plant or Jade support: At what level in the Jade technology stack is the serverExecution funcionality built? Is it at the kernel, the JOM or code in RootSchema? Are there any obvious technical impediments in using this technology to provide for some kind of remote continuation support in Jade?

User avatar
Dino
Posts: 49
Joined: Wed Jun 24, 2009 6:55 am
Location: London
Contact:

Re: Continuations in Jade

Postby Dino » Mon Oct 12, 2009 10:52 pm

Just to answer your last question. Server execution is implemented inside the JADE Object Manager (aka JOM, aka "the kernel"). It's not done by the RootSchema.

Dean.

swishy
Posts: 35
Joined: Mon Jun 22, 2009 10:22 am
Location: Christchurch
Contact:

Re: Continuations in Jade

Postby swishy » Thu Oct 15, 2009 1:56 pm

As far as the migration goes technically *most* of the underlying technologies save the machine state (memory etc included) when they migrate a node so your JADE application would be starting up where it was anyhow, the entire machine state is frozen during the transition and reinstated once residing on the new instance.
No substitute for C.I...... except boost.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 23 guests