Skip to main content
QUICK REVIEW

[论文解读] HTTP Mailbox - Asynchronous RESTful Communication

Sawood Alam, Charles L. Cartledge|arXiv (Cornell University)|Jan 1, 2013
Peer-to-Peer Network Technologies参考文献 30被引用 3
一句话总结

HTTP Mailbox 提出了一种基于 RESTful 的异步消息传递系统,通过存储转发的邮箱抽象机制,实现了对所有 HTTP 方法(包括 PATCH、PUT 和 DELETE)的支持,使客户端即使在接收方不可达时也能发送消息。该系统实现了高达 0.01% 的可靠性(错误率),并支持流水线处理和群组消息传递,显著降低了分布式系统中的网络开销。

ABSTRACT

Traditionally, general web services used only the GET and POST methods of HTTP while several other HTTP methods like PUT, PATCH, and DELETE were rarely utilized. Additionally, the Web was mainly navigated by humans using web browsers and clicking on hyperlinks or submitting HTML forms. Clicking on a link is always a GET request while HTML forms only allow GET and POST methods. Recently, several web frameworks/libraries have started supporting RESTful web services through APIs. To support HTTP methods other than GET and POST in browsers, these frameworks have used hidden HTML form fields as a workaround to convey the desired HTTP method to the server application. In such cases, the web server is unaware of the intended HTTP method because it receives the request as POST. Middleware between the web server and the application may override the HTTP method based on special hidden form field values. Unavailability of the servers is another factor that affects the communication. Because of the stateless and synchronous nature of HTTP, a client must wait for the server to be available to perform the task and respond to the request. Browser-based communication also suffers from cross-origin restrictions for security reasons. We describe HTTP Mailbox, a mechanism to enable RESTful HTTP communication in an asynchronous mode with a full range of HTTP methods otherwise unavailable to standard clients and servers. HTTP Mailbox also allows for multicast semantics via HTTP. We evaluate a reference implementation using ApacheBench (a server stress testing tool) demonstrating high throughput (on 1,000 concurrent requests) and a systemic error rate of 0.01%. Finally, we demonstrate our HTTP Mailbox implementation in a human-assisted Web preservation application called “Preserve Me!" and a visualization application called "Preserve Me! Viz".

研究动机与目标

  • 为解决现有 Web 服务中同步、无状态 HTTP 的局限性,特别是标准浏览器不支持 PATCH、PUT 和 DELETE 等完整 HTTP 方法的问题。
  • 克服客户端因 HTML 和浏览器限制而难以使用非 GET/POST 方法的障碍。
  • 提供一种可靠、异步的通信层,将发送方与接收方解耦,确保即使在服务器中断期间也能实现消息传递。
  • 通过消息流水线处理和广播/多播支持,降低群组消息传递的网络开销,提升可扩展性。

提出的方法

  • 使用 HTTP POST 将消息(请求/响应)发送至中央邮箱 URI,消息内容封装在请求体中。
  • 采用存储转发模型,将消息持久化并异步传递,实现发送方与接收方的解耦。
  • 通过使用 application/http MIME 类型,将多个消息捆绑至单个 HTTP POST 请求中,实现消息流水线处理。
  • 通过单次邮箱提交支持单条消息被发送至多个接收方,实现多播和广播消息传递。
  • 通过 HTTP GET 获取消息,接收方使用 next/previous/first/last URI 链接以链式方式访问消息。
  • (计划)实现响应分页,以在高并发环境下优化消息检索性能。

实验结果

研究问题

  • RQ1能否在标准 HTTP 基础上构建一个支持所有 HTTP 方法的 RESTful 异步消息系统,即使在受限客户端环境中也能运行?
  • RQ2该系统在高并发和间歇性网络条件下,性能与可靠性如何扩展?
  • RQ3与点对点 HTTP 通信相比,消息流水线处理和群组消息传递在多大程度上能降低网络开销?
  • RQ4通过中心化邮箱引入间接通信,对消息传递延迟和系统可用性有何影响?

主要发现

  • 在高并发环境下,对超过 83,000 次发送与获取操作的参考实现中,系统整体错误率仅为 0.01%。
  • 系统表现出高吞吐量,能高效处理 1,000 个并发请求,且在并发级别为 1 时,每个 GET 请求的往返时间保持在 300–400 毫秒。
  • 使用 application/http MIME 类型的消息流水线处理显著减少了网络循环次数,尤其在群组消息传递场景中效果明显。
  • 系统成功实现了发送方与接收方的解耦,即使接收方不可达,也能实现非阻塞的消息传递。
  • HTTP Mailbox 模型使得在以往因浏览器或服务器限制而无法支持的环境中,也能完整使用 RESTful HTTP 方法(如 PATCH、PUT)。
  • 该实现已成功集成至 "Preserve Me!agger" 网页存档应用中,证明了其在真实场景中的实用性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。