Git Product home page Git Product logo

Comments (2)

michaelnoonan avatar michaelnoonan commented on August 23, 2024

I like it. The common workaround I've used in these scenarios is to batch
work, but then you'd run into the case where a single batch got too big and
the distributed transaction would simply fail... I like the potential that
my handler could say, "I'm 99% of the way through after running for 60
seconds, just give me a little longer" and have the message lock extended.

I like the idea of having the interface where my handler could be as smart
or simple as I like:

  • return true; // Just keep extending forever
  • return stillMakingProgress(); // Can inspect some state on the handler
  • if (stillMakingProgress()) { return true; } else { cancel(); return
    false; } // Make the determination we aren't progressing, so break the
    loop, log the cancellation, and don't request an extension

RE: Periodicity, perhaps 50% of the message lock expiration timeout? In the
default case, timeout = 30seconds, poll the handler every 15seconds.

On Sat, Feb 22, 2014 at 11:02 AM, uglybugger [email protected]:

When we pop a message from a queue we're given a lock on that message for
a short period of time. The idea is that if our handler hangs or crashes
without calling .Complete or .Abandon then the message will be returned to
the queue so that someone else can handle it.

There's a trade-off between 1) detecting handlers that have crashed and
giving someone else a chance at handling the message and 2) allowing
long-running handlers to do their job.

I'm thinking about either of:

  • an optional interface on IHandleXXX<..> along the lines of
    IAmALongRunningTask that would allow the dispatcher to ask the handler
    whether it was still alive.
  • simply attaching a watcher to any handler task to check if it's
    still alive.

Any thoughts? @DamianMac https://github.com/DamianMac? @michaelnoonanhttps://github.com/michaelnoonan
?

Reply to this email directly or view it on GitHubhttps://github.com/DamianMac/Nimbus/issues/52
.

from nimbus.

uglybugger avatar uglybugger commented on August 23, 2024

Done :)

from nimbus.

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.