none
What does mean WCF Streaming RRS feed

  • Question

  • i am curious to know what is Streaming concept ?

    suppose i have a wcf service which has one function and function accept employee id. when client will call that function and pass employee id then function will return a specific employee data. so sending employee data back to client will be consider as streaming ?

    or streaming is totally different concept ? please tell me few example which will be consider as streaming in wcf ?

    just notice a url https://www.codeproject.com/articles/166763/wcf-streaming-upload-download-files-over-http

    the above url is talking about uploading and downloading file by wcf service and they are saying think kind of job is streaming.........why ?

    why uploading and downloading file should be consider as streaming ?

    please share knowledge about streaming. thanks

    Sunday, December 25, 2016 5:52 PM

Answers

  • Hi Mou_inn,

    There are two modes for transferring messages:

    • Buffered transfers hold the entire message in      a memory buffer until the transfer is complete. A buffered message must be      completely delivered before a receiver can read it.
    • Streamed transfers expose the message as a      stream. The receiver starts processing the message before it is completely      delivered.

    When you have a large amount of data to transfer, the streaming transfer mode in WCF is a feasible alternative to the default behavior of buffering and processing messages in memory in their entirety.

    If you only return one specific employee, there is no need to use streaming transfer. If you return large data like more than one million, streaming transfer is more suitable. It depends on the message size you communicate between client and server.

    # Streaming Data

    https://msdn.microsoft.com/en-us/library/ms733742(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Sudip_inn Monday, December 26, 2016 8:39 PM
    Monday, December 26, 2016 2:10 AM

All replies

  • Hi Mou_inn,

    There are two modes for transferring messages:

    • Buffered transfers hold the entire message in      a memory buffer until the transfer is complete. A buffered message must be      completely delivered before a receiver can read it.
    • Streamed transfers expose the message as a      stream. The receiver starts processing the message before it is completely      delivered.

    When you have a large amount of data to transfer, the streaming transfer mode in WCF is a feasible alternative to the default behavior of buffering and processing messages in memory in their entirety.

    If you only return one specific employee, there is no need to use streaming transfer. If you return large data like more than one million, streaming transfer is more suitable. It depends on the message size you communicate between client and server.

    # Streaming Data

    https://msdn.microsoft.com/en-us/library/ms733742(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Sudip_inn Monday, December 26, 2016 8:39 PM
    Monday, December 26, 2016 2:10 AM
  • looking for good example like how to use streaming in wcf when i have to transfer large employee data to client. please post some relevant links. thanks
    Monday, December 26, 2016 8:40 PM
  • Hi Mou_inn,

    You could set the Binding's TransferMode property to the Streamed value and work with your WCF services as you would do. The WCF infrastructure will do all the job automatically.

    Reference: How do I use streaming with WCF services returning a large data set?

    You could refer the link below for Enable Streaming.

    # How to: Enable Streaming

    https://msdn.microsoft.com/en-us/library/ms789010(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 27, 2016 3:24 AM