Giter Site home page Giter Site logo

Comments (5)

j-mendez avatar j-mendez commented on May 27, 2024 1

In order for concurrent operations to happen a child process is required and within each child process managing the browser. In nodejs you can only fork separate processes https://nodejs.org/api/cluster.html since the nodejs runtime is required in each one. This makes it really not possible or meant for concurrency. You can do handle things parallel just not concurrent.

from puppeteer-cluster.

tamusjroyce avatar tamusjroyce commented on May 27, 2024 1

@j-mendez a new change to libuv may change that. Seems like node is getting multithreading.

from puppeteer-cluster.

j-mendez avatar j-mendez commented on May 27, 2024

The only operations that run concurrently in node are IO operations. You also cannot control the IO without special configuration. Example certain IO APIs outside ecma may use libuv which may or not perform the action the operation concurrent/spawn thread pools etc.

from puppeteer-cluster.

tamusjroyce avatar tamusjroyce commented on May 27, 2024

concurrent seems to be correct usage

Although node runs single threaded here (deno, with less expensive concurrency, may change that, once puppeteer is supported: denoland/deno#16298). Chromium based browsers run each tab as its own process.

WIth the example, we technically have 3 concurrent processes running. Server and 2 Client tabs running on the server.

from puppeteer-cluster.

j-mendez avatar j-mendez commented on May 27, 2024

concurrent seems to be correct usage

Although node runs single threaded here (deno, with less expensive concurrency, may change that, once puppeteer is supported: denoland/deno#16298). Chromium based browsers run each tab as its own process.

WIth the example, we technically have 3 concurrent processes running. Server and 2 Client tabs running on the server.

I should have pin pointed what exact concurrency mentions. In the docs it states you can add a custom ConcurrencyImplementation in js which is not the same. From the nodejs aspect it does not matter if there is 100 browsers running. The execution is not happening concurrent to connect and drive the pages. Using a word that has a bigger impact than stating it can open several chrome processes is a totally different thing.

from puppeteer-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.