首页> 外文会议> >Communicating Generators in JavaScript
【24h】

Communicating Generators in JavaScript

机译:用JavaScript交流生成器

获取原文

摘要

This paper outlines the design, performance, and use of an application programming interface and library for concurrent programming with CSP in JavaScript. The implementation harnesses ECMAScript 6 Generators to provide co-operative scheduling and channel communication within a single JavaScript engine. External channels lie atop WebSockets, amongst other web technologies, to enable multicore and distributed execution across standard web browsers and Node.js servers. Low-level benchmarks indicate that scheduling and messaging performance is within expectations for this dynamic and diverse execution environment. Sample code snippets highlight the applicability of CSP to contemporary web development in hiding the location of computation and state through the channel abstraction. The "call-back hell" scenario common to many JavaScript applications is alleviated by using channels instead of callbacks, and the possibility of performing parallel and scientific computing is explored with promising results. Finally, the limitations of the present design are discussed, and possible enhancements such as the dynamic migration of state and code are considered.
机译:本文概述了使用JavaScript进行CSP并发编程的应用程序编程接口和库的设计,性能和使用。该实现利用ECMAScript 6生成器在单个JavaScript引擎内提供协作调度和通道通信。除其他Web技术外,WebSockets之上还设有外部通道,以实现跨标准Web浏览器和Node.js服务器的多核和分布式执行。低级别的基准表明,在这种动态且多样化的执行环境中,调度和消息传递性能在期望之内。示例代码段突出显示了CSP在通过通道抽象隐藏计算和状态的位置时在当代Web开发中的适用性。通过使用通道而不是回调,可以缓解许多JavaScript应用程序常见的“回调地狱”场景,并且探索了执行并行科学计算的可能性,并获得了可喜的结果。最后,讨论了本设计的局限性,并考虑了可能的增强功能,例如状态和代码的动态迁移。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号