Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Web Development

Introducing Intel Labs' River Trail

A few weeks ago, I attended the Intel Developer Forum 2011 (also known as IDF 2011) in San Francisco, California. Paul Otellini, president and chief executive officer of Intel Corporation, talked about the evolution of computing in his opening keynote. I noted five important things he mentioned while describing his vision for the future, which are closely related to the User eXperience (also known as UX):

  1. The user is in the center.
  2. Computing is about experiences.
  3. The experience is even more important than the device.
  4. User eXperience: anytime, anyway.
  5. All tied to an increasingly capable cloud.

JavaScript and HTML 5 are very important when Web developers have to create exciting and portable User eXperiences. However, serialized JavaScript code doesn't take advantage of more than one physical core.

JavaScript and HTML 5 are tied to an increasingly capable cloud. However, serialized JavaScript code can easily become a bottleneck even when tied to the most scalable cloud.

A few years ago, I wrote "Rich Services Cloud Applications Require Parallel Programming Skills" for Dr. Dobb's. I explained the simple and powerful idea of combining client-side parallelism with cloud-side parallelism. This combination allows developers to take advantage of modern multicore hardware on both sides and offer users the most exciting immersive interactions. Paul's keynote is pushing that idea even further because he considers that the experience is even more important than the device. No matter the number of physical cores you have in any device, you need software prepared to take full advantage of those parallel lanes to provide an engaging experience.

Intel Labs' River Trail project extends JavaScript to enable data parallelism and allows Web developers to take full advantage of multiple physical cores and vector instructions. The extensions to the JavaScript language are simple deterministic data-parallel constructs, and therefore, it is very easy to learn the API (and you can start using it in a few minutes). In addition, to make things simpler, the River Trail team created an interactive River Trail shell that runs in Firefox. The interactive shell allows you to understand the new constructs.

If you have data-parallel problems and you're working with JavaScript, you'll be able to achieve significant speedups by using River Trail over sequential JavaScript. River Trail will allow you to take full advantage of all the available cores to process data. Right now, River Trail is available as a Firefox extension that translates the data-parallel constructs at runtime into a low-level hardware abstraction layer. When you use Firefox on Windows, River Trail uses the Intel OpenCL SDK. However, it is an open source project, and even the source code for the popular and impressive particle simulation shown at IDF 2011 is available for download.

Of course, I didn't want to miss the technical session about River Trail and I had a chance to talk with the members of this exciting project. They explained to me that they started with Firefox but they wanted River Trail to be available in any browser with no limitations. They had to start somewhere and that's why Firefox is the first, but not the last, one.

I've already started working with River Trail and I found the Map/Reduce idioms to be really easy to use. River Trail is still work in progress, but it achieves excellent speedups with modern multicore hardware and even more when you run the code in multicore CPUs with AVX instructions. A few months ago, I had already explained the advantages of running as many SIMD instructions in parallel as available physical cores in "High-Level Programming Languages Should Improve Support for SIMD Instructions." River Trail does a really good job at achieving this. We just have to wait for it to be available in more browsers, such as Internet Explorer, Safari, and Chrome.

If you want to take full advantage of the underlying hardware with JavaScript, you have data-parallel problems, and Firefox is one of your target browsers, you definitely must take a look at River Trail.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.