473,383 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

WebServices based file transfer - not efficient?

Hi

I have theoretical problem. In my web service project there was a need
to implement file download/upload using WS. I have created UploadChunk
and DownloadChunk methods which transfer files in chunks - consecutive
web method calls. The problem is, that when i am testing this approach
it seems that the transfer time ( many file sizes ) takes twice long,
comparing to when the transfer is stream based using regular
HttpWebRequest/response.

I'd like to ask you, if this is good practice to use stream based
approach in web services? If so, how should they be implemented?

Kind Regards
PK
Jun 27 '08 #1
6 2382
That should be fine - however! Are you using MTOM? Both WSE3 and WCF
(basicHttpBinding) support MTOM; otherwise the data has to be base-64
encoded, which adds 1/3 to the size. WCF can also only do full
streaming if using transport security (message security requires the
full message before it can verify) - there is a streaming mode for
this.

Marc
Jun 27 '08 #2
Piotrekk wrote:
I have theoretical problem. In my web service project there was a need
to implement file download/upload using WS. I have created UploadChunk
and DownloadChunk methods which transfer files in chunks - consecutive
web method calls. The problem is, that when i am testing this approach
it seems that the transfer time ( many file sizes ) takes twice long,
comparing to when the transfer is stream based using regular
HttpWebRequest/response.

I'd like to ask you, if this is good practice to use stream based
approach in web services? If so, how should they be implemented?
I think it is a bad idea to use web services for file download/upload
no matter how.

Web services are for passing method calls (RPC style) or structured
information (document style).

A file is just byte[] data.

Or to put it another way: the web service does not provide any
functionality not present in standard HTTP.

So use plain HTTP (standard ASP.NET upload or download script).

It is just as portable as a web service call. Actually more.

Arne
Jun 27 '08 #3
I am not using MTOM - i have never tried that. I think that I'll try
to use streaming for transfers.
Thank you guys.

PK
Jun 27 '08 #4
Arne - everything you say is true; and this remains valid as long as
the web-service is simple; however, if you need to use a consistent
approach (security, logging, exception-handling, etc), then using the
same web-service to handle binary *is* a valid choice, as long as it
is handled correctly (chunking, and using MTOM). Additionally, the
fact remains that WCF can be used to provide a DI/IoC architecture
(useful for mocking etc), so can be a useful approach - and MTOM
minimised the overhead.

Marc
Jun 27 '08 #5
Marc Gravell wrote:
Arne - everything you say is true; and this remains valid as long as
the web-service is simple; however, if you need to use a consistent
approach (security, logging, exception-handling, etc), then using the
same web-service to handle binary *is* a valid choice, as long as it
is handled correctly (chunking, and using MTOM). Additionally, the
fact remains that WCF can be used to provide a DI/IoC architecture
(useful for mocking etc), so can be a useful approach - and MTOM
minimised the overhead.
A normal HTTP download/upload script can certainly implement
security, logging, exception-handling, etc..

I know there are cases where BLOB's in web services make
sense.

But I still believe that for the specific purpose of file
download/upload, then plain HTTP is sufficient.

I must admit that I know too little about WCF to
comment on its DI capabilities. I do know that WCF
supports pure binary protocols.

Arne

Jun 27 '08 #6
A normal HTTP download/upload script can certainly implement
security, logging, exception-handling, etc..
Yes; I meant where it has to implement the *same* security; for
example claims-based on cardspace (or whatever).

Re DI - simply that WCF is interface based (rather than pure proxy-
based), which makes it easy to implement a factory / DI approach.

Marc
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Glauco | last post by:
hi to all, i'm planning to make a way to transfer file with python. I would like to make the transfer using some crypto api, to make the channel secure. i don't want to write a wrapper to ftp or...
3
by: Papanii | last post by:
Hi Guys, I am a newbie to the whole dot net framework and need a few pointers. I want to create an file transfer program (i.e form PC to PC) but i don't know where to start. Can anyone point me...
2
by: Satish | last post by:
Hello...plz provide sample code on heo top transfer multiple files over a Local network VIA TCP/IP in .net
0
by: Eric | last post by:
hi, I'am writing an instant messager that needs file transfer function. I have made it with command protocol-based( e.g. such as ftp : 220... ) it can works as begin sending initial command like...
1
by: Andrew Robert | last post by:
Hi everyone, Has anyone developed a pymqi module based file transfer method for use with WebSphere MQSeries v5.3? If so, would it be possible to point me towards examples of how this was...
2
by: Bonzol | last post by:
vb.net 2003 Windows application We have a Client/Server system set up by communicating through a TCPClient object. The server loops continuously using a tcplistener device and each time a client...
2
by: Slug | last post by:
Hi guys, Just wondering if any of you out there who have real-world experience with restartable (if transfer interuppted) internet-based file transfer solutions would mind posting your comments,...
10
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an...
7
by: shadowman | last post by:
Hello all: I have a web app that creates an image of a graph (as a png), based on user input of a combination of drop-down box items. I'm trying to add a function that allows the user to save...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.