Code Monkey home page Code Monkey logo

worker-pools-example's Introduction

Worker Pools Example

What are Worker Pools?

Worker pools are a Concurrency Pattern where we provide two or more "workers" or "executors" to execute multiple "tasks" or "jobs" concurrently.

Don't forget to read my NOTES.md with more descritive explanation while follow my examples and after that, you can run the benchmarks to see the efficiency of each example

How to Run (Benchmarks)

The intention of this project is not run the code like some API application os something like that. There are benchmarks to each example, so that you can compare the execution time of every approach.

I wrote a Makefile to help you run these benchmarks, easy peasy.

1 - To run the books example using worker pools:

make run_wp

2 - To run the books example without worker pools:

# be careful, this can be very slow
make run_wwp

3 - To run the theorical example:

make run_theo

This repo structure

This repo follows the structure:

├── books
│   ├── using_wp
│   │   ├── using_wp.go
│   │   └── using_wp_test.go
│   └── without_wp
│       ├── without_wp.go
│       └── without_wp_test.go
├── theorical
│   └── theo.go
├── go.mod
├── Makefile
├── NOTES.md
└── README.md

worker-pools-example's People

Contributors

albuquerque53 avatar

Watchers

 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.