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

  • Home
  • SEARCH
  • 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 8280399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:39:45+00:00 2026-06-08T09:39:45+00:00

I have website where a user selects a certain criteria for finding another user

  • 0

I have website where a user selects a certain criteria for finding another user on the site and then site pairs you up with someone else that also is looking for someone of the same criteria. There is a collection of users that are “unpaired” (have not been paired yet), every time someone makes a request to be paired up, the program will check for the next avaliable user in collection with the matching criteria, and removes the user from the “unpaired” collection if there is a match, if not then it will add the user to the “unpaired” collection.

My question is, what is the best way to handle this type of collection based on the following criteria?

  • Matching process is in real-time, so I am using something like
    SignalR to handle the real time paring
  • If the system is shut down, the collection does not need to be kept
    because there would be no users “searching” for unpaired users
    because the system is shut down
  • If I scale out the servers and have multiple instances, they all have
    to be able to pull out from the same collection
  • Deal with concurrency (don’t know if i need to) if 2 users request at
    the same time

Some standard questions that arose when I thought through this were:

  • Do I even need a database for this since the users are being added
    and deleted constantly

  • If I do need some sort of storage, would something like mongodb be a
    good option? why?

  • If I stored the collection in memory, that wouldn’t work across
    different instances if i scale out, right?

  • 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-08T09:39:46+00:00Added an answer on June 8, 2026 at 9:39 am
    • You will need to deal with concurrency – once you’ve found a user to pair with, you’ll want to lock that user, verify it is still unpaired, pair them up, then unlock. Otherwise you run the risk of first finding a user that is unpaired when you first look at them and when you goto pair them up, they are already taken.
    • It’s not clear what side effects occur with pairing – but it seems like you don’t really care past the present (ie if the server goes down – pairing is irrelevant). This sounds like an in memory operation, with possibly a persist to a database for logging / analytic’s purposes.
    • Regarding the different instances, if it’s in memory, you could still be doing it across server (the map/reduce formula could work for in memory, and there are probably plenty of others). You could also architect your solution to bucket your users on different servers A-N on server1, O-Z on server2 (if that makes sense for your data). You could also reduce to the bare minimum the data required for pairing and have a single server (as beefy as you want) to handle just the pairing, off loading whatever happens after pairing to wherever.

    Sorry kind of generic without a bit more understanding of your data / use cases

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

Sidebar

Related Questions

I have a website that allows a user to upload a spreadsheet of items
I have a website going that takes a user's uploaded image, and makes three
We have a website wherein a user can post information from our website to
I have a website where a user chooses a template of their choice for
I have implemented endless scrolling to my website user account area and before more
Okay, so I have a website where the user can put a search query
I have aspx website in which I have multiple user controls. I want to
I have a website and when the user logs in they can click on
I have this website (C#/ASP.NET) with a form where the user can register for
I have a website which sells a product to the user (downloadable). I am

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.