最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to store "res" object in case of Server Sent Events (SSE) or "call" object in case of gR

programmeradmin7浏览0评论

Use Case:

For example, an app like Uber Driver requires the backend to maintain awareness of user-specific connections. Let's assume Uber's search algorithm shortlists 3 nearby drivers; the system needs to send ride requests to these 3 specific drivers. If the backend uses Server-Sent Events (SSE), it must determine which res object corresponds to each user. Similarly, in the case of gRPC, the backend needs to identify which call object is associated with each user.

We can use local map short of thing to store connections but that way is not that scalable So i want something more effective where i can store these connections with a userId reference and can be updated on user connection termination or new connection updates.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论