You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Falk Werner 6490092a86
removed codacy badge (badge is broken)
1 year ago
.github/ISSUE_TEMPLATE removed unnecessary stuff 4 years ago
.settings chore(webfuse): add debugging configurations and launch support (#21) 5 years ago
build updated libfuse to 3.10.0, libwebsockets to 4.1.3 4 years ago
doc updated libfuse to 3.10.0 4 years ago
include/webfuse feature: allow to specify mount options 4 years ago
lib/webfuse feature: allow to specify mount options 4 years ago
subprojects updated libfuse to 3.10.0, libwebsockets to 4.1.3 4 years ago
test/webfuse chore: added unit tests for mount options 4 years ago
.cproject refactor(mkdockerbuild): extracts common parts (#24) 5 years ago
.gitignore added basic meson build info 4 years ago
.project feat(webfuse): eclipse cdt project (#17) 5 years ago
.travis.yml removed arm32v7/minsize config (build time too long) 4 years ago
AUTHORS renamed to webfuse 5 years ago
COPYING.LESSER added license and authors files 5 years ago
Doxyfile set version to 0.8.0 4 years ago
Makefile updated libfuse to 3.10.0, libwebsockets to 4.1.3 4 years ago
README.md removed codacy badge (badge is broken) 1 year ago
VERSION set version to 0.8.0 4 years ago
changelog.md set version to 0.8.0 4 years ago
codecov.yml ignore test dirs 4 years ago
helgrind.supp added helgrind suppressions for libwebsockets realloc 4 years ago
meson.build set version to 0.8.0 4 years ago
meson_options.txt removed provider; renamed library 4 years ago

README.md

Build Status codecov

webfuse

webfuse combines libwebsockets and libfuse. It allows to attach a remote filesystem via websockets.

Contents

Motivation

Many embedded devices, such as smart home or IoT devices are very limited regarding to their (non-volatile) memory resources. Such devices are typically comprised of an embedded linux and a small web server, providing an interface for maintenance purposes.

Some use cases, such as firmware update, require to transfer (larger) files to the device. The firmware file is often stored multiple times on the device:

  1. cached by the web server, e.g. lighttpd
  2. copied to locally, e.g. /tmp
  3. uncompressed, also to /tmp

Techniques like SquashFS help to avoid the third step, since the upgrade file can be mounted directly. RAUC shows the use of SquashFS within an update facility.
However at least one (unecessary) copy of the upload file is needed on the device.

To avoid Steps 1 and 2, it would be great to keep the update file entirely in web server, just like NFS or WebDAV. Unfortunately, NFS is not based on any protocol, natively usable by a web application. WebDAV is based on HTTP, but it needs a server providing the update file.

webfuse solves this problem by using the WebSocket protocol. The emdedded device runs a service, known as webfuse adapter, awaiting incoming connections, e.g. from a web browser. The browser acts as a file system provider, providing the update file to the device.

Fellow Repositories

Known Implementations

Implementation Language Adatper/Server Adapter/Client Provider/Server Provider/Client
webfuse C/C++ - -
webfuse-provider C/C++ - - -
webfuse-js JavaScript - - -

Concept

concept

With webfuse it is possible to implement remote filesystems based on websockets. A reference implementation of such a daemon is provided within the examples. The picture above describes the workflow:

  • The websocket filesystem daemon (webfuse daemon) waits for incoming connections.

  • A remote filesystem provider connects to webfuse daemon via websocket protocol and adds one or more filesystems.
    Note: the examples include such a provider implemented in HTML and JavaScript.

  • Whenever the user makes filesystem requests, such as ls, the request is redirected via webfuse daemon to the connected filesystem provider

Adapters and Providers

In webfuse, an adapter is a component that adapts the libfuse API to a websocket interface. Currently, libwebfuse provides both, server based and client based adapters.

In webfuse, a provider is a component that provides a filesystem via websocket interface. Take a look at known implementations to find provider libraries.

Similar Projects

Davfs2

davfs2 is a Linux file system driver that allows to mount a WebDAV resource. WebDAV is an extension to HTTP/1.1 that allows remote collaborative authoring of Web resources.

Unlike webfuse, davfs2 mounts a remote filesystem locally, that is provided by a WebDAV server. In contrast, webfuse starts a server awaiting client connections to attach the remote file system.

Further Documentation