What is Napa.js?

Tinuy overview of a multi-threaded JavaScript runtime, developed by Microsoft
20 October 2017   6535

What is Napa.js? 

Napa.js is a multi-threaded JavaScript runtime built on V8, which was originally designed to develop highly iterative services with non-compromised performance in Bing. As it evolves, we find it useful to complement Node.js in CPU-bound tasks, with the capability of executing JavaScript in multiple V8 isolates and communicating between them. Napa.js is exposed as a Node.js module, while it can also be embedded in a host process without Node.js dependency.

Features:

  • Multi-threaded JavaScript runtime
  • Node.js compatible module architecture with NPM support
  • API for object transportation, object sharing and synchronization across JavaScript threads
  • API for pluggable logging, metric and memory allocator
  • Distributed as a Node.js module, as well as supporting embed scenarios

How does it works? 

In Napa.js, all works related to multi-threading are around the concept of Zone, which is the basic unit to define policies and execute JavaScript code. A process may contain multiple zones, each consists of multiple JavaScript Workers.

Napa.js architecture
Napa.js architecture 

Within a zone, all workers are symmetrical: they load the same code, serve broadcast and execute requests in an indistinguishable manner. Basically, you cannot ask a zone to execute code on a specific worker. Workers across different zones are asymmetrical: they may load different code, or load the same code but reinforce different policies, like heap size, security settings, etc. Applications may need multiple zones for work loads of different purposes or different policies.

See GitHub for more information. 

Frontend News Digest 5 - 11.10

Three dots in JavaScript, when to use map instead of plain JS object, how to make first React Nattive app and much more
11 October 2019   114

Greetings! I hope your week went great! Here's new Frontend news digest.

One of the greatest things is this digest for newbies is a guid on how to create your first React Native app. Others may learn about the latest NestJS Addons: In-Memory DB update, three dots in JavaScript and interview with "adult" website dev

Guides

  • Clipping, Clipping, and More Clipping! 

Guide on how to use the CSS clip-path property to create interesting effects.

  • Trying to Make Sense of Gmail CSS Support

Highly specialized, but valuable for some specialists guide

  • The tale of three dots in Javascript

Tutorial about the usage of "three consecutive dots" in JS

  • When to Use Map instead of Plain JavaScript Object

Everything should be understandable from the heading, I believe.

  • How to make your first React Native app

You gonna learn how to create a new mobile appl using React Native Starter

Articles

  • ASPIRE: Ideals to Aspire to When Building Websites

Skilled developer made the case that sites should aspire to be Accessible, Secure, Performant, Inclusive, Responsive and Ethical.

  • Interview with Pornhub Team developer

Interesting interview with a guy that works for one of the most popular "adult" websites

  • Verify Phone Numbers On The Web with The SMS Receiver API

Preview of the in-development SMS Receiver API

Updates

  • Node Code Formatter

Automatically formats your code with your preferred code formatter

  • NestJS Addons: In-Memory DB

New version with built-in entity CrUD Controllers, whatever they are