suggest .net redis library
I get every minute >150 data items about road situation, item has nested structure. I want to use cached data when user make a request to
API
. First I need to clear pervious data using prefix and after add all items. It would be great if I could use class models for the data. What .net library for Redis can you recommend?44 Replies
the stackexchange lib. are there any others?
is it possible to use it with models? In documentation I only found hashset where you adding fields or saving string
redis is a key-value store. If you want to store models, serialize your model to json/protobuf etc before saving/loading it
I tried to save json using library and it saves it in string format which I can't use to search by field or other operations.
well yeah
its redis
you don't search by anything but key
while I want to save it like object
I want for example search by primary or secondary point or start time
sidenote, what redis UI client is that?
looks neat.
it's redis/redis-stack container I run it in docker
RedisInsightthanks, I've been looking for a good replacement for RDM looks like what you want is achievable via the
JSON.SET
method in redis... I think stackexchange supports that. lemme tryit's Redis.OM library that creates "object like structure", but it's beta version I'm not sure I can use it to delete items by prefix
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
this seems to work https://github.com/redis/NRedisStack
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Thank you for the suggestions, I will try both and see which one works out
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
done, I usually add .gitignore, just was I a hurry that time😀
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
I have a background worker in backend that make a request to https://tie.digitraffic.fi/api/traffic-message/v1/messages?situationType=ROAD_WORK&includeAreaGeometry=false every minute, after I parse json response to get features (road works), I need to store them in a cache. I also have a react app, there is a map where road works are displayed. As I think first I need to call tie.digitraffic api and get response, after I clean previous roadwork data in redis and save new one
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
probably I just display some notification in react app that data is missing, if I undestand your question correctly
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Idk I was given this task as a course project, and it's actually right now is written in typescript and I'm trying to rewrite in to c#, that the way previous student team implemented it
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
yes I can override data, I used Redis.OM and it creates key automatically and I couldn't use roadwork id to identify and override the data, that's why I decided maybe it's a good idea to clear the data first and save new
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
yes, but can I actually filter data using library you named? Not by the key, but other fields, for example startTime or roadNumber? or do I need to get all roadwork values and filter them using LINQ or something else? Probably I probably still missing how the redis works
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
sure, I'll check it, thank you for the help
I had to learn this the hard way
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
hi, I know it's off topic here I didn't know where to ask for it, but do you review project code by chance? Just to look at its structure in general
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
yes I posted there about 3 days ago but nobody answered, guess I should make more condensed description because it looks too hard to understand
lots of timeouts
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
both json and proto
application insights says proto deserialisation is taking a lot of cpu/ram
yeah I have big values
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
google one
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
some day probably
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
sure, I understand