fuse-wsfs combines libwebsockets and libfuse. It allows ot attach a remote filesystem via websockets.
fuse-wsfs combines libwebsockets and libfuse. It allows ot attach a remote filesystem via websockets.
# Contents
## Contents
- [Workflow and API](#Workflow-and-API)
- [Workflow and API](#Workflow-and-API)
- [Build and run](#Build-and-run)
- [Build and run](#Build-and-run)
- [Dependencies](#Dependencies)
- [Dependencies](#Dependencies)
# Workflow and API
## Workflow and API
+---------------------+ +-------------+ +------+
+---------------------+ +-------------+ +------+
| Filesystem Provider | | wsfs daemon | | user |
| Filesystem Provider | | wsfs daemon | | user |
@ -54,11 +54,11 @@ A reference implementation of such a daemon is provided within the examples. The
Currently all requests are initiated by wsfs daemon and responded by filesystem provider. This may change in future, e.g. when authentication is supported.
Currently all requests are initiated by wsfs daemon and responded by filesystem provider. This may change in future, e.g. when authentication is supported.
## Requests, responses and notifications
### Requests, responses and notifications
There are three types of messages, used for communication between wsfs daemon and filesystem provider. All message types are encoded in [JSON](https://www.json.org/) and strongly inspired by [JSON-RPC](https://www.jsonrpc.org/).
There are three types of messages, used for communication between wsfs daemon and filesystem provider. All message types are encoded in [JSON](https://www.json.org/) and strongly inspired by [JSON-RPC](https://www.jsonrpc.org/).
### Request
#### Request
A request is used by a sender to invoke a method on the receiver. The sender awaits a response from the receiver. Since requests and responses can be sendet or answered in any order, an id is provided in each request to identify it.
A request is used by a sender to invoke a method on the receiver. The sender awaits a response from the receiver. Since requests and responses can be sendet or answered in any order, an id is provided in each request to identify it.
@ -74,11 +74,11 @@ A request is used by a sender to invoke a method on the receiver. The sender awa
| params | array | method specific parameters |
| params | array | method specific parameters |
| id | integer | id, which is repeated in response |
| id | integer | id, which is repeated in response |
### Response
#### Response
A response is used to answer a prior request. There are two kinds of responses:
A response is used to answer a prior request. There are two kinds of responses:
#### Successful Results
##### Successful Results
{
{
"result": <result>,
"result": <result>,
@ -90,7 +90,7 @@ A response is used to answer a prior request. There are two kinds of responses:
| result | any | request specific result |
| result | any | request specific result |
| id | integer | id, same as request |
| id | integer | id, same as request |
#### Error notifications
##### Error notifications
{
{
"error": {
"error": {
@ -104,7 +104,7 @@ A response is used to answer a prior request. There are two kinds of responses: