-
Notifications
You must be signed in to change notification settings - Fork 84
Description
I'd like some help implementing a caching layer into the Router as a fallback if the callee is not registered at the moment of an RPC call.
The problem is as follows:
Client -> Router -> Callee (RPC)
Callee gives data to client.
Callee goes offline.
Client tries to call RPC, gets „procedure not registered”.
Basically if the procedure is not found, it would try to get the previous calls’ data from Redis/some other cache instead of throwing a „procedure not registered” right away. I’ve tried following the inner workings of the router by debugging it, however I do not think it is conventionally possible to implement it this way.
So what I would basically want to achieve is:
Client -> Router ->Callee
Callee->Router -> Cache data here -> caller
Callee goes offline
Client- >router->procedure not found -> go to cache -> cache data found -> return cache data instead.
I know it would be possible to implement this at the callers end, however it would be a lot simpler and a lot more efficient if it could be implemented on the router's side.