Skip to main content

Questions tagged [redis]

Redis is an open-source, networked, in-memory, key-value data store.

Filter by
Sorted by
Tagged with
4 votes
1 answer
94 views

Simple Redis implementation in Rust

This is a very tiny implementation of Rust that uses redis serialization protocol (RESP). I implemented it as one of code crafters challenges. I have less than a few month experience in Rust, so it ...
Amir reza Riahi's user avatar
2 votes
1 answer
821 views

Parallel handling db queries is very slow in C#

I have SignalR app that publishes sent messages to Redis. My console app subscribe to channel where these messages are sent, deserializes it and saves in database. Problem is with handling these ...
Szyszka947's user avatar
1 vote
0 answers
77 views

Two steps changing email system Django + Redis

I created a two steps changing email system. Firstly I show you the concept how it should work and then the code. I am using Django and React. Main question: is it a good way to do it? Is it fine to ...
some nooby questions's user avatar
2 votes
1 answer
978 views

Redis Output Cache Store refactoring - IOutputCacheStore Redis Implementation

This code incorporates the new .NET 7 Output Caching. I would like to get some refactoring tips on the RedisOutputCacheStore class. How to use ...
nop's user avatar
  • 779
1 vote
1 answer
436 views

Asp.Net Core CacheKey Management

I created cache management structure for Asp.Net Core and Redis. But i dont know is this best practices or bad. My Github Repo First one is Store my entity keys class is ...
filiphasan's user avatar
1 vote
0 answers
381 views

Python and redis. Make queries more efficient

My Python code (part of a Django site) queries data from a redis database and loads it into a Pandas dataframe. I'm new to redis, and I think I'm not using the redis library as efficiently as I could. ...
Michael Cornn's user avatar
2 votes
0 answers
27 views

Scalability of azure redis example

I built an auction site with a dynamic caching layer after I seeing how expensive a dbaas is. The site is now done, but like any site that grows, my caching solution grew too. The cache currently ...
user6680's user avatar
  • 121
2 votes
0 answers
33 views

Profiling redis RTT in go

I'm trying to determine best case round-trip times to a redis server. Particularly, I am trying to determine exactly how low I can get the latency on a local instance. On a technical level, this is ...
DeusXMachina's user avatar
1 vote
0 answers
48 views

Memoization of slow URL get requests

Purpose of this small module is to allow memoization of slow URL get requests. I intend to send many of these to download a bunch of files from internal (rather slow, old) website. Some requests may ...
biosckon's user avatar
  • 173
5 votes
1 answer
14k views

Dependency Injected StackExchange.Redis Client

I am currently building cache for my application, and I would like to have my redis cache client work the same way you would dependency inject a DbContext. I am using StackExchange.Redis to manage my ...
Thorbear's user avatar
5 votes
0 answers
841 views

Docker-compose for task-based Flask API with Redis and rq

I am not a Docker guru or expert in Flask or Redis. However, I need to leverage these technologies. I managed to cobble something together that works and would like to submit it for review. The MWE ...
SumNeuron's user avatar
  • 281
2 votes
1 answer
435 views

Redis work queue processor

I frequently encounter the need for creating services that concurrently process messages from Redis queues. So I decided to share the knowledge I learned and help others easily bootstrap such a ...
Issa Khoury's user avatar
2 votes
0 answers
2k views

Singleton pattern for Redis connection

Recently I have learned about singleton design pattern. I have tried to implement Redis connection following singleton design pattern. conn/redis.go ...
Mahmudul Haque's user avatar
4 votes
2 answers
8k views

Accessing a subset of keys from a nested dictionary in Python

I am trying to access data from Coinmarketcap API in Python and came up with the following code: ...
PirateApp's user avatar
  • 143
4 votes
1 answer
88 views

Fetching and storing new reddit posts

I've created a small tool that fetches and stores the newest self-posts from a specific subreddit. The posts are stored in a redis store. I'm going to write another couple of applications at a future ...
tverghis's user avatar
  • 143
4 votes
1 answer
593 views

One minute cron Python script reads from MySQL and updates Redis based on calculations

The following code works and will be put into cron on a AWS server (not sure what specifications, cores, kernels etc) at a every 1 minute frequency. However, it's my first time putting a script into ...
Deepak's user avatar
  • 41
