Manipulating Geo Coordinate Data Using DAO Design Pattern in Jedis

In this article, we are going to learn how to add geocoordinate data and retrieve it using the DAO design pattern. The DAO pattern is implemented as a layer between the client application and the database.

The data being stored in the Redis database is modeled as a domain object (POJO class). It will have only getter and setter methods. The client application knows only the domain object and high-level API.

Testing Jedis API Using Junit Test Case in Eclipse IDE

Prerequisites

  • Eclipse (any version) with Maven capabilities
  • Java 8+
  • Junit
  • Redis and Jedis

Installing Redis Server on Windows   

  1. Click on the link: https://github.com/dmajkic/redis/downloads
  2. Download redis-2.4.5-win32-win64.zip file
  3. Unzip the file and go to the 64bit folder. There you can find redis-server.exe
  4. To start the Redis server, execute the redis-server.exe file.

Installing Eclipse-IDE on Windows    

    1.Click on the link: https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-09/R/eclipse-inst-jre-win64.exe

    2. Download eclipse-inst-jre-win64.exe file and run the eclipse installer.