I'm using SQL Server 2008 R2 for real-time location aware service. The service mostly receives location data (lat/lon) from a user and returns locations around the user.
The data is being sent from each user once in a second. For every location being reported there is a query that checks other users around that user and returns data about them.
I'm using Lat/Lon as float fields and run a scalar-function to find the closest users.
I guess that approach is not the best. I know there are spatial data constructs in SQL Server, but don't know if they are good. Should I use them? If so, what is the best approach?
What approach should I take to make this operation as fast and scalable as possible?
Maybe NoSQL is better for spatial data?
P.S - I'm talking about thousands and tens of thousands users at any given time.