Skip to content

Commit

Permalink
feat!: Drop the sample web-client temporarily (#368)
Browse files Browse the repository at this point in the history
as it's currently not working for at least two different reasons:

Commit(43afb6a): 'Implement JSON serialization on most built-in data types.',

which broke the JS parsing and updating of subscribed values.
And the other being

Commit(eab4caa): 'Rewrite the client to be async all the way through',

which indirectly halted subscriptions for servers implemented with this crate (#324).

Re-adding this sample would be highly appreciated.
If possible with tests, which might prevent its recurring decay.
  • Loading branch information
AiyionPrime authored Jul 31, 2024
1 parent a207174 commit cf2d1bd
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 2,570 deletions.
1,812 changes: 138 additions & 1,674 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ members = [
"samples/simple-server",
"samples/chess-server",
"samples/discovery-client",
"samples/web-client",
"samples/event-client",
"tools/certificate-creator"
]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,4 @@ The full list of samples:
4. [`chess-server`](samples/chess-server) - an OPC UA server that connects to a chess engine as its back end and updates variables representing the state of the game.
5. [`demo-server`](samples/demo-server) - an OPC UA server that is more complex than the simple server and can be used for compliance testing.
6. [`mqtt-client`](samples/mqtt-client) - an OPC UA client that subscribes to some values and publishes them to an MQTT broker.
7. [`web-client`](samples/web-client) - an OPC UA client that subscribes to some values and streams them over a websocket.
8. [`event-client`](samples/event-client) - an OPC UA client that will connect to a server and subscribe to alarms / events.
7. [`event-client`](samples/event-client) - an OPC UA client that will connect to a server and subscribe to alarms / events.
2 changes: 1 addition & 1 deletion docs/async_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The old client, by accident or on purpose, did not support pipelining requests,

The service traits are gone. They were entirely unused, except as a way to group services, and potentially as a way for users to have mocking? Keeping them would have been possible, but it would have required a higher MSRV.

Callbacks have changed slightly, mostly due to the way notifications are received. The subscription logic is similar, but the way `MonitoredItems` queued values seemed largely meaningless, as they were always immediately dequeued (or if they weren't that would be a user error?), it seemed like a feature that was mostly unhelpful. The connect/disconnect callbacks are also gone, though they could be reimplemented. It is possible to monitor the state of the session by watching the output of the event loop `poll` method, see the `web-client` sample for an example of how this could be done.
Callbacks have changed slightly, mostly due to the way notifications are received. The subscription logic is similar, but the way `MonitoredItems` queued values seemed largely meaningless, as they were always immediately dequeued (or if they weren't that would be a user error?), it seemed like a feature that was mostly unhelpful. The connect/disconnect callbacks are also gone, though they could be reimplemented. It is possible to monitor the state of the session by watching the output of the event loop `poll` method.

The client is no longer behind a lock. Any locking is internal, except for access to the subscription cache directly. This should be a strictly positive change for usability.

Expand Down
21 changes: 0 additions & 21 deletions samples/web-client/Cargo.toml

This file was deleted.

35 changes: 0 additions & 35 deletions samples/web-client/README.md

This file was deleted.

307 changes: 0 additions & 307 deletions samples/web-client/html/index.html

This file was deleted.

Loading

0 comments on commit cf2d1bd

Please sign in to comment.