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 6977099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:34:55+00:00 2026-05-27T17:34:55+00:00

Consider a queue of items on server. The client then reads 10 queued items

  • 0

Consider a queue of items on server. The client then reads 10 queued items at a time using a REST web service. Naturally, when the client has consumed these items the server should remove them server-side.

Q: What is the best approach if we consider both robustness, network load and restfulness?

I can think of three possible solutions:

The client asks for new items. The server then…

  1. sends item 1..10 (GET) and removes them immediately. Hopefully the items arrived at the client.
  2. sends item 1..10 (GET), client sends ACK for 1..10 (DELETE), and the server removes the items.
  3. sends item 1..10 (GET). Next time the client asks for 11..20 (GET), the previous items are removed on the server.

I believe both #1 and #3 violate the restful principle. E.g. Only the DELETE method may delete objects. However, they both avoid the data traffic for the ACK command.

Not sure what’s best here. Perhaps there is an even better solution?

  • 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-05-27T17:34:55+00:00Added an answer on May 27, 2026 at 5:34 pm

    Here’s the answer in votable format. I hope it helps clarify your options a bit more.

    It’s important in a REST-style architecture that the implementation of an API not change the implementation of any underlying protocols — in this case it means that GET requests should be idempotent. While idempotent does not mean that the underlying resources can’t change, or go away forever (AKA be deleted), having that happen as a direct or indirect result of a GET seems to not be in accordance with the spirit of the protocol.

    Any system that guarantees delivery of a message requires some kind of handshake to single that the intended receiver successfully received the message — if HTTP is the protocol in question, then that implies two requests. Even in the case where the behavior of GET were modified to lazily delete the resources, the handshake is still present — it has just been shifted in time. Again, if HTTP is the protocol in questions, then using the existing methods of GET and then DELETE for the retrieval and deletion for that handshake seems best. The result shouldn’t tax the network any more than any equivalent approach.

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

Sidebar

Related Questions

Consider the following sketch for using a loop to empty a queue in Scala:
I have a single AMQ queue that receives simple messages with string body. Consider
Consider a tier of N-many subscribers, all connected to a direct exchange using identical
I am having problems using multiple queues in jQuery. Consider the following example: $('#example').click(function()
please consider the following: I have a queue of objects represented as an array.
Are there any issues to consider when using DRb for implementing an in-memory message
I'm building a web service with a RESTful interface (lets call it MY_API ).
I'm building a web service with a RESTful interface (lets call it MY_API ).
Is there a more appropriate/efficient data structure for a transaction queue than using a
Consider the following program: import Queue from multiprocessing import Queue as Q from multiprocessing

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.