I’m a bit confused on Redis and its configuration.
General Questions
Based on documentation, there is:
a field for ‘cacheAdapter’ in the parse server configuration
a field ‘redisURL’ under the liveQuery configuration
a ‘redisURL’ within the createLiveQueryServer configuration.
Do you use the same Redis URL for all three of these, or is the livequery redis supposed to be different the the cache Adapter?
My Setup Question
I’m using AWS
I’m using elasticCache redis
If the two redis urls are different, do you need 2 instances of elastic cache redis or use the same instance?
If it’s the same instance, i know the documentation specifies a different DB but how do I set that within the configuration to work with AWS Elastic Cache.
Finally
I have the redis cache adapter setup and working, but its just very unclear how to add in the redis for live query and verify that it is caching correctly.
I believe second and third option is same. You should pass same redis instance. And I dont think you should pass redis to both. Setting redis to one of them(among 2 and 3) should be enough. But I’m not sure.
Edit: Setting redis to only one of them doesnt work. I just tried it. You need to pass redis url to both parse server configuration and live query command like this:
This is a question I’ve been meaning to get an answer to for a while.
LiveQuery uses redis for pub/sub only. Does pub/sub store anything in the redis? I don’t believe so. Since it doesn’t store anything I think it should be perfectly fine to use the same redis for both. Don’t quote me on this. The documentation was writing a long time ago and isn’t clear.
Pub/Sub has no relation to the key space. It was made to not interfere with it on any level, including database numbers.
Publishing on db 10, will be heard by a subscriber on db 1.
I have configured LiveQuery Server, my cloud code is with the main application, but when my client connects to LiveQuery Server, it doesn’t trigger the onLiveQueryEvent of the cloud code, do I need to make any changes?