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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- S. Doeraene. Scala.js: Type-Directed Interoperability with Dynamically Typed Languages. Technical report, École polytechnique fédérale de Lausanne, 2013.Google Scholar
- 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 Scholar
Digital Library
- M. Fogleman. fogleman/gg: Go Graphics - 2D rendering in Go with a simple API, 2016. https://github.com/fogleman/gg.Google Scholar
- L. T. Hansen and J. Fairbank. ECMAScript Shared Memory and Atomics, 2016. https://tc39.github.io/ecmascript_sharedmem/shmem.html.Google Scholar
- 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 Scholar
Digital Library
- R. Hickey. Clojurescript. http://clojurescript.org/about/rationale, 2016.Google Scholar
- 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 Scholar
- T. Mauro. Adopting Microservices at Netflix: Lessons for Architectural Design, 2015. https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/.Google Scholar
- R. Musiol. gopherjs/gopherjs: A compiler from Go to JavaScript for running Go code in a browser, 2016. https://github.com/gopherjs/gopherjs.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Vouillon and V. Balat. From bytecode to JavaScript: the Js\_of\_ocaml compiler. Software: Practice and Experience, 44(8):951--972, 2014. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- A. Zakai. Emscripten: an LLVM-to-JavaScript compiler. In OOPSLA Companion, pages 301--312, 2011. Google Scholar
Digital Library
Index Terms
Browsix: Bridging the Gap Between Unix and the Browser
Recommendations
Browsix: Bridging the Gap Between Unix and the Browser
ASPLOS '17: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating SystemsApplications 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 ...
Browsix: Bridging the Gap Between Unix and the Browser
Asplos'17Applications 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 ...
WebLinux: a scalable in-browser and client-side Linux and IDE
[email protected] '18: Proceedings of the Fifth Annual ACM Conference on Learning at Scale"WebLinux" is a web app tool providing a standard Linux OS and an IDE in the browser, including a terminal, a code editor and a file browser. It provides a client-side and offline Linux OS environment based on a Javascript emulated processor. By ...







Comments