locked
File Upload architecture. RRS feed

  • Question

  • Hi all

    i have a requirment to upload/download a file and save it to a DB up to sizes 2G and also save the some metadata(uploaded date, uploaded by ...etc), my architecture is as follow and each on its own physical box.

     ASP.Net <----> WCF<--->DB

    i have the following concerns

    1) uploading files of 2gb size into asp.net runtime and then again sending the 2g to wcf looks like a bad way of doing this( clogging up the network).

    2) i can directly SQL but this would be breaking my architecture.

    3) i can store the files in a folder and then the metadata in the sql  but by doing this i have to create a sync strategy and archiving ....etc 

    4) i cannot use wss for documents (the client is against it).

     

    What are my alternatives ????

     

    Thanks

    Nen

     

    can some one 

    Monday, June 14, 2010 8:01 AM

Answers

  • Greetings,

    There are 3 bindings  used for sending large data

    • Nettcpbinding
    • NetNamedPipeBinding 
    • Http binding.


    In order to be able to send large files as a stream to your service, you'll need to:

    • create a service method that accepts a Stream as its input parameter
    • create a binding configuration (on both the server and the client) which uses
    • transferMode=StreamedRequest
    • create a stream in your client and send it to the service method

    Then you need a binding configuration:

    <bindings>
      <basicHttpBinding>
        <binding name="FileUploadConfig"
                 transferMode="StreamedRequest" />
      </basicHttpBinding>
    </bindings>

    Some links are given below

    • http://blogs.msdn.com/b/yassers/archive/2006/01/21/515887.aspx
    • http://blogs.msdn.com/b/yassers/archive/2005/10/12/480175.aspx

    WCF Message Streaming
    • http://www.haveyougotwoods.com/archive/2008/04/14/wcf-message-streaming.aspx

    WCF And Large Messages

    • http://haveyougotwoods.com/archive/2008/03/29/wcf-and-large-messages.aspx

    WCF and large hierarchical data
    • http://bloggingabout.net/blogs/vagif/archive/2010/01/14/wcf-and-large-hierarchical-data.aspx



    What Is WCF-CHUNCKING?
    http://wcf-chuncking.sourceforge.net/
    It's a project that makes it easier to move lots of data in Windows CommunicationFoundation.

    Fundamental of Sending Large Data using WCF.

    Large Data and Streaming
    http://msdn.microsoft.com/en-us/library/ms733742.aspx

    How to: Enable Streaming
    http://msdn.microsoft.com/en-us/library/ms789010%28v=VS.100%29.aspx

    Hope this helps

    Take Care
    PL

    Helping People To Solve Technical Problems
    • Marked as answer by madhugilla Tuesday, June 15, 2010 12:33 PM
    Monday, June 14, 2010 3:27 PM

All replies

  • Greetings,

    There are 3 bindings  used for sending large data

    • Nettcpbinding
    • NetNamedPipeBinding 
    • Http binding.


    In order to be able to send large files as a stream to your service, you'll need to:

    • create a service method that accepts a Stream as its input parameter
    • create a binding configuration (on both the server and the client) which uses
    • transferMode=StreamedRequest
    • create a stream in your client and send it to the service method

    Then you need a binding configuration:

    <bindings>
      <basicHttpBinding>
        <binding name="FileUploadConfig"
                 transferMode="StreamedRequest" />
      </basicHttpBinding>
    </bindings>

    Some links are given below

    • http://blogs.msdn.com/b/yassers/archive/2006/01/21/515887.aspx
    • http://blogs.msdn.com/b/yassers/archive/2005/10/12/480175.aspx

    WCF Message Streaming
    • http://www.haveyougotwoods.com/archive/2008/04/14/wcf-message-streaming.aspx

    WCF And Large Messages

    • http://haveyougotwoods.com/archive/2008/03/29/wcf-and-large-messages.aspx

    WCF and large hierarchical data
    • http://bloggingabout.net/blogs/vagif/archive/2010/01/14/wcf-and-large-hierarchical-data.aspx



    What Is WCF-CHUNCKING?
    http://wcf-chuncking.sourceforge.net/
    It's a project that makes it easier to move lots of data in Windows CommunicationFoundation.

    Fundamental of Sending Large Data using WCF.

    Large Data and Streaming
    http://msdn.microsoft.com/en-us/library/ms733742.aspx

    How to: Enable Streaming
    http://msdn.microsoft.com/en-us/library/ms789010%28v=VS.100%29.aspx

    Hope this helps

    Take Care
    PL

    Helping People To Solve Technical Problems
    • Marked as answer by madhugilla Tuesday, June 15, 2010 12:33 PM
    Monday, June 14, 2010 3:27 PM
  • Greetings,

    Kindly create a DB layer for wcf  between the sql server and wcf layer.

     

    ASP.net <==> WCF <==> DB Layer <==> Database .

     

    Hope this helps.

     

    Take Care

    PL

     


    Helping People To Solve Technical Problems
    Tuesday, June 15, 2010 7:38 AM