Skip to content

Cache fallback layer to RPC call #333

@seemayerpeter

Description

@seemayerpeter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions