#Confusion between system availability and actual availability based on the location

25 messages · Page 1 of 1 (latest)

empty crown
#

I am building an application for blue collar workers for them to find jobs and small gigs.

I am building algorithm to give list of workers to customer/employer. First sort is workers only in the radius of 7kms from customer's location.

I dont understand which db should be used and how often location should be updated:

Approach 1: permanently store a location :
Store location using spatial index and point(longitude latitude) in MySQL

Advantage: live location is only available until user doesnt close the app so this Approach doesn't give a false past location as current location.

Disadvantage: what if worker isnt actually available and is out of town the algorithm would still consider the worker

Approach 2 : Use live location by using websockets + redis

Advantage: Accuracy

Disadvantage: live location is only available until user doesnt close the app so this Approach will give false live location.

Whats the solution to this?

stuck spruceBOT
#

<@&987246841693360200> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I am building an application for blue collar workers for them to find jobs and small gigs. I am building algorithm to give list of workers to customer/employer. First sort is workers only in the radius of 7kms from customer's location. I dont understa

Your confusion between system availability and actual availability by location is common in such scenarios. Here's a concise breakdown based on your use case:

  • System Availability means the app or database is accessible globally or within the operating region, regardless of where workers or customers are located.

  • Actual Availability refers to whether workers are physically available and able to take jobs in a specific geographic area or radius (ra) around a customer/employer.

For your sorting algorithm—first filtering workers within a radius—this addresses actual availability by location. Ensure you use accurate geospatial queries (like latitude/longitude distance calculations) to identify which workers fall in the radius, then sort or rank by other criteria (experience, rating, etc.).

Key advice:

  • Separate concerns: Keep system availability checks at the infrastructure/network level, and location filtering in your application logic.
  • Consider timezone, local working hours, and worker status (online, available) for more accurate actual availability.
  • Caching worker locations and using spatial indexes (e.g., geohashes) boosts performance for location queries.

Useful links:

quaint fulcrum
#

You can use MapBox api perhaps, looks like most of their free tier is 100k transactions/mo. That will give you street driving time distances and not line of sight. Someone might live on the other side of a mountain or river and the closest crossing is miles away.

empty crown
fresh flicker
#

yes, you will have people claiming they cover a lot of places

#

but this is part of why craigslist type things end up with location specific sites

fresh flicker
#

there are diminishing returns to "did you know your neighbor is a plumber?"

fresh flicker
#

you have to think about things like this from a product perspective before thinking about how to solve it technically

fresh flicker
#

you could have them paint their service area on a map

#

thats an option

empty crown
#

Like out of town

#

@fresh flicker

fresh flicker
#

You can obviously try to verify some things or have restrictions for things that wouldn't make sense

#

But at the end of the day you need to trust when someone says they cover the Boston area they cover the Boston area

#

Unless of course you want to have staff which Fields complaints and change those hours and whatnot

quaint fulcrum
quaint fulcrum
# empty crown I dont understand what u are saying

Distance to an area is realistically given by street map driving distance, not some radius around a person. You can use radius to narrow down but eventually people want an actual (shortest) route to determine whether they are interested. That might include them considering other things like daily traffic congestion.