Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9263431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:35:10+00:00 2026-06-18T13:35:10+00:00

In my jQuery web app I’m using events pretty much. My component for doing

  • 0

In my jQuery web app I’m using events pretty much.
My component for doing ajax client requests (the name is “comm”) to the server has a queue.
This queue is similar to a Backbone.js collection.

So every time I put a new request object into the collection of “comm”, the comm object gets an “add” event and the “worker” method of “comm” looks, if there is currently an ongoing request. If there is no one, the worker method processes the request and finally, when everything works fine, triggers a “complete” event on the request object.

In this comm component only one request at a time is possible. If I add an request object to “comm” and the “add” event gets triggered and the worker method sees, that there is already a request, than nothing happens.

My question is: In this situation, what is the best approach for handling this unprocessed request object IN REGARD TO “AN EVENT INFRASTRUCTURE”?

Until now I had 2 different approaches:

1) I could do the following: If my ongoing request is finished, the worker method can check if there is an unprocessed request object in the collection and process it. This is simple, no event is envolved.

2) Or something different: If the worker method starts due to an “add” event and sees, that there is already an ongoing request, I could implement something like: “I can not respond adeqately to this add event, I place you back. Please trigger yourself in 200 milliseconds again, maybe I have time then.”

Maybe somebody already had a similar problem and had a very good solution to this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:35:11+00:00Added an answer on June 18, 2026 at 1:35 pm

    I think a good approach to this problem would be to implement a “next” event that is fired on the queue. Each time a “complete” event is triggered, it should fire the next event on the queue which then would see if there’s any unprocessed requests and if so picks one according to your logic (I assume FIFO)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a web app that loads images using jquery, ajax and json. I
My front end web app is using jQuery's AJAX functions ( $.ajax , $.getJSON
We're building a web app, and it's using jquery ajax and jsp on the
I am doing web app for iOS using jQuery. I have a select in
I am creating a web app which uses jQuery to authenticate: $.ajax({ url: /session/create?format=json,
So I'm working on a mobile web app using jQuery Mobile, and I need
I am currently working on a web app using Wicket and started using jQuery
I am creating a web app for android phones(HTML 5) using jquery mobile. Just
In my web app, I am using jQuery to select all the links on
I'm developing a Web App that uses JavaScript + JQuery on the client side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.