skip to main content
research-article

Doppio: breaking the browser language barrier

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

Web browsers have become a de facto universal operating system, and JavaScript its instruction set. Unfortunately, running other languages in the browser is not generally possible. Translation to JavaScript is not enough because browsers are a hostile environment for other languages. Previous approaches are either non-portable or require extensive modifications for programs to work in a browser.

This paper presents Doppio, a JavaScript-based runtime system that makes it possible to run unaltered applications written in general-purpose languages directly inside the browser. Doppio provides a wide range of runtime services, including a file system that enables local and external (cloud-based) storage, an unmanaged heap, sockets, blocking I/O, and multiple threads. We demonstrate DOPPIO's usefulness with two case studies: we extend Emscripten with Doppio, letting it run an unmodified C++ application in the browser with full functionality, and present DoppioJVM, an interpreter that runs unmodified JVM programs directly in the browser. While substantially slower than a native JVM (between 24X and 42X slower on CPU-intensive benchmarks in Google Chrome), DoppioJVM makes it feasible to directly reuse existing, non compute-intensive code.

References

  1. A. Adya, J. Howell, M. Theimer, W. J. Bolosky, and J. R. Douceur. Cooperative task management without manual stack management. In USENIX Annual Technical Conference, General Track, pages 289--302, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. Ansel, P. Marchenko, Ú. Erlingsson, E. Taylor, B. Chen, D. L. Schuff, D. Sehr, C. Biffle, and B. Yee. Language-independent sandboxing of just-in-time compilation and self-modifying code. In M. W. Hall and D. A. Padua, editors, PLDI, pages 355--366. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Bright. Internet Explorer 10 share doubles again on the back of Windows 7. http://goo.gl/hLYPa5.Google ScholarGoogle Scholar
  4. David Herman and Luke Wagner and Alon Zakai. asm.js. http://asmjs.org/spec/latest/.Google ScholarGoogle Scholar
  5. J. R. Douceur, J. Elson, J. Howell, and J. R. Lorch. Leveraging legacy code to deploy desktop applications on the web. In R. Draves and R. van Renesse, editors, OSDI, pages 339--354. USENIX Association, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Fournet, N. Swamy, J. Chen, P.-É. Dagand, P.-Y. Strub, and B. Livshits. Fully abstract compilation to JavaScript. In POPL, pages 371--384, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Google. Dart: Structured web apps. http://www.dartlang.org/.Google ScholarGoogle Scholar
  8. Google. JRE Emulation Reference - Google Web Toolkit - Google Developers. https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation.Google ScholarGoogle Scholar
  9. Google. NaCl and PNaCl. https://developers.google.com/native-client/pnacl-preview/nacl-and-pnacl.Google ScholarGoogle Scholar
  10. Google. WebRTC. http://www.webrtc.org/.Google ScholarGoogle Scholar
  11. Google Web Toolkit Community. Google web toolkit. https://developers.google.com/web-toolkit/.Google ScholarGoogle Scholar
  12. A. Guha, C. Saftoiu, and S. Krishnamurthi. The essence of JavaScript. In ECOOP, pages 126--150, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jeremy Ashkenas. CoffeeScript. http://coffeescript.org/.Google ScholarGoogle Scholar
  14. Khronos Group. WebGL - OpenGL ES 2.0 for the Web. http://www.khronos.org/webgl/.Google ScholarGoogle Scholar
  15. T. Lindholm and F. Yellin. The Java virtual machine specification. Java series. Addison-Wesley, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Martin. kanaka/websockify. https://github.com/kanaka/websockify.Google ScholarGoogle Scholar
  17. Microsoft Corporation. IL2JS - an intermediate language to JavaScript compiler. https://github.com/Reactive-Extensions/IL2JS.Google ScholarGoogle Scholar
  18. Microsoft Corporation. setImmediate API. http://ie.microsoft.com/testdrive/Performance/setImmediateSorting/Default.html.Google ScholarGoogle Scholar
  19. Microsoft Corporation. Welcome to TypeScript. http://www.typescriptlang.org.Google ScholarGoogle Scholar
  20. R. Sasse, S. T. King, J. Meseguer, and S. Tang. Ibos: A correct-by-construction modular browser. In C. S. Pasareanu and G. Salaün, editors, FACS, volume 7684 of Lecture Notes in Computer Science, pages 224--241. Springer, 2012.Google ScholarGoogle Scholar
  21. University of Illinois. Code Moo -- A playful way to learn programming. http://www.codemoo.com/index2.html.Google ScholarGoogle Scholar
  22. W3C Working Group. 6. Web application APIs. http://www.w3.org/TR/html5/webappapis.html#timers.Google ScholarGoogle Scholar
  23. B. Yee, D. Sehr, G. Dardyk, J. B. Chen, R. Muth, T. Ormandy, S. Okasaka, N. Narula, and N. Fullagar. Native client: a sandbox for portable, untrusted x86 native code. Commun. ACM, 53(1):91--99, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Yoo, E. Schanzer, S. Krishnamurthi, and K. Fisler. Wescheme: the browser is your programming environment. In G. Rößling, T. L. Naps, and C. Spannagel, editors, ITiCSE, pages 163--167. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Zakai. Porting "Me & My Shadow" to the Web. http://mzl.la/17Mujzr.Google ScholarGoogle Scholar
  26. A. Zakai. Emscripten: an LLVM-to-JavaScript compiler. In OOPSLA Companion, pages 301--312, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Doppio: breaking the browser language barrier

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 49, Issue 6
          PLDI '14
          June 2014
          598 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2666356
          • Editor:
          • Andy Gill
          Issue’s Table of Contents
          • cover image ACM Conferences
            PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
            June 2014
            619 pages
            ISBN:9781450327848
            DOI:10.1145/2594291

          Copyright © 2014 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 9 June 2014

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!