Streaming in .NET 4.5

Streaming provides an efficient way to process data in chunks instead of loading bulk data into an application's memory space. It's almost inevitable that you will need to use streaming in your applications. However, what many developers miss is that there are different pieces to the .NET streaming architecture puzzle. This course will explain this architecture including backing store streams, decorator streams, and stream adapters.
Course info
Rating
(278)
Level
Intermediate
Updated
Aug 22, 2014
Duration
3h 54m
Table of contents
Introduction
.NET Streaming Architecture
Working With FileStream
Restricted File Access With IsolatedStorageFileStream
Interprocess Communication Using PipeStream
MemoryStream and Memory-Mapped Files
Web and Network Streams
Decorator Streams
Stream Adapters
Asynchronous Support
Description
Course info
Rating
(278)
Level
Intermediate
Updated
Aug 22, 2014
Duration
3h 54m
Description

It's almost inevitable that you will need to use streaming in your applications. Yet streaming is one of the most often misunderstood topics. This misunderstanding is the result of the fact that there are multiple elements into the streaming architecture. This course we will cover many of these important elements. We start off with the overall architecture and the common features of all stream types. Then we will move into backing store streams, as well as explaining the different types of these streams. We will then cover another type of stream called decorator streams. Following that we will learn about stream adapters as the mechanism to work with high level data representation instead of bytes. Finally, we will cover how to take advantage of asynchronous operations in .NET streaming.

About the author
About the author

Mohamad is a solution architect and Azure MVP with expertise in enterprise architecture, integration, identity and access, cloud, IoT, and data analysis.

More from the author
Starting with Oracle Big Data
Beginner
3h 35m
Jul 3, 2018
Real World SOA: Design and Implementation
Intermediate
9h 21m
Aug 1, 2016
More courses by Mohamad Halabi
Section Introduction Transcripts
Section Introduction Transcripts

Introduction
Hi. This is Mohamad Halabi. Welcome to this course about Streaming Architecture in. NET Framework 4. 5. This module, introduces the content covered in this course.

.NET Streaming Architecture
In this module, I will talk about Streaming Architecture in the. NET Framework. I will explain the different components that play together in order to manipulate data as a stream. It's very important to fully understand the concepts in this module before we dive into the different stream types in the upcoming modules.

Working With FileStream
In this module, I will talk about FileStream. Using files to read and write data is one of the most common I/O operations, therefore FileStream is in turn one of the most used stream implementations. Because the FileStream uses the Windows File System as its backing store, its feature set is rich, and in this module we are going to cover these features.

Restricted File Access With IsolatedStorageFileStream
The IsolatedStorageFileStream, just like the FileStream, has the file system as its backing store. In fact, it's a specialized implementation, and inherits from FileStream. So what is an IsolatedStorageFileStream, and what is an isolated storage? Let's find out.

Interprocess Communication Using PipeStream
Pipes provide a mechanism for interprocess communication. Pipes use streams to handle this communication, and the specific stream implementation is a class called PipeStream. In this module, I will talk about pipes and PipeStream.

MemoryStream and Memory-Mapped Files
In this module, I will first talk about MemoryStream, which is one of the most used streams. I will then talk about Memory-Mapped Files, which actually are not stream types, but I chose to cover them because they provide alternative options to using FileStream and PipeStream, both which were discussed in previous modules.

Web and Network Streams
In this module, I will finish the discussion around backing store streams. So far you have learned about the various types of backing stores, and their corresponding backing store streams, so what about remote locations, such as a network, or a web server. Can these be suitable backing stores? And if so, what are the backing store streams that can be used to help us in reading and writing into these stores? In this module, you will learn about the network stream, which has network sockets as the backing store. You will also learn about the web streams, which are actually not a special type of a stream, but rather these are web classes that allows reading, and writing of data using the abstract stream class.

Decorator Streams
Having completed the biggest part of the course explaining backing store streams, in this module we shift our focus to decorator streams. Because they implement the Decorator pattern, decorator streams provide the ability to perform run-time functionalities over backing store streams, and because this functionality is added at run-time, this saves the developer from having to perform design time customizations. In this module, we'll learn about some of the most used decorator streams that ship with the. NET Framework.

Stream Adapters
So far, we have finished discussion around backing store streams, and decorator streams. However, both these types of streams work exclusively with the byte representation of data. While this might be sufficient in many scenarios, there are definitely scenarios where you want to work with the high-level data representation, such as strings, integers, XML, or even binary data. So, is this possible? This module about stream adapters will answer this question.

Asynchronous Support
Every stream operation you learned in this course followed the synchronous model. In certain scenarios, the synchronous model can actually be more appropriate. On other scenarios, however, asynchronous model can drastically increase the scalability of your applications. So what is the asynchronous model, and how to take advantage of this model in the context of stream operations, and when is this model most appropriate? This module will answer these questions.