# How to Redis - Kesha - Redis PubSub blog post series - Shared library for FS/FN projects mainly, more projects possible. Also possibility to publish it in the future. - Avoid one abstract interface, do more flexible utils functions - *Responsible gurus:* - pavel.svagr@ackee.cz (FS) - jaroslav.smolik@ackee.cz (FN) - Alternative names: Cashew, reDish, Feshka, Kshanda, myschka, Kesha+++ **Kesha** ## What to include ### FN - [getJSON](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L50) ❓ - [setJSON](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L10) ❓ - [processRedisStream]( https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L24) πŸ‘ - [unlinkPattern](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L51) πŸ‘ - [zsetUnlinkPattern]( https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L62) ❓ - [custom del](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L22) ❓ don’t use, imo maybe rename? - [custom set](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/redis/repository/redis.ts#L13) ❓ don’t use, imo maybe rename? - [cacheize](https://gitlab.ack.ee/Backend/flash-news-shared-pei/-/blob/master/src/lib/utils/cacheize.ts#L3) πŸ‘ - [Redis PubSub write-up](https://hackmd.io/t5irfgo3TCiNmrbsJFBfhA) - Monitoring - --slowlog , --bigkeys ; --hotkeys doesn’t work (we would need LFU / LRU) ❓ - [createDataLoader, createCompoundDataLoader, validItems](https://gitlab.ack.ee/Backend/flash-news-papillon/-/blob/development/src/app/components/dataLoaders/genericLoaders.ts) πŸ‘ (compound vynechat) - Refactored into [`createDataLoaderFactory`, `RedisDataLoaderOptions`](https://gitlab.ack.ee/Backend/flash-news-papillon/-/blob/3d98271e1d70cee62b4e93b37cd0cf625a39f695/src/app/components/dataLoaders/genericLoaders.ts#L23-69) - `createCompoundDataLoader` is just a cachezie effectively, we don't need it - [barrier](https://gitlab.ack.ee/Backend/flash-news-papillon/-/blob/development/src/app/components/utils.ts#L122) πŸ‘ - [hashRequest](https://gitlab.ack.ee/Backend/flash-news-papillon/-/blob/development/src/app/middlewares/cacheMiddleware.ts#L149) ❓ ### FS - [barrier](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/components/barrier.ts) + ["barriered loader"](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/components/applicationCache.ts#L68) - smtg. like that - [Basic template](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/components/cacheStorage.ts) - Move to utils like on FN - [DataLoaders](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/components/dataLoaders.ts) - Some template fn? - [Some key generators](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/components/applicationCache.ts#L43) ❓ - [CacheMiddleware](https://gitlab.ack.ee/Backend/flash-sport-userapi/-/blob/development/src/app/middlewares/cacheMiddleware.ts) - [dataloaders typings](https://gitlab.ack.ee/Backend/flash-sport-ls-adapter/-/blob/7fc477d20ba49945953278956cb4be4dcbd084b4/src/declarations.ts#L26) πŸ‘ (definitely typed?) - [health check](https://gitlab.ack.ee/Backend/flash-sport-ls-adapter/-/blob/7fc477d20ba49945953278956cb4be4dcbd084b4/src/app/controllers/healthz.ts#L7) ❓ - [client with retry mechanism](https://gitlab.ack.ee/Backend/flash-sport-ls-adapter/-/blob/7fc477d20ba49945953278956cb4be4dcbd084b4/src/app/services/redisConnector.ts#L18) ❓ - [rate limiter](https://gitlab.ack.ee/Backend/flash-sport-ls-adapter/-/blob/7fc477d20ba49945953278956cb4be4dcbd084b4/src/components/rateLimiter.ts) πŸ‘