1 vote
1 answer
952 views

Write millions of lines to a file - Python, Dataframes and Redis [closed]

I have the following code snippet that reads a CSV into a dataframe, and writes out key-values pairs to a file in a Redis protocol-compliant fashion, i.e. ...
CodingInCircles's user avatar
2 votes
1 answer
106 views

Web scraper extracts zip files and publishes them to redis

I wrote this program for a job interview a while back. I would like general feedback on style, readability, maintainability, or any obvious flaws: ...
kingsfoil's user avatar
  • 179
2 votes
0 answers
389 views

Redis lua - game leaderboard "overview"

Here is the code I invoke as Lua script in Redis. I use Redis sorted set to store game scores. This function is used to get some kind of overview of leaderboard. It returns id, score and rank of: ...
odk's user avatar
  • 121
1 vote
1 answer
819 views

GET and POST with Flask - optimum performance

I have this code to POST and save a digest to redis, and retrieve it from redis on a GET. This uses Python and Flask, of course. ...
adele dazim's user avatar
3 votes
1 answer
892 views

Redis lookup with a default value

I have some code to perform a redis lookup, but if the key to look up either doesn't exist or there's an issue connecting to Redis at all, it will use a default value. The logic currently looks like ...
Peter Souter's user avatar
7 votes
1 answer
251 views

Python Flask webserver with small features

With the latest of my projects, I started using Visual Studio Code, which allows for Python linting and also checking for poor practices, such as using over 100 characters in a single line. As you ...
Luke's user avatar
  • 501
0 votes
1 answer
114 views

List User Online Status

I'm using Rails with MongoDB for database. In my apps I have 1 action for displaying list of users. User has name, image, ...
itx's user avatar
  • 269
2 votes
1 answer
3k views

Spring Data Redis - mapping object relationships?

I'm designing an app that will process a set of social media messages which are posted by users. Each message is then scored and there is a reporting layer that will spit out a set of reports. The app ...
emeraldjava's user avatar
2 votes
1 answer
582 views

Redis lock implementation

Considering I'm not implementing distributed lock mechanism, is this code correct and clear? ...
cutalion's user avatar
  • 184
2 votes
1 answer
1k views

Redis protocol implementation by Kotlin

I have created my first project on the github. It is Redis client protocol implementation (request-responce part only). I would like to make my sources more Kotlin style. Please, check my sources and ...
Andrei Sibircevs's user avatar
0 votes
1 answer
157 views

Game Data Client: Go based Game server

In my previous question I asked how could the Redis client be improved. Here I will ask how can the Game data Client can be improved. Game Data client sits on top of Redis Client and uses datatypes ...
Vivek's user avatar
  • 221
2 votes
1 answer
211 views

Redis Client: Go based Game server

Here is my Go code to interact with a Redis server ...
Vivek's user avatar
  • 221
4 votes
1 answer
69 views

GET event handler

I'm working on my first NodeJS / Express application with the async module. It's been an uphill battle for me learning node (and even JavaScript) as I go along so I'm sure there's a lot of room for ...
Happydevdays's user avatar
4 votes
0 answers
440 views

2-tier c# cache

I have slightly altered Marc Gravells 2-tier cache code which can be seen here. I changed it to use Stackexchange.Redis instead of Booksleeve and also added some retry logic and serialization. ...
Peuge's user avatar
  • 141
2 votes
1 answer
802 views

Depersonalisation via redis cache

In an Azure Function, I have a c# program that processes tab delimited data into JSON entries. I'd like to improve it in terms of performance and the connection management. I want to remove personal ...
Steph Locke's user avatar
4 votes
1 answer
448 views

Server setup script for Redis, HAProxy and Node.js

I wrote a pretty basic setup script that handles most of the setup for a Three-server solution. The solution and setup file are available on GitHub The three servers are Redis, HAProxy and Node / ...
Quill's user avatar
  • 11.9k
1 vote
2 answers
492 views

Small C++ thread pool

I've made a small thread pool that i'll be using to communicate with a Redis server: ...
vinnylinux's user avatar
2 votes
1 answer
4k views

Singleton method for Redis connection in Python

