Giter VIP home page Giter VIP logo

Comments (7)

ryanjohns avatar ryanjohns commented on June 3, 2024

Hey Darren -

I use a mix of both approaches in my application and have not run into any issues. The only potential problem you could run into is if your job size is too large. By default, beanstalkd uses a max job size of 65535 bytes but this can be configured with the -z command line option. I guess network I/O could also be an issue if you process a ton of jobs from a single beanstalkd instance but that seems unlikely. The string encodings should not be an issue.

Best,
Ryan

from backburner.

boncey avatar boncey commented on June 3, 2024

Hi, thanks for your response.

I'd already gone ahead and made the change - after lots of testing. :-)
It's working great - I've managed to double my throughput with this approach as it's much quicker.

The only issue I have is if I need to pass more info to the job queue - it involves changing the method signature which in turn means draining the queue of all messages to ensure no jobs still exist expecting the old method signature. This of course isn't a problem if you use database ids.

from backburner.

ryanjohns avatar ryanjohns commented on June 3, 2024

You could use a versioned tube name approach to achieve a "zero down-time" style migration when you need to change the method signature. If you are reading/writing to tube-name-v1 and need to make a switch, just start writing to tube-name-v2 as part of your change and read from both v1 and v2. Then just stop reading from v1 in a later deploy once it has cleared.

from backburner.

nesquena avatar nesquena commented on June 3, 2024

You could use a versioned tube name approach to achieve a "zero down-time"

👍 I second that, I often use versioned tube names for this purpose.

from backburner.

boncey avatar boncey commented on June 3, 2024

That's a pretty cool idea - thanks for that.
Not sure I fully understand though - if I deploy new code won't jobs in tube-name-v1 still fail when they call the perform method with the wrong number of parameters?

from backburner.

ryanjohns avatar ryanjohns commented on June 3, 2024

When using job classes that respond to perform, you will have to create a new class (or subclass) for the new job definition which uses the new tube and change your code to enqueue jobs of the new type.

from backburner.

boncey avatar boncey commented on June 3, 2024

Right, I get it now.

Thanks.

from backburner.

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.