Skip to content

Commit

Permalink
feat: Wire up WebSockets.
Browse files Browse the repository at this point in the history
Closes #337
  • Loading branch information
RubenVerborgh authored and joachimvh committed Nov 25, 2020
1 parent 4a7ea4a commit 9b70068
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 14 deletions.
1 change: 1 addition & 0 deletions config/config-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/presets/ldp/permissions-extractor.json",
"files-scs:config/presets/ldp/response-writer.json",
"files-scs:config/presets/ldp/request-parser.json",
"files-scs:config/presets/ldp/websockets.json",
"files-scs:config/presets/logging.json",
"files-scs:config/presets/representation-conversion.json",
"files-scs:config/presets/setup.json",
Expand Down
1 change: 1 addition & 0 deletions config/config-file.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/presets/ldp/permissions-extractor.json",
"files-scs:config/presets/ldp/response-writer.json",
"files-scs:config/presets/ldp/request-parser.json",
"files-scs:config/presets/ldp/websockets.json",
"files-scs:config/presets/logging.json",
"files-scs:config/presets/representation-conversion.json",
"files-scs:config/presets/setup.json",
Expand Down
1 change: 1 addition & 0 deletions config/config-path-routing.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/presets/ldp/permissions-extractor.json",
"files-scs:config/presets/ldp/response-writer.json",
"files-scs:config/presets/ldp/request-parser.json",
"files-scs:config/presets/ldp/websockets.json",
"files-scs:config/presets/logging.json",
"files-scs:config/presets/representation-conversion.json",
"files-scs:config/presets/setup.json",
Expand Down
1 change: 1 addition & 0 deletions config/config-rdf-to-sparql-endpoint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/presets/ldp/permissions-extractor.json",
"files-scs:config/presets/ldp/response-writer.json",
"files-scs:config/presets/ldp/request-parser.json",
"files-scs:config/presets/ldp/websockets.json",
"files-scs:config/presets/logging.json",
"files-scs:config/presets/representation-conversion.json",
"files-scs:config/presets/setup.json",
Expand Down
1 change: 1 addition & 0 deletions config/config-sparql-endpoint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/presets/ldp/permissions-extractor.json",
"files-scs:config/presets/ldp/response-writer.json",
"files-scs:config/presets/ldp/request-parser.json",
"files-scs:config/presets/ldp/websockets.json",
"files-scs:config/presets/logging.json",
"files-scs:config/presets/representation-conversion.json",
"files-scs:config/presets/setup.json",
Expand Down
2 changes: 1 addition & 1 deletion config/presets/acl.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@id": "urn:solid-server:default:AclManager"
},
"WebAclAuthorizer:_resourceStore": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
}
]
Expand Down
10 changes: 10 additions & 0 deletions config/presets/http.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
"@graph": [
{
"@id": "urn:solid-server:default:ServerFactory",
"@type": "WebSocketServerFactory",
"WebSocketServerFactory:_baseServerFactory": {
"@id": "urn:solid-server:default:ExpressHttpServerFactory"
},
"WebSocketServerFactory:_webSocketHandler": {
"@id": "urn:solid-server:default:WebSocketHandler"
}
},
{
"@id": "urn:solid-server:default:ExpressHttpServerFactory",
"@type": "ExpressHttpServerFactory",
"ExpressHttpServerFactory:_handler": {
"@id": "urn:solid-server:default:HttpHandler"
Expand Down
12 changes: 6 additions & 6 deletions config/presets/ldp/operation-handler.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@
{
"@type": "DeleteOperationHandler",
"DeleteOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
},
{
"@type": "GetOperationHandler",
"GetOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
},
{
"@type": "HeadOperationHandler",
"HeadOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
},
{
"@type": "PatchOperationHandler",
"PatchOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
},
{
"@type": "PostOperationHandler",
"PostOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
},
{
"@type": "PutOperationHandler",
"PutOperationHandler:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
}
}
]
Expand Down
6 changes: 6 additions & 0 deletions config/presets/ldp/response-writer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"LinkRelMetadataWriter:_headerMap_value": "type"
}
]
},
{
"@type": "WebSocketMetadataWriter",
"WebSocketMetadataWriter:_settings_port": {
"@id": "urn:solid-server:default:variable:port"
}
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions config/presets/ldp/websockets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
"@graph": [
{
"@id": "urn:solid-server:default:WebSocketHandler",
"@type": "UnsecureWebSocketsProtocol",
"UnsecureWebSocketsProtocol:_source": {
"@id": "urn:solid-server:default:ResourceStore"
}
}
]
}
2 changes: 1 addition & 1 deletion config/presets/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@id": "urn:solid-server:default:ServerFactory"
},
"Setup:_store": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
"@id": "urn:solid-server:default:ResourceStore"
},
"Setup:_aclManager": {
"@id": "urn:solid-server:default:AclManager"
Expand Down
21 changes: 15 additions & 6 deletions config/presets/storage-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
"@graph": [
{
"@id": "urn:solid-server:default:ResourceLocker",
"@type": "WrappedExpiringResourceLocker",
"WrappedExpiringResourceLocker:_locker": {
"@type": "SingleThreadedResourceLocker"
},
"WrappedExpiringResourceLocker:_expiration": 3000
"@id": "urn:solid-server:default:ResourceStore",
"@type": "MonitoringStore",
"MonitoringStore:_source": {
"@id": "urn:solid-server:default:ResourceStore_Patching"
}
},

{
Expand All @@ -28,6 +27,16 @@
}
},

{
"@id": "urn:solid-server:default:ResourceLocker",
"@type": "WrappedExpiringResourceLocker",
"WrappedExpiringResourceLocker:_locker": {
"@type": "SingleThreadedResourceLocker"
},
"WrappedExpiringResourceLocker:_expiration": 3000
},


{
"@id": "urn:solid-server:default:ResourceStore_ToTurtle",
"@type": "RepresentationConvertingStore",
Expand Down

0 comments on commit 9b70068

Please sign in to comment.