Closed bandoos closed 11 months ago
@bandoos Hi Luca,
First thing I'd suggest would be to check if redis-call
might be sufficient for your needs. This basically sends any arbitrary commands to Redis.
Does that cover your use case?
Thanks for the fast response!
Yes it does cover the use case.
I will close the issue but i'm still curious if i could potentially 'recompile' carmine against a custom commands.json spec?
I will close the issue but i'm still curious if i could potentially 'recompile' carmine against a custom commands.json spec?
Sure, you've got two options:
Append entries to https://github.com/ptaoussanis/carmine/blob/master/src/taoensso/carmine/commands.edn as your code starts up, before Carmine loads and consumes that file.
Just define your own fn/s that use redis-call
as a partial fn.
Number 2 is probably simpler and would do the job.
Cheers!
I just realised that as module use grows, it might be nice for Carmine to actually expose a hook for easily loading custom commands.edn or .json.
Would be easy to do this through an environment variable, etc.
Going to re-open this as a reminder for me to take a look at adding something like this next time I'm working on Carmine.
Just to update re: possibility of adding support for custom commands.json
and/or commands.edn
-
In hindsight, I don't think that Carmine is the right place for custom commands to be defined.
Users wishing to add 1st-class commands for modules, etc. - would do better to define these in a custom namespace:
tl;dr - folks using modules have two good options:
redis-call
, orredis-call
, etc. (this could be done on an application or library basis).
Hi!
(Great job awesome library! I can't describe the joy of finding libraries like this one)
In a hobby project i'm trying to build a system dashboard on top of redis with clj and cljs, and I'm now discovering about techniques in redis to store time-series data for cpu/memory/disk monitoring. Among the alternatives I found RedisTimeSeries which adds a new data structure and several commands to the redis instance.
The real question is: Do you have any pointers to give me for extending carmine generating additional commands from a redis extension module (e.g. RedisTimeSeries)?
I don't know if this is in the scope of carmine itself, and in fact my project can go on by wrapping the java library dedicated to the module; but i'd much rather maintain (and contribute) a carmine extension rather than a java wrapper.
Thanks in advance!
keep up the good work