2007-06-06
Asynchronous Javascript
Ajaxian has a post about a new abstraction based around the recent Google Gears API for executing Javascript asynchronously.
What the Google Gears API provides is the ability to execute Javascript in a different browser thread, and to communicate with those threads via simple message passing. The new abstraction referenced in the Ajaxian post expands on this to allow registering handlers that can receive named messages.
This approach seems very similar to Erlang's lightweight processes and the ability to send messages to and from them. I think that having this type of functionality in Javascript would be very useful but expanding it to be more like Erlang's or Termite's API would be nicer. I did some experiments with this previously using Narrative Javascript.