Git Product home page Git Product logo

Comments (4)

jhorbulyk avatar jhorbulyk commented on June 19, 2024
  • read an optional parallelize: bool field in from component.json inside every action/trigger
  • if this field exists, read in a number from component.json that represents the number of messages that should be read in parallel at once. This number should default to a value greater than 1 (2?) if not set. It should also be able to be configured as a config field by a user, as it would be dependent on the amount of computing power available

Or just have a single number that defaults to 1 if not present.

from sailor-nodejs.

zubairov avatar zubairov commented on June 19, 2024

It's a good idea to optimize the processing, however drawbacks of this approach are:

  1. Increase memory usage - we need to keep multiple (potentially large) messages in memory
  2. Decreased reliability in case of container failures - instead of potentially re-processing a single message (e.g. when container failed before rabbitmq ack.) we will have to re-process potentially multiple messages

Taking drawbacks into account I don't' think the component developer can make this decision

from sailor-nodejs.

jhorbulyk avatar jhorbulyk commented on June 19, 2024

I potentially also makes sense to allow this value to be dynamically configured at runtime based on a specific cfg. Perhaps add a way to set this in either the init() or startup() functions?

from sailor-nodejs.

jhorbulyk avatar jhorbulyk commented on June 19, 2024

Increase memory usage - we need to keep multiple (potentially large) messages in memory

Currently, our platform doesn't really support messages above ~3.5 MB in side. So even if we fetched 10 messages in parallel, at most 35 MB of RAM would be consumed which is still less than the default 256 MB allocated to a component.

Decreased reliability in case of container failures - instead of potentially re-processing a single message (e.g. when container failed before rabbitmq ack.) we will have to re-process potentially multiple messages

I don't understand why the costs of doing this would be a significant concern.

from sailor-nodejs.

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.