Or why manual throttling is mandatory when using async parallelism in Node.js

A valuable lesson from scientific computing that also applies to anyone doing I/O, networking or number-crunching

I am running a very specialized weather site for paragliding and sailplane flying that does scientific computing in a web context.


If you think that this is a joke, then this story is for you

I published very recently a new plugin for the JS bindings of GDAL that I currently maintain for importing and exporting N-dimensional arrays to scijs. scijs, while still far behind its Python namesake, is currently gaining more and more popularity, driven by the general success of JavaScript and V8.


Recently I had to make some examples for using my new cartography library for React. For every example, I wanted to be able to display both the component output and the code itself, like this:

(the code loading the examples discussed here is in https://github.com/mmomtchev/rlayers/blob/master/examples/App.tsx)

As some of the examples…

They told me it couldn’t be done, but I refused to listen

About an year ago I set to remake the profile page on my soaring weather website. …

Some common pitfalls and design patterns when using Promises and async functions

Single-threaded event-driven asynchronous I/O is one of the most interesting features of the JS language. It is not a new concept, in fact, more than 20 years ago, there was one very influential paper in the world of…

Reading and parsing a large CSV file in Node.js doesn’t have to be slower than the equivalent compiled C code… that is if you are willing to give up the comfort of the automatic memory management

Recently I had to process a very large (1.6G) CSV-like file in Node.js. After…

How many times you have been confronted with the classical problem of parallelizing download loops in crawlers and scrapers

Consider the following typical crawler or scraper code:

Thanks to async / await this is as simple and readable as it can get.

But what if you have thousands of…

Momtchil Momtchev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store