Importing Real Data
Next weâll use the request module to import a whole bunch of data into the books database. As we do so, weâll run into the limited-resource problem we first saw in âThe Limited-Resource Problemâ. This will give us a backdrop for experimenting with asynchronous coding techniques.
First we need to get some data to work with. Weâll use the catalog data from Project Gutenberg, a site dedicated to making public-domain works available as free ebooks.[20]
Downloading Project Gutenberg Data
Project Gutenberg produces catalog download bundles that contain Resource Description Framework (RDF) files for each of their 43,000-plus books. (RDF is an XML-based format.) The bz2 version of the catalog file is about 13 MB. Fully extracted, ...
Get Node.js the Right Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.