I am learning Node.js and the simple app I am creating will store 3 values in a database: latitude, longitude, message.
The app will then pull out any message that is located within a certain distance from your current location. The websockets just keeps your location up to date if you move around.
I know how I would do this using MySQL, but I thought there might be a more appropriate database that works well with Node.js.
Any suggestions?
Any key-value store is perfect for node.js since they store data as native JS objects or JSON.
Some popular ones include:
Here's a list of database modules for node.js: https://github.com/joyent/node/wiki/modules#database
Check out GeoCouch:
http://vmx.cx/cgi-bin/blog/index.cgi/geocouch-the-future-is-now%3A2010-05-03%3Aen%2CCouchDB%2CPython%2CErlang%2Cgeo
It lets you do spatial queries with CouchDB. It is very easy to talk to CouchDB from node.js because the API is JSON over HTTP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With