You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Michael Jumper (JIRA)" <ji...@apache.org> on 2017/10/23 06:16:03 UTC

[jira] [Commented] (GUACAMOLE-331) Extremely slow download/upload over http tunnel

    [ https://issues.apache.org/jira/browse/GUACAMOLE-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214700#comment-16214700 ] 

Michael Jumper commented on GUACAMOLE-331:
------------------------------------------

So, this is unlikely to be an issue with the HTTP tunnel, as the effective bandwidth of file transfers mitigated by JavaScript is inherently limited, but rather due to the lack of a common API-level implementation of the file transfer mechanism used by the Guacamole webapp. The Guacamole webapp is not actually handling file transfer in the same way that you are in this case.

The reason the Guacamole webapp's file transfers are so much faster is that it implements a REST service which allows the client to request the file stream to be intercepted. A special object on the server then selectively grabs the {{blob}} instructions for that stream, decodes them, and allows the resulting stream to be read via normal HTTP. Since this stream can be downloaded using browser-native mechanisms (rather than being assembled client-side, block-by-block, in memory), the transfer is about as fast as things can get.

The way this stream intercepting works is non-trivial, and doesn't lend itself well to being part of the common API. It may be possible, but at the moment I'm not sure how it could be done in a way which is independent of the web application being built.

> Extremely slow download/upload over http tunnel
> -----------------------------------------------
>
>                 Key: GUACAMOLE-331
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-331
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-common
>    Affects Versions: 0.9.12-incubating
>         Environment: Ubuntu 16.04 Tomcat (custom guacamole client), Fedora 25 (guacd instances in lxd containers)
>            Reporter: Josef Krahujec
>            Priority: Minor
>
> Downloading/uploading files over http tunnel is extremely slow (200 kB/s maximum), even though we are present in local network. Tested with both the custom and official clients pointing at the same guacd instance (container).Here is source code for downloading files:
> {code:JavaScript}
> $(".management table").on("click", ".fs-file", function(){
> 	var that = this;
> 	var filename = $(".management tbody").children().eq(that.rowIndex - 1).find(".name").html();
> 	var requestFile = $("#path").html() + filename;
> 	if ($.inArray(requestFile, window.downloading) != -1)
> 		return false;
> 	$(".management tbody").children().eq(that.rowIndex - 1).children().eq(1).addClass("downloading");
> 	window.downloading.push(requestFile);
> 	window.fs.obj.requestInputStream(requestFile, function(stream, mimetype){
> 		stream.sendAck("Ready", Guacamole.Status.Code.SUCCESS);
> 		var reader = new Guacamole.BlobReader(stream, mimetype);
> 		removeSearch();
> 		reader.onend = function(){
> 			var blob = reader.getBlob();
> 			blobDownload(blob, filename, requestFile);
> 		}
> 	});
> });
> {code}
> We have also tried the official guacamole client, however there appeared to be no such problem.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)