celic / echo_location_server Goto Github PK
View Code? Open in Web Editor NEWA server that echoes locations nearby the given point.
A server that echoes locations nearby the given point.
Why not use GeoJson for this? You can use this instead of haversine. They have prebuilt json files for states, counties, etc. Check this out for an example of geojson in action. This is using prebuilt city files. You could just map the nearby points within the boundries of county or maybe state?
Server needs to return JSON of all the points that match the search query. These points need to be parsed into a format for the server to send to the client.
To be able to calculate the distance between points, implement this... https://github.com/kristianmandrup/haversine
It should be a gem on rubygems.org. Figure out how to use it and implement a point searching function.
When a client connects before another client is processed, the connection of the first is cut without parsing the JSON. This can be replicated by
# Terminal 1
$ ruby run_server.rb
# Terminal 2
$ telnet localhost 8000 < test.json | telnet localhost 8000 < test.json
Likely via cron jobs. Check every so often which points were created more than 6 hours ago and drop them from the table if they are old.
I suspect that I don't have my rakefile implemented correctly and that it is actually doing nothing along with the migrations... If so, they can just be deleted...
The parse_json method should handle bad input gracefully
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.