Home » Tag Archives: Redis

Tag Archives: Redis

How to use geolocation with Redis 3.2

redis-logo

Recently I was looking for a solution how to tell if couple of Longitudes, Latitudes actually in the same Radius. So in the beginning I was thinking using Elasticsearch to store all my geo-locations and use their mechanism in order to search whether a point is within the requested Radius of other points. Elastic-search is great product but I wasn’t sure if I wanted ...

Read More »

Integrate Redis to your Spring project

spring-interview-questions-answers

This article shows how to integrate Redis cache to your spring project through annotation configuration. We will begin with our Gradle configuration. We will use the jedis driver. group 'com.gkatzioura.spring' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE") } } jar { baseName = 'gs-serving-web-content' ...

Read More »

Logging to Redis using Spring Boot and Logback

redis-logo

When doing centralized logging, e.g. using Elasticsearch, Logstash and Kibana or Graylog2 you have several options available for your Java application. You can either write your standard application logs and parse those using Logstash, either consumed directly or shipped to another machine using something like logstash-forwarder. Alternatively you can write in a more appropriate format like JSON directly so the ...

Read More »

SharedHashMap vs Redis

redis-logo

Overview This is a comparison between OpenHFT’s SharedHashMap and a popular key-value store Redis. Any vendor will tell you how great their product is, so I will start by outlining why you wouldn’t use SharedHashMap, before I tell you why it is a “must have” for performant applications.       Why you would use Redis? Redis is a more ...

Read More »

Redis sort with Jedis

redis-logo

In this post we will talk about the Redis SORT command. Redis provides the SORT command that we can use to retrieve or store sorted values from a LIST, SET or ZSET. The simplest form we can use the command over a KEY like the example below:           SORT numbers_list This will sort the values contained ...

Read More »

Simple Message Queue using Redis

redis-logo

In this posts we will use Redis as a simple message queue, using list commands. Let’s say we have an application that allows the users to upload a photo. Then in the application we display the photo in different sizes like Thumb, Medium and Large. In a first implementation we could have the task of processing the uploaded image in ...

Read More »

Using Sorted Sets with Jedis API

redis-logo

In the previous post we started looking into Jedis API a Java Redis Client. In this post we will look into the Sorted Set(zsets). Sorted Set works like a Set in the way it doesn’t allow duplicated values. The big difference is that in Sorted Set each element has a score in order to keep the elements sorted. We can see ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.