[Unofficial] Geo-spatial extension for Redis

Hi! The “Build Your Own Redis” challenge was my first challenge on Codecrafters, and it’s also the most fun challenge on the platform for me! I always want more extensions for the same, and growing impatient of the wait, I decided to use the community ideas to build one!

You can try out my shot at creating the Geospatial Extension here. The GeoSpatial extension allows you to store, query, and manipulate geospatial data, such as locations and distances, directly within Redis. This extension currently adds 10 new stages, in which you will implement the following commands:

  • GEOADD - Add geospatial data to a key.
  • GEOPOS - Retrieve the coordinates of members stored using GEOADD.
  • GEOHASH - Calculate the hash of a geospatial key.
  • GEODIST - Calculate the distance between two members in a geospatial key.

Read about the stage-wise requirements to see how to implement the commands.

Since this in an unofficial extension, you won’t get the nice git-push experience as on the platform, but you can use the linked tester to run all the tests locally and verify the validity of your implementation. The extension is built on top of the official Redis tester, so the testing and validation experience should be familiar to you!

Thanks a lot to the Codecrafters team for open-sourcing the tester and a wonderful platform! Please do let me know if you give it a shot and how you feel about it! Thanks :slight_smile:

1 Like