Code Monkey home page Code Monkey logo

pokebull's Introduction

PokeBull - A Simple Concurrency Test with Node.js and BullMQ

PokeBull is a Node.js application that tests concurrency by calling the Pokemon API using BullMQ, a Redis-backed job queue.

Table of Contents

Introduction

PokeBull is a simple application designed to test concurrency with Node.js and BullMQ. It calls the Pokemon API to retrieve information about a random Pokemon and uses BullMQ to execute multiple API calls in parallel.

This project is ideal for those who want to learn about concurrency with Node.js and BullMQ, as well as those who want to see a practical example of how to use a job queue.

Getting Started

To get started with this project, you'll need to have Node.js and Redis installed on your local machine.

  1. Clone this repository to your local machine
  2. Run npm install to install the required dependencies
  3. Start Redis on your local machine
  4. Run node index.js to start the application

How it Works

This application uses BullMQ to create a job queue and worker process. The worker process listens to the queue and retrieves jobs to execute. Each job consists of calling the Pokemon API to retrieve information about a random Pokemon.

By default, the application runs 10 jobs concurrently. You can adjust this number by modifying the concurrency parameter in the index.js file.

Dependencies

This project relies on the following dependencies:

  • Node.js
  • BullMQ
  • IORedis

Contributing

If you find any bugs or have suggestions for improvement, please feel free to submit an issue or pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

pokebull's People

Contributors

nachocapodanno avatar

Watchers

James Cloos avatar  avatar

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.