CernVM-FS powered WebAssembly I/O

Introduction

The physics experiments at the Large Hadron Collider (LHC) created millions of lines of scientific C++ code, most of it is targeted to the Linux platform. The emscripten compiler allows us to compile C++ into asm.js or WebAssembly, and thus enables us to use any browser as a computing device!

File based I/O in the browser’s JavaScript sandbox, however, is a notorious problem. Many physics applications load some data from files in order to do useful work, for instance particle detector geometry, parton distribution functions, parameter sets for Monte Carlo event generators. In Linux applications, such data can be loaded from the CernVM File System, an HTTP based, read-only POSIX file system implemented in Fuse.

The emscripten compiler provides a file system interface similar to Fuse. It can be extended by custom file system backends. The goal of this project is to prototype a CernVM-FS backend for emscripten.

Task

The emscripten JavaScript sources should be extended by a custom, new file system implementation. The new file system implementation should be able to understand CernVM-FS repositories and to load data from them. That will require, amongst other things, getting information from sqlite files and zlib decompression implemented in JaveScript (or compiled from C into JavaScript/wasm).

Expected results

A file system backend for emscripten such that C++ programs compiled with emscripten can use C/C++ read-only file I/O on files in a CernVM-FS repository.

Requirements

Mentors

Corresponding Project

Participating Organizations