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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:31:37+00:00 2026-06-12T23:31:37+00:00

I have developed a GPS application where all the devices (moving on the road)

  • 0

I have developed a GPS application where all the devices (moving on the road) send their coordinates to the server in every 30 seconds. Now I have to calculate the distance between these devices so if any device comes in the range of another device then both the devices get a notification.

I know how to calculate the distance between two coordinates (thanks to Google) but I am not sure how to implement it; if we have 1 million devices simultaneously sending data to the server then the server needs to execute distance calculation 1 million * (1 million – 1) times every 30 seconds.

Please let me how to implement it. Do I need to use anything like Hadoop or a MySQL database procedure to do the job? Calculation is not a problem here but handling and calculating this much data is a problem.

  • 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-12T23:31:38+00:00Added an answer on June 12, 2026 at 11:31 pm

    There’s a data structure called a QuadTree. Keep the data points updated in the quad tree and you will have a much much smaller data set to compare the values against.

    As clients log in and move, and send you datapoints, you change their location in the quad tree. Now the QuadTree is going to have a 2d map of all your datapoints, split into buckets. Each bucket contains 4 other buckets that may or may not have points in them. When you’re trying to find everyone within X of a given data point, you look at all the points in the bucket that point is in. Then you look at all the points in the buckets ‘around’ that bucket. (There’s 8 of them. N S E W NW SW NE SE.) You keep going until the distance to the buckets (and therefore all the points in them) is greater than your minimum range.

    Now everyone else, most of whom are probably very far away, don’t ever need to be tested. You never see their buckets.

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

Sidebar

Related Questions

Have developed a small Windows application using SQL Server as its database. I need
I have developed an application using J9 that runs in windows mobile. but now
I have developed android application. Now it is time to give it to the
I have developed an application to find the user's location using GPS. In this
Does every j2me enabled mobile have GPS service so that the developer can locate
I have developed a website using Razor (Microsoft WebMatrix) and now I want to
I have developed a Java server using Eclipse that accepts TCP socket connection from
I have developed a Facebook application using Flash as3. In this application when ever
i want to get the GPS coordinates from iphone and send these GPS coordinates
Have developed an MVC3 application which monitors when users access static content on 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.