将JavaScript事件循环转换为管道
Transforming Javascript Event-Loop Into a Pipeline
摘要:
实时Web应用程序的开发通常从功能驱动的方法开始,允许快速响应用户的反馈。然而,这种方法在性能上的伸缩性很差。然而,用户群可以在几个小时内增加一个数量级。第一种方法无法处理最高的连接峰值。它引导开发团队转向一种可扩展的方法,这种方法通常与新的开发范式(如XML编程)相关联。这种技术转变是破坏性的,并威胁到持续性。为了避免这种情况,我们建议将功能驱动的开发抽象为一种更具可扩展性的高级语言。事实上,这种高级语言的推理允许动态地应付用户基础大小的演变。我们提出了一种编译方法,将一个JavaScript,单线程的实时Web应用程序转换成一个网络的小的独立部分通过消息流进行通信。我们将这些部分命名为流(fluxions),通过流(法语中的flux)和函数之间的收缩。这些部分的独立性允许它们的执行是并行的,并在多个处理器上组织应用程序以应对其负载,类似于网络路由器处理IP流量的方式。我们通过将编译器应用于一个真实的Web应用程序来测试这种方法。我们将此应用程序转换为并行执行一个独立的部分,并呈现结果。
英文摘要:
The development of a real-time web application often starts with a feature-driven approach allowing to quickly react to users feedbacks. However, this approach poorly scales in performance. Yet, the user-base can increase by an order of magnitude in a matter of hours. This first approach is unable to deal with the highest connections spikes. It leads the development team to shift to a scalable approach often linked to new development paradigm such as dataflow programming. This shift of technology is disruptive and continuity-threatening. To avoid it, we propose to abstract the feature-driven development into a more scalable high-level language. Indeed, reasoning on this high-level language allows to dynamically cope with user-base size evolutions. We propose a compilation approach that transforms a Javascript, single-threaded real-time web application into a network of small independent parts communicating by message streams. We named these parts fluxions, by contraction between a flow (flux in french) and a function. The independence of these parts allows their execution to be parallel, and to organize an application on several processors to cope with its load, in a similar way network routers do with IP traffic. We test this approach by applying the compiler to a real web application. We transform this application to parallelize the execution of an independent part and present the result.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。