|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
The best way to transfer large data to server?Hi,
I am developing a windows forms client application using C# that will need to transfer a large dataset with data to the server. What is the best method to do that? I have read an article that recommended transferring using chunks and WSE3 at http://www.codeproject.com/soap/MTOMWebServices.asp but I prefer not to use files to transfer data. I there any way to do that with memory so there is no files involved at the client side and at the server side? Thanks for any help, Asaf Hello Asaf,
MTOM relates to the transfer data with SOAP. If you are working in the local environment it's not necessary to use it. The problem with datasets is that they are serialized in XML, that leads to the swelling data. You can keep your data in ArrayList, and see if this appropriate for you, includins size of data. If it's not, then use data compression (btw, .net 2.0 can serialize dataset in binary) - see samples of using compression dataset (using GZIP) on the www.codeproject.com A> I am developing a windows forms client application using C# that will A> need to transfer a large dataset with data to the server. A> A> What is the best method to do that? A> I have read an article that recommended transferring using chunks and A> WSE3 A> at http://www.codeproject.com/soap/MTOMWebServices.asp but I prefer A> not to A> use files to transfer data. A> I there any way to do that with memory so there is no files involved A> at the A> client side and at the server side? A> Thanks for any help, A> Asaf --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche Hello Michael,
Thanks for the info I didn’t even new that there are compression classes in ..NET 2.0 Using "DeflateStream" I am able to compress my DataSet to a "MemoryStream" instead of using a physical compressed files. The question is, how can I transfer the compressed data to my web server using WSE3 over SOAP with chunks and using only memory at the server side? Regards, Asaf Show quote "Michael Nemtsev" wrote: > Hello Asaf, > > MTOM relates to the transfer data with SOAP. > If you are working in the local environment it's not necessary to use it. > The problem with datasets is that they are serialized in XML, that leads > to the swelling data. > You can keep your data in ArrayList, and see if this appropriate for you, > includins size of data. > If it's not, then use data compression (btw, .net 2.0 can serialize dataset > in binary) - see samples of using > compression dataset (using GZIP) on the www.codeproject.com > > > A> I am developing a windows forms client application using C# that will > A> need to transfer a large dataset with data to the server. > A> > A> What is the best method to do that? > A> I have read an article that recommended transferring using chunks and > A> WSE3 > A> at http://www.codeproject.com/soap/MTOMWebServices.asp but I prefer > A> not to > A> use files to transfer data. > A> I there any way to do that with memory so there is no files involved > A> at the > A> client side and at the server side? > A> Thanks for any help, > A> Asaf > --- > WBR, > Michael Nemtsev :: blog: http://spaces.msn.com/laflour > > "At times one remains faithful to a cause only because its opponents do not > cease to be insipid." (c) Friedrich Nietzsche > > > Hi Asaf,
Not sure what's the "files" you mentioned here. "but I prefer not to use files to transfer data." As for MTOM, it is just a binary data encoding pattern which can help effeciently compressed and embed binary data in XML webservice soap message. And it won't matter whether your data is comming from a file or just a binary data block. You can just define your webmethod's parameter or return value as byte[] and configure your client/server WSE 3.0 enabled application to send or recieve data encoded through MTOM: #How to: Send and Receive Large Amounts of Data to and from a Web Service http://msdn.microsoft.com/library/en-us/wse3.0/html/b4b19453-e4e4-4056-906d- 72504ed8c0df.asp?frame=true Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Hi Steven,
Thanks for your help :) Regards, Asaf Show quote "Steven Cheng[MSFT]" wrote: > Hi Asaf, > > Not sure what's the "files" you mentioned here. > > "but I prefer not to use files to transfer data." > > As for MTOM, it is just a binary data encoding pattern which can help > effeciently compressed and embed binary data in XML webservice soap > message. And it won't matter whether your data is comming from a file or > just a binary data block. You can just define your webmethod's parameter or > return value as byte[] and configure your client/server WSE 3.0 enabled > application to send or recieve data encoded through MTOM: > > #How to: Send and Receive Large Amounts of Data to and from a Web Service > http://msdn.microsoft.com/library/en-us/wse3.0/html/b4b19453-e4e4-4056-906d- > 72504ed8c0df.asp?frame=true > > Regards, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > You're welcome Asaf,
Regards, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) I guess it depends on how large the data. IIRC, MTOM still requires the
*whole message to be loaded (at the client receive side) in memory before you can process it and you can not chunk receives at the client . It also adds ~33% to the size because of the base64 encoding. So in this regard, it really is not much different then base64 encoding a byte[] and sending a very large string in the reply yourself. I would welcome correction if my understanding is not right. If files are really large, the OP may be better off chunking them manually or using Sockets. -- Show quoteWilliam Stacey [MVP] "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message http://msdn.microsoft.com/library/en-us/wse3.0/html/b4b19453-e4e4-4056-906d-news:T6hSmKfNGHA.2336@TK2MSFTNGXA01.phx.gbl... | Hi Asaf, | | Not sure what's the "files" you mentioned here. | | "but I prefer not to use files to transfer data." | | As for MTOM, it is just a binary data encoding pattern which can help | effeciently compressed and embed binary data in XML webservice soap | message. And it won't matter whether your data is comming from a file or | just a binary data block. You can just define your webmethod's parameter or | return value as byte[] and configure your client/server WSE 3.0 enabled | application to send or recieve data encoded through MTOM: | | #How to: Send and Receive Large Amounts of Data to and from a Web Service | Show quote | 72504ed8c0df.asp?frame=true | | Regards, | | Steven Cheng | Microsoft Online Support | | Get Secure! www.microsoft.com/security | (This posting is provided "AS IS", with no warranties, and confers no | rights.) | |
|||||||||||||||||||||||