GPU Accelerating Node.js Web Services and Visualization with RAPIDS

Rate this content
Bookmark
The video discusses GPU acceleration in Node.js, allowing performance optimization without changing existing code. It showcases Sigma JS for graph rendering and geospatial visualization with Deck GL. Key topics include GPU memory loading, server-side compute, and using multiple instances to access the same GPU. The video demonstrates ETL data processing with a 1.2GB dataset of US car accidents, highlighting the speed of GPU operations. Rapids is introduced as an open-source GPU-accelerated data science platform, and Node Rapids as its modular library bindings in Node.js. The talk covers libraries like cuDF for DataFrame operations and cuML for machine learning algorithms. It also mentions the use of WebGL, OpenGL, and NV encoding for high-performance visualizations. Future plans include better developer UX, npm installation, and Windows WSL 2 support.

From Author:

The expansion of data size and complexity, broader adoption of ML, as well as the high expectations put on modern web apps all demand increasing compute power. Learn how the RAPIDS data science libraries can be used beyond notebooks, with GPU accelerated Node.js web services. From ETL to server side rendered streaming visualizations, the experimental Node RAPIDS project is developing a broad set of modules able to run across local desktops and multi-GPU cloud instances.

This talk has been presented at JSNation 2022, check out the latest edition of this JavaScript Conference.

FAQ

Rapids is an open-source GPU-accelerated data science platform that offers data science libraries and visualization tools. It includes libraries like cuDF for DataFrame operations and cuML for machine learning algorithms, primarily designed for Linux-based systems but accessible on Windows via WSL 2.

Node Rapids is an open-source project providing modular library bindings of Rapids in Node.js. It focuses on accelerating data science and visualization pipelines fully in JavaScript and TypeScript, enhancing the performance of web applications by utilizing GPU acceleration.

Node Rapids allows developers to use JavaScript for high-performance computing traditionally done in Python or C++. By integrating Rapids' GPU-accelerated libraries into Node.js, it enables faster data processing and advanced visualization capabilities directly within JavaScript environments.

Node Rapids supports high-performance, browser-like visualizations using libraries such as DataShader for server-side rendering of large datasets. It also integrates with WebGL to allow enhanced graphics rendering capabilities via OpenGL, making it suitable for interactive and complex visual data representations.

Node Rapids is comprised of several components including memory management with access to CUDA for GPU memory, data science libraries like cuDF and cuGraph, and a graphics column that leverages WebGL and OpenGL. It also supports GPU video encoding and streaming capabilities for dynamic data interaction.

Yes, Node Rapids can be used on Windows systems through the Windows Subsystem for Linux 2 (WSL 2). However, while compute functionalities are supported, rendering capabilities might be limited until further updates provide enhanced support.

Future plans for Node Rapids include improving the developer experience, making installation easier potentially via npm, expanding visualization applications, and striving for full support on Windows with WSL 2, including OpenGL capabilities.

Node Rapids bridges the gap between high-performance computing and web development by bringing powerful GPU-accelerated data science capabilities to JavaScript developers, without the need to learn new programming languages.

Allan Enemark
Allan Enemark
26 min
20 Jun, 2022

Comments

Sign in or register to post your comment.

Video Transcription

1. Introduction to GPU Acceleration and Node Rapids

Short description:

Welcome to GPU Accelerating Node.js Web Services and Visualization with Rapids. Rapids is an open-source GPU-accelerated data science platform, and Node Rapids is an open-source modular library of Rapids-inclusive bindings in Node.js. Our main goal is to accelerate data science and visualization pipelines fully in JavaScript and TypeScript, and bring GPU acceleration to a wider variety of NodeJS and JS utilities.

Hi, and welcome to GPU Accelerating Node.js Web Services and Visualization with Rapids. I'm Allan Ane-Mark, and I am the lead in the Rapids Viz team here at NVIDIA.

So, Rapids is an open-source GPU-accelerated data science platform, and then you can find more details at rapids.ai and nvidia.com, and Node Rapids, which is the project I'm going to be talking about, is an open-source modular library of Rapids-inclusive bindings in Node.js, as well as some other complementary methods for supporting high performance browser-like visualizations. It's currently in technical preview, but you can find more details about it at github.com slash rapids.ai slash Node.

And really, our main goal in this framework is creating something that can accelerate data science and visualization pipelines fully in JavaScript and TypeScript, which is something that is traditionally done mostly in, say, Python. And our second goal is bringing GPU acceleration to a wider variety of NodeJS and JS utilities, since we feel like the general community is sort of getting not as much access to these high-performance tools as we'd like.

2. Introduction to Node Rapids

Short description:

Rapids provides data science libraries, machine learning algorithms, and visualization tools. It is traditionally used with Python and C++, but can also be used with Windows through WSL 2. In the Viz ecosystem, libraries like Cougraph and DataShader are used for creating dashboards and server-side rendering. Node Rapids aims to bring high-performance data science capabilities to Node.js, allowing developers to leverage existing JS vis libraries and accelerate their applications. It provides a streamlined API to the Rapids platform without the need to learn a new language or environment.

