: This is a heavily truncated republication of my submission notes for the 2022 Redis Hackathon.
A geocoder is a service for matching addresses to geographic locations and the entities containing those addresses. Geocoders use both geospatial queries and full text search to resolve incomplete addresses to addresses and locations from a validated. This project builds a geocoder using Redis Search and PubSub to provide both synchronous and asynchronous geocoding services. I go into detail about the implementation of this application in this walk-through video.
— The synchronous geocoding API allows a user to submit a query address or location and receive a list of scored, potentially matching addresses.
curl -XPOST https://gc.dmw2151.com/geocode/ \ -d '{ "method": "FWD_FUZZY", "max_results": 1, "query_addr": "ATLANTIC AVE BROOKLYN" }' { "result": [ { "address": { "id": "address:5185505" "location": { "latitude": 40.676468, "longitude": -73.909355 }, }, "normed_confidence": 1, "full_addr": "211 ATLANTIC BROOKLYN 11233" } ] }— The asynchronous API allows a user to submit a batch of addresses for geocoding. A request to this endpoint will kick-off a series of backend processes that asynchronously resolve all requested addresses.
The asynchronous geocoding API makes requests through
Geocoder Edgeand usesRedis Searchto handle address resolution.
Batch Status Cache— Stores information about request batches, treated as a status reference byBatch Status.
Event Bus- Used for pub/sub. Messages are sent betweenBatch StatusandAsync Worker. This instance maintains two channels. One for submitting work, another for updating worker progress toBatch Status.