Here's my class for providing a singleton instance of a Redis connection. What do you think? ...
John Bachir's user avatar
2 votes
1 answer
928 views

NodeJS script to dump data from Redis to Elasticsearch

I have about a million records in Redis which I want to dump into Elasticsearch periodically. I just want to make sure that my script is decent enough in terms of speed and no memory leaks. ...
toy's user avatar
  • 813
2 votes
2 answers
291 views

Silly redis implementation

This is a silly Redis implementation that handles only three commands: INFO, ECHO, PING. The implementation is based on streams: ...
kharandziuk's user avatar
1 vote
1 answer
64 views

Store and output hard-coded relationships among hosts

The following code has begun to smell, but I have not yet decided with what to replace it, other than, obviously, a database. I made a very unsatisfactory workaround for my attempt to make ...
Nathan Basanese's user avatar
3 votes
3 answers
132 views

Preventing floods while saving logs

I had a logging function… ...
4ell's user avatar
  • 163
6 votes
1 answer
322 views

Tornado chat with SockJS and Redis

I have Tornado chat with export to Redis. Other scripts will export messages from Redis to MongoDB in the time. It works, but how is it written? ...
JRazor's user avatar
  • 163
3 votes
1 answer
953 views

API to verify whether a Redis entry exists

I come from a PHP object oriented framework background (Laravel, Symfony, Silex...). With that, validation comes in pre-built classes mechanism in a framework that validates for you parameters that ...
azngunit81's user avatar
  • 1,210
2 votes
0 answers
1k views

Node.js and Redis based chat application

I have been worked on creating a chat tool similar to vk.com. Right now I have done a simple chat which requires only authentication via a PHP website and everyone can chat with each other. I used the ...
DipakC's user avatar
  • 121
4 votes
1 answer
12k views

Redis Object storage and conversion

I am stepping into a new realm with this project, Reflection. I have written some working code (below) that will potentially store POCO objects in a redis cache (and eventually backed by Table or ...
Craig Russell's user avatar
7 votes
2 answers
938 views

Sum-based sliding rate limiting with Redis and Lua

As I'm new to Redis, I would like to get a review / improvement suggestions from Redis / Lua experts on the following problem and the solution I have found so far. Problem The context is: an e-...
Maxim Gueivandov's user avatar
4 votes
0 answers
85 views

Token generating library on Redis

This is a token generating library for Go that runs on top of Redis. I'm using it as part of a larger projects. The library needs to be able to generate and validate tokens and return the associated ...
James G's user avatar
  • 41
7 votes
2 answers
5k views

Redis Message Queue (Cloud)

I am in the process of writing a Cloud application (mostly hobby, learning) that required a very quick cache, queue, and messaging system. I have looked at a few different options from Microsoft (...
Craig Russell's user avatar
4 votes
1 answer
93 views

Game boot to some operations every second

I am building game, like Ogame, or Ikariam where you can play with other users in real-time. You train some soldiers, and build some vehicles or buildings. Every building or vehicle has some level. If ...
infaustus's user avatar
  • 183
3 votes
1 answer
9k views

Cached-object Store c# with Redis client for persistent storage

I have written a Cached-Object store with a Redis Client for persistent storage. The application that is going to use this is a heavy read application with the occasional write. I assume that entire ...
Joachim's user avatar
  • 205
3 votes
1 answer
7k views

Spring oauth2 token store supported by redis

I had to make a demo for Spring oauth2 with redis store for tokens. Started with the sparklr2 (with tonr2) sample app from here. They are demo apps to show oauth2 powered by spring. Sparklr is the ...
tgkprog's user avatar
  • 223
3 votes
1 answer
5k views

Redis Cache Data source code - Retrieve/Set/Invalidate actions

This is my RedisDataSource code. What I am mainly interested in is how the retry policy could be improved and if using WindowsAzure Trainsient Fault Handling this case (using Redis Azure Cache) makes ...
Jakub Holovsky's user avatar
7 votes
1 answer
11k views

Async distributed locking with StackExchange.Redis [closed]

I have been trying to write an analogy to this approach to distributed locking with two differences: making it asynchronous making it work with StackExchange.Redis rather than AppFabric Cache. My ...
ChrisT's user avatar
  • 123