<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dmw</title>
    <description>The latest articles on DEV Community by dmw (@dmw).</description>
    <link>https://dev.to/dmw</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F914743%2F305c525f-7347-436f-a679-9d3e2a114771.jpg</url>
      <title>DEV Community: dmw</title>
      <link>https://dev.to/dmw</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dmw"/>
    <language>en</language>
    <item>
      <title>Building Address Resolution Services with Redis Search</title>
      <dc:creator>dmw</dc:creator>
      <pubDate>Sun, 28 Aug 2022 22:46:00 +0000</pubDate>
      <link>https://dev.to/dmw/building-address-resolution-services-with-redis-search-3ok8</link>
      <guid>https://dev.to/dmw/building-address-resolution-services-with-redis-search-3ok8</guid>
      <description>&lt;h3&gt;
  
  
  Project Overview
&lt;/h3&gt;

&lt;p&gt;A geocoder is a service for matching addresses to geographic locations. Geocoders use both geospatial queries and full text search to resolve incoming data to addresses and locations from a validated set of addresses.&lt;/p&gt;

&lt;p&gt;For example, if a developer wants to resolve &lt;code&gt;TIMES SQ MANHATTAN&lt;/code&gt; to a full address with coordinates, they may make a request against a forward geocoding API. This API will likely apply a full text search algorithm against a known database of addresses and return a list of potential matches (e.g. &lt;code&gt;TIMES SQ MANHATTAN&lt;/code&gt; -&amp;gt; &lt;code&gt;["5 TIMES SQUARE MANHATTAN 10036", "42 TIMES SQUARE MANHATTAN 10036"]&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Alternatively, if a developer wanted to resolve &lt;code&gt;(40.768044, -73.982372)&lt;/code&gt;, they could use a reverse geocoding API. A reverse geocoder uses geospatial search to provide validated locations that are near the requested point (e.g. &lt;code&gt;(40.768044, -73.982372)&lt;/code&gt; -&amp;gt; &lt;code&gt;2 COLUMBUS CIR MANHATTAN 10019&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Over the last few days, I built out a geocoder that uses Redis Search to implement both forward and reverse geocoding against approximately 1 million New York City addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xxbru3seox07nfqf30w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xxbru3seox07nfqf30w.jpg" alt="Full Arch Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, using Redis Pub/Sub, I extended this service to provide a batch address resolution endpoint. With this batch service, developers can make geocoding requests and easily share the resolved addresses. In the video linked below, I go into detail about the system architecture and how Redis enabled this service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Video
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/E2SqCKP4cvw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Submission Details
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Submission Category: Microservice Mavens&lt;/li&gt;
&lt;li&gt;Language Used: Go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A full description of the project is available on the project's GitHub repo below. The gcaas repo contains detail about the data structures used for each component of the application and all sample data shown in the video walkthrough.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/DMW2151" rel="noopener noreferrer"&gt;
        DMW2151
      &lt;/a&gt; / &lt;a href="https://github.com/DMW2151/gcaas" rel="noopener noreferrer"&gt;
        gcaas
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Submission for 2022 Hackathon  - Geocoding API
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Geocoding with Redis&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;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 repo builds a geocoder using Redis Search and PubSub to provide both a synchronous and asynchronous geocoding services. I go into detail about the implementation of this application in this &lt;a href="https://youtu.be/E2SqCKP4cvw" rel="nofollow noopener noreferrer"&gt;walkthrough video&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Application Description&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Figure 1.0 Synchronous Geocoding Architecture&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/DMW2151/gcaas./misc/docs/_arch_sync.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FDMW2151%2Fgcaas.%2Fmisc%2Fdocs%2F_arch_sync.png" alt="arch"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The synchronous geocoding API allows a user to submit a query address or location and receive a list of scored, potentially matching addresses. See examples below.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; sample forward query :: address -&amp;gt; (address, coordinates)&lt;/span&gt;
curl -XPOST https://gc.dmw2151.com/geocode/ \
-d &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;'&lt;/span&gt;{"method": "FWD_FUZZY", "max_results": 3, "query_addr": "ATLANTIC AVE BROOKLYN"}&lt;span class="pl-pds"&gt;'&lt;/span&gt;&lt;/span&gt;
{
  &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;result&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;: [
    {
      &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;address&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;: {
        &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;location&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;: {
          &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;latitude&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/DMW2151/gcaas" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Check out &lt;a href="https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries" rel="noopener noreferrer"&gt;Redis OM&lt;/a&gt;, client libraries for working with Redis as a multi-model database.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Use &lt;a href="https://redis.info/redisinsight" rel="noopener noreferrer"&gt;RedisInsight&lt;/a&gt; to visualize your data in Redis.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Sign up for a &lt;a href="https://redis.info/try-free-dev-to" rel="noopener noreferrer"&gt;free Redis database&lt;/a&gt;.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>redishackathon</category>
      <category>microservices</category>
      <category>distributedsystems</category>
      <category>database</category>
    </item>
  </channel>
</rss>