So what do you get with Rapids, which is traditionally Python and C++? You get these data science libraries, such as DataFrame Operations in CUDF, you get CUML, which is a lot of GPU accelerated machine learning algorithms, Cougraph, Forgraph stuff, Spatial, Signal, all the like, and more being developed continuously, and these are continuously getting improved. The caveat being these are mainly around Linux-based systems, so if you want to use Windows with them, you can. It has to be through WSL 2, however.

So what kind of libraries in the Viz ecosystem traditionally happen in Python? So we have our own Cougraph filter, which is a notebook-based cross-filtering tool where you can create these dashboards very quickly in a few lines of Python code, and then very quickly interact with hundreds of millions of rows of data in a pretty customizable way. And we make extensive use of one of the other great Viz libraries out there called DataShader, which is great at server-side rendering hundreds of millions of points. All this is GPU-accelerated. And really part of this great ecosystem of Viz and Analytics tools, which sort of lie on the spectrum between your back-end C, C++, Python that sort of transitions into just front-side JS. And really when it comes to the Data Science and Compute, then mainly analytic stuff, more on the performance side, it all sort of starts with the Python C++ side. And it sort of is like then translated into JavaScript for like interface stuff. You have some that are a little bit more in an intermediary, but really it sort of starts there and then ends up in JavaScript, or just stays in JavaScript. What we're sort of proposing is the inverse. We're going to start with the JS libraries and then bring them back to this more high-performing back-end in Node.js. So give them access to CUDA, and CUDF, Cugraph, all those sort of things.

So our experience with this is sort of started a while ago when we were making lots of demos for RAPIDS, and in this case we were making a great mortgage visualization where you have DECGL and React, and it all was kind of a very fast nice interface. It fits all kinds of different screens and all that, but the backend was a mess. We had multiple languages, multiple servers. It sort of became unsustainable, and we just basically each gave up, said, oh, well, let's just do it in Python and Notebooks. But deep down we were really kind of sad because there's all these great JS Viz libraries and the kind of custom abilities you get using them that we sort of were lacking, and it's a shame because now you kind of have this two continental divides, right? You have Python and C++ and you have JavaScript and TypeScript and this chasm between them where you're sort of separating the capabilities between them. So on one side you get direct access to hardware, you know, most of the HPC, high-performance computing, data science and compute libraries are in this space. Not the best usability because it's like a high learning curve, but this is the place to go for that high-performance stuff. On the other side you kind of have the JavaScript-TypeScript where you have your nice browser environment which is great for shareability and accessibility and compatibility, in my opinion a little bit more refined visualization and interface libraries, but again you don't get that performance because you're sort of bounded by the browser sandbox. So it's kind of a shame because you have, you know, data scientists and engineers and folks in front of those and they're kind of all siloed in their side but they can mutually benefit from each other's tooling and experience. So, hence Node Rapids, where we're hoping to give the Node.js dev community the streamlined API to a high-performance data science platform, Rapids, without the need to learn a new language or environment. So you can then leverage Rapids and Node.js features, you can accelerate the catalog of great JS vis libraries already out there without major refactoring, you can learn locally or through cloud instances and it's sort of well suited for accelerated vis apps, Node service apps, and again you help enable these two communities to more closely work together and vice versa. So, that's sort of the high ideals and what's the actual meat and bones of this thing? Well, here it is, Node Rapids. It's a very modular kind of library. So, it's a buffet style. You kind of pick and choose what you need for your use case. It's kind of organized in these main categories. The main being the memory management that gives you access to CUDA, so GPU memory.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

