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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:32:12+00:00 2026-05-25T06:32:12+00:00

To best explain my goal, I will simplify the problem to the basics of

  • 0

To best explain my goal, I will simplify the problem to the basics of my requirements. Please let me know if more details are needed for clarity.

Suppose I have 10 unique numbers (0-9) that are available for assignment. Which numbers are reserved or free is contained by the database. The goal of a running Front End web service is to successfully request a number for assignment. Once the number has been assigned to the specific node, it is reserved and no other node can have it assigned.

Keep in mind that this is to be a distributed system with no single point of failure.

The caveat that is giving me trouble is Cassandra’s notion of eventual consistency. Note that I could tune Cassandra to be fully consistent at the cost of higher latency. If that is my best (and possibly only) option, I can do it, but I’d like to preserve the concept of consistency tuning.

My thoughts on the strategy is to do the following on the node:

1) Query Cassandra to get a list of free numbers.

2) Randomly select one of the free numbers.

3) Perform a Put to Cassandra saying that this node has reserved that number.

4) Continuously query Cassandra to see which node successfully reserved the number. (Continuously request, as the read may not immediately reflect the assignment.)

5) If the returned node name is the name in which this node’s reservation was filed, then the reservation was a success.

6) If the returned node name is a different node name, it means that another node requested the number at around the same time as this one, and was given the assignment. This node must go back to step 1 and try again.

I have an odd feeling that specific circumstances will cause errors (double assignment, etc.) if I use the above strategy.

Can anyone else comment on my proposed strategy, and possibly offer their own? Thanks.

  • 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-25T06:32:12+00:00Added an answer on May 25, 2026 at 6:32 am

    You may want to check out Apache ZooKeeper. It seems like it’s exactly what you need. You can use ZooKeeper to get new assignments, and store the existing assignments in Cassandra.

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

Sidebar

Related Questions

Hello I will try my best to explain my problem and I really hope
Please excuse the awkward title I'll try my best to explain my peculiar problem.
Could someone please explain the best way to connect to an Interbase 7.1 database
I'll try to explain my problem the best I can, here goes: I have
I'll try to explain this problem the best way i can with code: double
I will try my best to explain this. I have an application that show
I'll try to do my best to explain my problem. I have 2 separate
I am very new to database, I will try my best to explain myself
This is a bit tricky to explain but I will try my best to
The best way to explain this is with examples. Let's say I have the

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.