Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
sherhut edited this page Aug 3, 2012 · 96 revisions

Background

The goal of Intel Lab’s River Trail project is to enable data-parallelism in web applications. In a world where the web browser is the user’s window into computing, browser applications must leverage all available computing resources to provide the best possible user experience. Today web applications do not take full advantage of parallel client hardware due to the lack of appropriate programming models. River Trail puts the parallel compute power of client’s hardware into the hands of the web developer while staying within the safe and secure boundaries of the familiar JavaScript programming paradigm. River Trail gently extends JavaScript with simple deterministic data-parallel constructs that are translated at runtime into a low-level hardware abstraction layer. By leveraging multiple CPU cores and vector instructions, River Trail achieves significant speedup over sequential JavaScript.

Getting Started

To get a feeling for the programming model and experiment with the API, take a look at our interactive River Trail shell. The shell runs in any current version of Firefox, Chrome and Safari. However, as it uses a sequential library implementation, you won't see any speedup.

You need to install our Firefox extension to use our prototype compiler that enables execution of River Trail on parallel hardware. You can download a prebuilt version for Firefox 14.x running on Windows and MacOS (older versions for older browsers can be found here). We no longer provide a prebuilt Linux version. However, you can easily build it yourself. We have written a README that explains the process. If you are running Firefox on Windows or Linux, you additionally need to install Intel's OpenCL SDK (Please note the SDK's hardware requirements.). Once you have the extension installed, take a look at our demos:

For a first impression, you can watch this video, as well.

A smaller example that gives a look behind the scenes and serves as an easy comparison of our programming model with WebCL is our

To dive deeper, the API design or the beginnings of our API documentation are a good starting point.

A word of caution: River Trail is a prototype and the extension is not yet meant for use on the public web. Please uninstall or disable the extension when surfing the web and use it only for web pages you trust.

Beyond the Prototype

The API described in the wiki reflects what the prototype implements. Some design choices, like for instance the use of extra arguments, is dictated by limitations of what our implementation approach allows. We have created a draft API specification (ECMA strawman) for River Trail that goes beyond the prototype's limitations and describes how we envision a final implementation. It is currently being considered for standardization by the ECMA TC39 committee. Feedback is highly appreciated and should be directed to the es-discuss mailing list.