(Easier) Interactive Data Visualization in React
React Advanced Conference 2021React Advanced Conference 2021
27 min
(Easier) Interactive Data Visualization in React
Top Content
This Talk is about interactive data visualization in React using the Plot library. Plot is a high-level library that simplifies the process of visualizing data by providing key concepts and defaults for layout decisions. It can be integrated with React using hooks like useRef and useEffect. Plot allows for customization and supports features like sorting and adding additional marks. The Talk also discusses accessibility concerns, SSR support, and compares Plot to other libraries like D3 and Vega-Lite.
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
The talk discusses the importance of supply chain security in the open source ecosystem, highlighting the risks of relying on open source code without proper code review. It explores the trend of supply chain attacks and the need for a new approach to detect and block malicious dependencies. The talk also introduces Socket, a tool that assesses the security of packages and provides automation and analysis to protect against malware and supply chain attacks. It emphasizes the need to prioritize security in software development and offers insights into potential solutions such as realms and Deno's command line flags.
Towards a Standard Library for JavaScript Runtimes
Node Congress 2022Node Congress 2022
34 min
Towards a Standard Library for JavaScript Runtimes
Top Content
There is a need for a standard library of APIs for JavaScript runtimes, as there are currently multiple ways to perform fundamental tasks like base64 encoding. JavaScript runtimes have historically lacked a standard library, causing friction and difficulty for developers. The idea of a small core has both benefits and drawbacks, with some runtimes abusing it to limit innovation. There is a misalignment between Node and web browsers in terms of functionality and API standards. The proposal is to involve browser developers in conversations about API standardization and to create a common standard library for JavaScript runtimes.
ESM Loaders: Enhancing Module Loading in Node.js
JSNation 2023JSNation 2023
22 min
ESM Loaders: Enhancing Module Loading in Node.js
ESM Loaders enhance module loading in Node.js by resolving URLs and reading files from the disk. Module loaders can override modules and change how they are found. Enhancing the loading phase involves loading directly from HTTP and loading TypeScript code without building it. The loader in the module URL handles URL resolution and uses fetch to fetch the source code. Loaders can be chained together to load from different sources, transform source code, and resolve URLs differently. The future of module loading enhancements is promising and simple to use.
Out of the Box Node.js Diagnostics
Node Congress 2022Node Congress 2022
34 min
Out of the Box Node.js Diagnostics
This talk covers various techniques for getting diagnostics information out of Node.js, including debugging with environment variables, handling warnings and deprecations, tracing uncaught exceptions and process exit, using the v8 inspector and dev tools, and generating diagnostic reports. The speaker also mentions areas for improvement in Node.js diagnostics and provides resources for learning and contributing. Additionally, the responsibilities of the Technical Steering Committee in the TS community are discussed.
TensorFlow.js 101: ML in the Browser and Beyond
ML conf EU 2020ML conf EU 2020
41 min
TensorFlow.js 101: ML in the Browser and Beyond
TensorFlow.js enables machine learning in the browser and beyond, with features like face mesh, body segmentation, and pose estimation. It offers JavaScript prototyping and transfer learning capabilities, as well as the ability to recognize custom objects using the Image Project feature. TensorFlow.js can be used with Cloud AutoML for training custom vision models and provides performance benefits in both JavaScript and Python development. It offers interactivity, reach, scale, and performance, and encourages community engagement and collaboration between the JavaScript and machine learning communities.

Workshops on related topic

Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
JSNation 2024JSNation 2024
108 min
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
Featured Workshop
Roy Derks
Shivay Lamba
2 authors
Today every developer is using LLMs in different forms and shapes, from ChatGPT to code assistants like GitHub CoPilot. Following this, lots of products have introduced embedded AI capabilities, and in this workshop we will make LLMs understandable for web developers. And we'll get into coding your own AI-driven application. No prior experience in working with LLMs or machine learning is needed. Instead, we'll use web technologies such as JavaScript, React which you already know and love while also learning about some new libraries like OpenAI, Transformers.js
Node.js Masterclass
Node Congress 2023Node Congress 2023
109 min
Node.js Masterclass
Top Content
Workshop
Matteo Collina
Matteo Collina
Have you ever struggled with designing and structuring your Node.js applications? Building applications that are well organised, testable and extendable is not always easy. It can often turn out to be a lot more complicated than you expect it to be. In this live event Matteo will show you how he builds Node.js applications from scratch. You’ll learn how he approaches application design, and the philosophies that he applies to create modular, maintainable and effective applications.

Level: intermediate
Build a powerful DataGrid in few hours with Ag Grid
React Summit US 2023React Summit US 2023
96 min
Build a powerful DataGrid in few hours with Ag Grid
Top Content
WorkshopFree
Mike Ryan
Mike Ryan
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
We all know that rolling our own grid solution is not easy, and let's be honest, is not something that we should be working on. We are focused on building a product and driving forward innovation. In this workshop, you'll see just how easy it is to get started with AG Grid.
Prerequisites: Basic React and JavaScript
Workshop level: Beginner
Build and Deploy a Backend With Fastify & Platformatic
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
WorkshopFree
Matteo Collina
Matteo Collina
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js (https://oss.platformatic.dev/).- Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow (https://platformatic.dev/). 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.
Build a Powerful Datagrid With AG Grid
React Summit 2024React Summit 2024
168 min
Build a Powerful Datagrid With AG Grid
WorkshopFree
Brian Love
Brian Love
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
Building a Hyper Fast Web Server with Deno
JSNation Live 2021JSNation Live 2021
156 min
Building a Hyper Fast Web Server with Deno
WorkshopFree
Matt Landers
Will Johnston
2 authors
Deno 1.9 introduced a new web server API that takes advantage of Hyper, a fast and correct HTTP implementation for Rust. Using this API instead of the std/http implementation increases performance and provides support for HTTP2. In this workshop, learn how to create a web server utilizing Hyper under the hood and boost the performance for your web apps.