by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    ludwig404
    @leonh
    Hello, I have been looking at redis gears today and it seems very interesting. 1st question) I'm wondering how to view which gears scripts are running or registered within a redis instance . How would you manage these gears scripts , for instance enabling them or disabling them? 2nd question) is there a repository of useful redis gears "recipes" that a beginner could use as examples ?
    Meir Shpilraien (Spielrein)
    @MeirShpilraien

    Hey @leonh, regarding your first question, if you are using v0.4.0, it is possible to see registered executions using 'RG.DUMPREGISTRATIONS' command (https://oss.redislabs.com/redisgears/commands.html#rgdumpregistrations) then you can unregistered a specific registration using 'RG.UNREGISTER' (https://oss.redislabs.com/redisgears/commands.html#rgunregister). Notice that each time a registration is triggered it creates an execution, those executions can be managed using 'RG.DUMPEXECUTIONS', 'RG.GETEXECUTION' and 'RG.DROPEXECUTION'.

    Regarding examples, there is a very small and simple examples here: https://oss.redislabs.com/redisgears/examples.html.
    For more complex examples, take a look at those links:
    https://github.com/RedisGears/AnimalRecognitionDemo
    https://github.com/RedisGears/EdgeRealtimeVideoAnalytics
    https://github.com/RedisGears/MultiModelExample

    ludwig404
    @leonh
    thanks! @MeirShpilraien
    Mohit Kumar
    @mhtkmr74
    Hi Team,
    I am learning redis gears. I am stuck with one issue, I am unable to switch the DB index in Redis.
    Ex:- In redis-cli if I execute RG.PYEXECUTE "GearsBuilder('KeysReader').run()"
    I am getting the result from index 0 but if i switch db index from 0 to say 3 by command select 3, In this also I am getting the same response what I was getting in db index 0. My DB index 3 is empty.
    Meir Shpilraien (Spielrein)
    @MeirShpilraien
    Hey @mhtkmr74
    This is a known limitation, Gears runs in the background and might not even be related to a specific client (on registers for example). So it runs on db 0 by default (we might allow to change it in the future as an argument to the run/register functions but currently its not possible)
    Can you explain a little about the usecase? maybe we can find a way to work around it.
    Mohit Kumar
    @mhtkmr74
    Hi @MeirShpilraien
    Thanks for your quick response.
    I was storing two different types of data in two different indexes. So I came across this issue. I figured out the workaround now, I am storing both data in same index and going ahead
    xxGL1TCHxx
    @xxGL1TCHxx

    I've been a Redis fan for a while, and this provides some great new abilities. I'm able to make everything work except the StreamReader. Using the Basic Redis Stream Processing example found here: https://oss.redislabs.com/redisgears/examples.html#basic-redis-stream-processing

    Should I have to do anything more except publish to 'mystream'?

    Meir Shpilraien (Spielrein)
    @MeirShpilraien
    @xxGL1TCHxx You do not have to do anything else, can you post the reply of RG.DUMPREGISTRATIONS?
    @xxGL1TCHxx, when you say publish you mean XADD command right? PUBLISH command is for PUBSUB and not for streams.
    xxGL1TCHxx
    @xxGL1TCHxx
    Thanks for the response. I believe I had my stream and pubsub topics crossed. Great catch and thanks for pointing that out. I've been testing everything at once and must have just missed it. Sorry for the troubles!
    Meir Shpilraien (Spielrein)
    @MeirShpilraien
    No problem, let us know if you have any other questions/issues.
    Aman Singh
    @amansheaven
    Hey guys, I was working on the beyond the cache hackathon, and I am kinda stuck at adding multiple modules on the server. The .so files link the libraries to the server if they are added standalone, I mean if I compile it on a different machine and importing on other would it work?
    On Github, the way to do is copy Linux libraries and the .so file in my use case I would need three modules stream, graph and AI so should I just compile them take the .so files and get bin/linux-x64-release/python3_<version> from my local machine!
    or is there a better way of doing all this, by the great work at RedisEdge, I was about to work on building something similar but you guys did it already and in a way better manner :)
    Guy Korland
    @gkorland
    You can use the redismod docker which already comes with all the modules preinstalled docker pull redislabs/redismod:latest
    Aman Singh
    @amansheaven
    one more query, can gears process pub/sub messages?
    Meir Shpilraien (Spielrein)
    @MeirShpilraien
    @amansheaven currently there is no good way to achieve it, can you share the use case? maybe we can come up with another idea?
    Aman Singh
    @amansheaven
    Yeah I was thinking to make a random chat website that connects with people based on sentimental analysis of what you've been talking. To achieve this communication I am using web sockets, I do get an option in my library to choose Redis as my broker which basically makes a channel and execute it likewise! I wanted to query this pubsub and apply the AI module with the help of gears.
    I don't think I would be able to make it till the hackathon ends but it would be helpful if you have any intresteting additions to it. I'd be greatful to try then out!
    thanks @gkorland & @MeirShpilraien for your help!
    Guy Korland
    @gkorland
    @amansheaven thanks for the input and feedback
    Meha
    @mehamasum_twitter
    Hi folks, I was wondering why the write operation is first written to a hashkey first and then to a stream in Write Behind recipe in this blog post: https://redislabs.com/blog/redisgears-serverless-engine-for-redis/
    I mean why not directly write to the stream? Is there any extra benefits in this architecture?
    Meir Shpilraien (Spielrein)
    @MeirShpilraien
    Mainly the use-case was that you want to replicated redis hashes to some target database. If you want you can skip and write directly to streams but notice that you need to know the streams names and distribute the writes between them. You can get the steams name with a simple RedisGears function:
    GB('KeysOnlyReader').run('< Stream prefix >') # will return all the keys that starts with '< Stream prefix >'