1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
Go to file
2020-06-14 20:20:14 +02:00
.github/ISSUE_TEMPLATE removed unnecessary stuff 2020-03-07 15:07:25 +01:00
.settings chore(webfuse): add debugging configurations and launch support (#21) 2019-04-02 22:21:02 +02:00
build fixes buildtype coverage and minsize release 2020-06-07 16:56:23 +02:00
doc enhanced API documentation 2020-06-14 13:41:10 +02:00
include added API docs 2020-06-14 14:17:36 +02:00
lib/webfuse removed dead code 2020-06-14 14:18:52 +02:00
subprojects added wrap file of libwebsockets 2020-06-04 17:55:33 +02:00
test add test for connect failure 2020-06-14 20:20:14 +02:00
.cproject refactor(mkdockerbuild): extracts common parts (#24) 2019-04-17 17:25:56 +02:00
.gitignore added basic meson build info 2020-05-22 22:39:40 +02:00
.project feat(webfuse): eclipse cdt project (#17) 2019-03-28 07:43:21 +01:00
.travis.yml removed arm32v7/minsize config (build time too long) 2020-06-14 19:28:05 +02:00
AUTHORS renamed to webfuse 2019-03-26 23:04:53 +01:00
changelog.md add adapter client implementation 2020-06-14 14:20:20 +02:00
codecov.yml ignore test dirs 2020-03-21 22:06:36 +01:00
COPYING.LESSER added license and authors files 2019-01-27 03:52:29 +01:00
Doxyfile increased version 2020-06-05 15:29:24 +02:00
Makefile fixes buildtype coverage and minsize release 2020-06-07 16:56:23 +02:00
meson_options.txt added build options for meson 2020-05-25 19:55:09 +02:00
meson.build put wf_client into a separate thread for testing 2020-06-13 18:24:45 +02:00
README.md refactored README 2020-02-18 21:48:52 +01:00
VERSION increased version 2020-06-05 15:29:24 +02:00

Build Status Codacy Badge codecov

webfuse

webfuse combines libwebsockets and libfuse. It allows ot 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

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 implements only a server based adapter - a websocket server, that allows clients to connect a remote file system which is represented via libfuse on the server side.

In webfuse, a provider is a component that provides a filesystem via websocket interface. Currently, libwebfuse implements only a client based provider - a websocket client that provides a local filesystem to a remote server.

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