Commit Graph
20 Commits
Author SHA1 Message Date
Kenneth Skovhede fb08a0b174 Fixed an issue with retry downloads causing errors 2025-05-28 12:49:29 +02:00
Kenneth Skovhede c8b9fb5c73 Websocket subscriptions
This PR adds the ability to subscribe to messages over a websocket.

To prevent polling data, the server can now push messages through the websocket, so the client can instantly update when new data is available.

The change is backwards compatible, still serving the status updates over the socket. If the client is providing the authentication token, it is auto-subscried to the legacy status message.

If the client is using the new authentication message, it needs to subscribe to get the status updates (and any other services it needs).

The event system has been extended to support new, and more accurate, events. This is the first step towards removing the general status update and the long-poll mechanism.

This also re-introduces the blocking marker, so the client can know if the operation is halted due to too many pending transfers.

Some endpoints have been moved to service implementations, to allow serving the exact same data from both endpoints and websocket.

This PR also updates the way the progress is handled, so that all transfers are returned to the client, and the transfer speeds for each transfer is calculated based on a small sample buffer, so the values are more accurate even if the program is paused during transfers.
2025-05-27 12:13:07 +02:00
Kenneth Skovhede f393c00030 Fixed throttle support
This moves the throttle support to the StreamUtil throttled stream, which allows multiple streams to share a throttle value, such that the throttle setting is applied to the entire communication from Duplicati, and not for each connection.

This also cleans up a bit in the progress reporting, where the backend manager now keeps track of the "active" transfer and only emits progress on that. Once it finishes, a new transfer is promoted a "active".
2025-04-22 22:54:48 +02:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
drwtsn32x 667094c307 undo changes in pr 3847, implement better fix 2019-09-16 21:52:12 -07:00
drwtsn32x 91a1401e9f tweaks 2019-08-08 04:15:19 -07:00
drwtsn32x 16e8e0fcec Remove extra m_curfileoffset = 0, remove debug msgs 2019-08-08 04:13:49 -07:00
drwtsn32x 2b645959eb add debugging messages 2019-08-08 04:06:38 -07:00
drwtsn32x 17368652a1 Fix negative bytes to go issue 2019-08-02 19:52:22 -07:00
Sean Templeton ac08aa2fb1 Dynamically throttle and track the progress of concurrent uploads
Changed AddBackendEvent() in ResultClasses to allow the option to not update
the backend progress. This allows the  BackendUploader to log the act of starting
an upload without changing the backend progress. The backend progress is now
handled by a new class, FileProgressThrottler, which will determine the transfer
rate of all uploads currently in progress.

This class also handles throttling the upload streams. The algorithm will try
to decrease or increase the streams throttle rates as appropriate by changing
the value based on the over/under amount or based on a percentage to prevent
throttling one stream directly to zero.
2019-03-05 21:25:35 -06:00
Kenneth Hsu 7e6fa8a202 Convert write-only IMessageSink.OperationProgress property to method.
Write-only properties are confusing and the behavior is better
implemented as a method, which more clearly conveys the write-only
semantics.
2018-12-09 20:23:05 -08:00
Kenneth Hsu 1764b9ad4e Convert write-only IMessageSink.BackendProgress property to method.
Write-only properties are confusing and the behavior is better
implemented as a method, which more clearly conveys the write-only
semantics.
2018-12-09 20:23:05 -08:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede 11f7660939 Implemented logic to report if the backend is blocking the operation. 2017-09-04 12:15:47 +02:00
Kenneth Skovhede eef7281d10 Added a multi-target message sink helper 2017-04-06 10:09:37 +02:00
Kenneth Skovhede bbe543c5bd Added phase events and enumerated events instead of strings.
Tuned the output from the backup command.
2013-08-21 22:23:58 +02:00
Kenneth Skovhede 83439b5858 Bugfixing for the progress report 2013-08-20 22:52:32 +02:00
Kenneth Skovhede 25541d9d18 Implemented a new progress reporting system that relies polling for sending progress updates that occur with a high frequency. 2013-08-20 22:16:30 +02:00