Cross-context Web browser communication with unified communication models and context types

Modern Web applications are developed and executed as a set of interacting browser contexts, such as windows, frames and background workers. Cross-context communication systems have been rapidly evolving to support this interaction, but are still behind modern Web application demands. In this paper we present Pmrpc, a cross-context communication system with several novel properties important for future Web applications. First, the system provides three communication models, message-based, remote procedure call and publish-subcribe, and exposes them through a single unified programming interface. Second, the system enables communication between both window-type contexts and worker-type contexts using the same unified programming interface. Third, the system enables dynamic discovery of contexts. We present the architecture of Pmrpc, based on secure message-oriented browser primitives introduced in the HTML5 group of standards. Lastly, we compare the execution times of achieving specific application goals when using Pmrpc to those of HTML5 native browser primitives. We show that although Pmrpc is slower than native primitives, the reduction in performance is not significant and the system is still usable in real-world Web applications.