Carl Franklin

.NET Wonk

Web Service File Transfer Protocol - a good start

Announcing WSFile, the beginnings of a new protocol to send files and other large amounts of data over web service.

WSFile is a data transfer protocol that allows you asynchronously stream large amounts of data from a system.io.stream to a web server via a web service. The zip includes a web service project, a client-side component project that implements the protocol, and a windows forms client that demonstrates the protocol. It lets you upload a file to a web server asynchronously, updating a progress bar after each "chunk" has been sent. It also lets you pause and resume. Any stream can be used as the source data.

Source is in VB 2005

You can get it here: http://training.franklins.net/dotnet.aspx

Comments?

Comments

Addy Santo said:

PLEASE tell me that this is either DIME or MTOM based... the last thing we need is Yet Another Binary-Over-WS protocol which nobody supports.
# January 30, 2006 1:37 AM

Carl Franklin said:

Nope. This started as a demo I did for a student this week who wanted to see a complete asynchronous process with large sets of data. I've never even heard of MTOM. I have heard of DIME, though. Just never used it.

By the way, it's not a binary over WS protocol. It's all standard WS stuff.

Googling MTOM...
# January 30, 2006 1:45 AM

Jim McCusker said:

Carl,

I loaded the project in VS 2005 and got the following error when I tried to open the WSFileClient.vb file in the WSFileComponents project:

Could not load type 'System.CodeDom.Compiler.GeneratedCodeAttribute' from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Note: I created a web server of port 4347 and set the directory to the WSFileService, but that isn't helping.

Ideas?
# January 30, 2006 8:59 AM

Dave P. said:

Damn, Carl, WTF were you thinking? Kidding.

These are new to me too. I found what has to be the first informative thread ever on 24/7. It's a good discussion of DIME, MTOM, WSE, etc., and it's here (and in the link on my name):

http://www.winfx247.com/247reference/msgs/0/1206.aspx

Remoting would be another (& more efficient) approach, allowing for binary formatting, but I'm assuming you opted for WS for platform interoperability.


# January 30, 2006 10:16 AM

Chris Kinsman said:

DIME and MTOM have their own issues mainly that if you don't want the stream loaded into memory on the server side you have to make sure the stream is the only part of the message and you are using WCF so you can go into non-buffered streaming mode.

There is a need for a chunking protocol. I have written several already myself and they all are slightly different.

I don't think I would call it WSFile though. A lot of the large data that needs to be chunked isn't necessarily a file.
# January 30, 2006 12:53 PM

Simon Fell said:

HTTP already has a chunking protocol. What's this do that a bog standard HTTP PUT won't ?
# January 30, 2006 4:20 PM

Carl Franklin said:

> I don't think I would call it WSFile though.
good point. I only thought about the WS-* thing after it was written.

What I like about this approach is that it is easy. One webmethod to init, and one to accept a chunk.

> What's this do that a bog standard HTTP PUT won't ?

Control of both sides. Notification at each chunk. Easy to implement.
# January 30, 2006 5:01 PM

Oran said:

I think Clemens beat you to the punch:

http://friends.newtelligence.net/clemensv/PermaLink,guid,8fc367b2-a4be-4588-8264-5455c268b94a.aspx

and

http://newtellivision.tv/default.aspx#a1fcfa0d9-4398-4dca-bf82-6b7e476756d0

However, a transport-agnostic "WS-ReliableStreaming" would be very nice to have. Not only could you guarantee delivery of part of a stream (aka message), but you could interrupt a stream with a higher priority stream if necessary without having to retransmit the entire lower priority stream/message. This is especially handy if you have multiple durable intermediaries routing large messages/streams around, and the last hop is especially slow or lossy. But good luck getting a standards body to bless something like this any time soon...
# February 2, 2006 1:40 AM

Oran said:

After further reading around, it appears Yasser Shohoud has an implementation that's closer to what you're trying to accomplish:

http://blogs.msdn.com/yassers/archive/2006/01/21/515887.aspx
# February 10, 2006 5:14 PM

reema said:

hi guys;

i am a new user for web services so i wanna from u to help me to use WS file project and then run it please

# June 18, 2007 6:54 AM

Sudhi said:

Hey..

Needed to ask whether the FTP Services are already been implemented Using the web services in Java? I couldn't find much info about the same in the internet? Just wanted to know what are the procedures i need to follow in order to write one by myself in JAVA.Is there any standardized FTP Service which exist as on today?

Please pass in your comments....

# September 4, 2007 6:26 PM

Mark said:

People, Please don't reinvent the TCP + HTTP.

Use a separate connection with HTTP POST.

(For .NET, solution for uploading on the server seems to be NeatUpload).

# October 24, 2007 7:46 AM

cash advance said:

Hello!!! weblogs.asp.net is one of the most outstanding informational websites of its kind. I take advantage of reading it every day. I will be back.

# December 13, 2009 7:37 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)