Uber在gRPC上的下一代推送平台

In our last blog post we talked about how we went from polling for refreshing the app to a push-based flow to build our app experience. 

在我们的上一篇博文中,我们谈到了我们如何从投票刷新应用程序到基于推送的流程来构建我们的应用程序体验。

All our apps need to be synced with real-time information, whether it’s through pickup time, arrival time, and route lines on the screen, or nearby drivers when you open the app. We use our push platform to deliver these messages that power the real-time user experiences as described in our previous post, which we strongly recommend that you review to learn about the details of the architecture before proceeding. 

我们所有的应用程序都需要与实时信息同步,无论是通过屏幕上的接车时间、到达时间和路线线,还是在你打开应用程序时附近的司机。我们使用我们的推送平台来传递这些信息,这些信息为实时的用户体验提供了动力,正如我们之前的文章中所描述的那样,我们强烈建议你在继续之前回顾一下,了解一下架构的细节。

This blog post will cover how we changed our protocol from Server Sent Events (HTTP1.1) to gRPC-based bidirectional streaming (QUIC/HTTP3), the challenges we faced, the final results, and some key learnings. 

这篇博文将介绍我们如何将协议从服务器发送的事件(HTTP1.1)改为基于gRPC的双向流(QUIC/HTTP3),我们面临的挑战,最终结果,以及一些关键的学习。

Motivation to Move to gRPC 

转移到gRPC的动机

In this section we will talk about the reasons to move RAMEN (Real-time Asynchronous MEssaging Network) from SSE (Server-Sent Events) to gRPC as the protocol for delivering messages. 

在这一节中,我们将讨论将RAMEN(实时 异步 消息 网络)从SSE(服务器发送事件)转移到gRPC作为消息传递协议的原因。

Before jumping into that let’s have a quick look at how we built RAMEN using SSE as the underlying protocol. This will help in understanding the changes that we made to enable gRPC at each layer. 

在进入这个问题之前,让我们先看看我们是如何使用SSE作为底层协议构建RAMEN的。这将有助于理解我们为在每一层启用gRPC所做的改变。

Existing SSE-based Architecture

现有的基于SSE的架构

Here is a quick overview of the client’s implementation: 

以下是客户实施情况的快速概述。

Figure 2: RAMEN SSE Architecture frontend

图2:RAMEN SSE架构前端

  1. Mobile RAMEN SSE Client initiates a connection to RAMEN Server via the SSE /ramen/receive endpoint, and maintains a persistent connection. 
  2. 移动RAMEN SSE客户端通过SSE/ramen/receive端点启动与RAMEN服务器的连接,并保持一个持久的连接。
  3. RAMEN Server pushes all messages to the mobile client through the SSE connect...
开通本站会员,查看完整译文。

Home - Wiki
Copyright © 2011-2024 iteam. Current version is 2.129.0. UTC+08:00, 2024-07-04 15:15
浙ICP备14020137号-1 $Map of visitor$