skip to main content
research-article
Public Access

Browsix: Bridging the Gap Between Unix and the Browser

Authors Info & Claims
Published:04 April 2017Publication History
Skip Abstract Section

Abstract

Applications written to run on conventional operating systems typically depend on OS abstractions like processes, pipes, signals, sockets, and a shared file system. Porting these applications to the web currently requires extensive rewriting or hosting significant portions of code server-side because browsers present a nontraditional runtime environment that lacks OS functionality.

This paper presents Browsix, a framework that bridges the considerable gap between conventional operating systems and the browser, enabling unmodified programs expecting a Unix-like environment to run directly in the browser. Browsix comprises two core parts: (1) a JavaScript-only system that makes core Unix features (including pipes, concurrent processes, signals, sockets, and a shared file system) available to web applications; and (2) extended JavaScript runtimes for C, C++, Go, and Node.js that support running programs written in these languages as processes in the browser. Browsix supports running a POSIX shell, making it straightforward to connect applications together via pipes.

We illustrate Browsix's capabilities via case studies that demonstrate how it eases porting legacy applications to the browser and enables new functionality. We demonstrate a Browsix-enabled LaTeX editor that operates by executing unmodified versions of pdfLaTeX and BibTeX. This browser-only LaTeX editor can render documents in seconds, making it fast enough to be practical. We further demonstrate how Browsix lets us port a client-server application to run entirely in the browser for disconnected operation. Creating these applications required less than 50 lines of glue code and no code modifications, demonstrating how easily Browsix can be used to build sophisticated web applications from existing parts without modification.

References

  1. A. Baumann, P. Barham, P.-E. Dagand, T. Harris, R. Isaacs, S. Peter, T. Roscoe, A. Schüpbach, and A. Singhania. The multikernel: a new OS architecture for scalable multicore systems. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles, pages 29--44. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. B. Brown and M. I. Seltzer. Operating system benchmarking in the wake of lmbench: A case study of the performance of netbsd on the intel x86 architecture. In Proceedings of the 1997 ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, SIGMETRICS '97, pages 214--224, New York, NY, USA, 1997. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Doeraene. Scala.js: Type-Directed Interoperability with Dynamically Typed Languages. Technical report, École polytechnique fédérale de Lausanne, 2013.Google ScholarGoogle Scholar
  4. J. R. Douceur, J. Elson, J. Howell, and J. R. Lorch. Leveraging legacy code to deploy desktop applications on the web. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, OSDI'08, pages 339--354, Berkeley, CA, USA, 2008. USENIX Association.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Fogleman. fogleman/gg: Go Graphics - 2D rendering in Go with a simple API, 2016. https://github.com/fogleman/gg.Google ScholarGoogle Scholar
  6. L. T. Hansen and J. Fairbank. ECMAScript Shared Memory and Atomics, 2016. https://tc39.github.io/ecmascript_sharedmem/shmem.html.Google ScholarGoogle Scholar
  7. H. Härtig, M. Hohmuth, J. Liedtke, J. Wolter, and S. Schönberg. The performance of μ-kernel-based systems. In Proceedings of the Sixteenth ACM Symposium on Operating Systems Principles, SOSP '97, pages 66--77, New York, NY, USA, 1997. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Hickey. Clojurescript. http://clojurescript.org/about/rationale, 2016.Google ScholarGoogle Scholar
  9. J. Howell, B. Parno, and J. R. Douceur. Embassies: Radically refactoring the web. In Proceedings of the 10th USENIX Conference on Networked Systems Design and Implementation, nsdi'13, pages 529--546, Berkeley, CA, USA, 2013. USENIX Association.Google ScholarGoogle Scholar
  10. T. Mauro. Adopting Microservices at Netflix: Lessons for Architectural Design, 2015. https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/.Google ScholarGoogle Scholar
  11. R. Musiol. gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser, 2016. https://github.com/gopherjs/gopherjs.Google ScholarGoogle Scholar
  12. S. Tang, H. Mai, and S. T. King. Trust and protection in the illinois browser operating system. In Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation, OSDI'10, pages 17--31, Berkeley, CA, USA, 2010. USENIX Association.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Vilk and E. D. Berger. Doppio: Breaking the browser language barrier. In Proceedings of the 2014 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2014), pages 508--518. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Vouillon and V. Balat. From bytecode to JavaScript: the Js\_of\_ocaml compiler. Software: Practice and Experience, 44(8):951--972, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Yoo and S. Krishnamurthi. Whalesong: running racket in the browser. In DLS'13, Proceedings of the 9th Symposium on Dynamic Languages, part of SPLASH 2013, Indianapolis, IN, USA, October 26--31, 2013, pages 97--108, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Zakai. Emscripten: an LLVM-to-JavaScript compiler. In OOPSLA Companion, pages 301--312, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Browsix: Bridging the Gap Between Unix and the Browser

      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 52, Issue 4
        ASPLOS '17
        April 2017
        811 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3093336
        Issue’s Table of Contents
        • cover image ACM Conferences
          ASPLOS '17: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems
          April 2017
          856 pages
          ISBN:9781450344654
          DOI:10.1145/3037697

        Copyright © 2017 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 April 2017

        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!