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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:55:40+00:00 2026-05-31T14:55:40+00:00

I need a system that writes sequentially, very fast to a synchronized persistent queue

  • 0

I need a system that writes sequentially, very fast to a synchronized persistent queue and reads very fast from it. The queue can spike and grow to hundred of millions, possible billions of entries on certain days and it could take days to catchup afterwards, which is fine.

I’m thinking of something like this:

Receiving multiple requests containing numbers 0-4 (order doesn’t matter)

Queue[10]: [ 0 1 2 3 4 _ _ _ _ _ ] 

The queue is also written to a file (f0) concomitant to being submitted to the queue. The reason for this is so in case of failures I’m not loosing data.

While I’m reading from it in sequence (0, 1, 2) more numbers are posted:

Queue[10]: [ _ _ _ 3 4 5 6 7 _ _ ] 

At this point my file f0 contains (0-7) and I have also persisted the last position read.

If I’m continuing to write and the current queue gets full, the next 10 writes go directly into a file f1. The next 10 will go into f2 and so on. When the reading finished reading all entries from the queue f1 will be loaded into the queue and the reading will continue. f0 will be deleted. When my reads catch up with the writes the current file will be read into the queue and will continue from that point.

I can probably provide a better implementation by using a primary/secondary buffer.

However I would prefer to use an existing library if there is one that does what I need.

Any help would be greatly appreciated.

Sebi

  • 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-31T14:55:42+00:00Added an answer on May 31, 2026 at 2:55 pm

    I have a library which supports a persisted queue which can support 5 – 20 million entires per second sustained and can have number of entires between the single producer and multiple consumers (they don’t even have to be running at the same time) It doesn’t carry any GC overhead.

    https://github.com/peter-lawrey/Java-Chronicle

    The library requires 64-bit JVM if you want much scalability and it is limited by the amount of disk space you have.

    The library assumes you will cycle the files used as a maintenance task. This requires you have sufficient disk space to cover the period between maintenance windows.

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

Sidebar

Related Questions

I need to build a rule-based system that can be run and developed in
I'm in need of a distributed file system that must scale to very large
I need to set a system environment variable from a Bash script that would
I need to design a system that will control access to certain information. The
I have an HTML help system that I need to convert to SharePoint. The
We are using a system that allows ActiveX extensions through .ocx files. I need
I need to build a scripting interface for my C# program that does system
I'm on a foreign linux system and need to determine the user that apache
I need to unload a DLL that was loaded with System.loadLibrary(..) , anyone know
Our system complexity has risen to the point that we need to make permission

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.