Parallel Programming with C# and .NET Core
eBook - ePub

Parallel Programming with C# and .NET Core

Developing Multithreaded Applications Using C# and .NET Core 3.1 from Scratch

Rishabh Verma

Condividi libro
  1. English
  2. ePUB (disponibile sull'app)
  3. Disponibile su iOS e Android
eBook - ePub

Parallel Programming with C# and .NET Core

Developing Multithreaded Applications Using C# and .NET Core 3.1 from Scratch

Rishabh Verma

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Learn, understand, and code parallel programs with confidence using C# 8 and.NET Core 3.0 Key Features

  • Explore and work with the new features and enhancements in.NET Core 3.0 & C# 8
  • Understand the fundamentals of parallel programming
  • Learn various threading patterns and synchronization constructs
  • Build concurrent applications using C# and.Net Core 3.0 from the ground up
  • Understand the principles of unit testing and debugging in concurrent applications

  • Description
    Application development has evolved over the last decade, and with the advent of the latest technologies like Angular, React on client-side, and ASP.NET Core, Spring on the server-side, the consumer expectations have risen like never before. The primary objective of this book is to help readers understand the importance of asynchronous programming and various ways it can be achieved using.NET Core 3.1 and C# 8 to successfully build concurrent applications. Along the way reader will learn the fundamentals of threading, asynchronous programming, various asynchronous patterns, synchronisation constructs, unit testing parallel methods, debugging enterprise applications, and cool tips and tricks.
    There are samples based on practical examples that will help the reader effectively use parallel programming. By the end of this book, you will be equipped with all the knowledge needed to understand, code, and debug multithreaded, concurrent and parallel programs with confidence. What You Will Learn
  • Understand the internals of async/await.
  • Learn how to build applications using async/await.
  • Write unit tests for asynchronous methods.
  • Explore various debugging techniques for enterprise applications.

  • Who this book is for
    Beginners and intermediate developers who build enterprise applications using.NET Core platform and tools. Advanced users can also use this book for brushing up fundamentals and for learning debugging tools, techniques, tips, and tricks. Table of Contents
    1. Getting Started
    2. What's new in C# 8?
    3..NET Core 3.1
    4. Demystifying Threading
    5. Parallel Programming
    6. The Threading Patterns
    7. Synchronization Constructs
    8. Unit Testing Parallel and Asynchronous Programs
    9. Debugging and Troubleshooting ( Its spelling is incorrect in pdf)
    10. Tips and Tricks About the Authors
    Rishabh Verma is a Microsoft certified professional and works at Microsoft as a senior development consultant, helping the customers to design, develop, and deploy enterprise-level applications. An electronic engineer by education, he has 12+ years of hardcore development experience on the.NET technology stack. He is passionate about creating tools, Visual Studio extensions, and utilities to increase developer productivity. His interests are.NET Compiler Platform (Roslyn), Visual Studio Extensibility, code generation, and.NET Core. Neha Shrivastava is a Microsoft certified professional and works as a software engineer for the Cloud & AI group at Microsoft India Development Center. She has about 10 years' development experience and has expertise in the financial, healthcare, and e-commerce domains. Neha did her bachelor's in electronics engineering. Ravindra Akella works as a Senior Consultant at Microsoft with more than 13 years of software development experience. Specializing in.NET and web-related technologies, his current role involves end to end ownership of products right from architecture to delivery.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Parallel Programming with C# and .NET Core è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Parallel Programming with C# and .NET Core di Rishabh Verma in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Ciencia de la computación e Programación paralela. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2020
ISBN
9789389423327

CHAPTER 1

Getting Started

“The secret to getting ahead is getting started!”
- Anonymous
As the name of chapter states, we will set up the required tools and get started with our journey of parallel programming with .NET Core 3.1 and C# 8. There are essential framework and tools to be downloaded and installed to start our learning and practical implementation on .NET Core 3.1 using windows operating system. We will begin the journey with the installation of Visual Studio 2019 and the latest version of .NET Core 3.1. We will create our first .NET Core 3.1 application. Though .NET Core 3.1 is cross-platform, we will focus the discussion on Windows as that’s the most popular and widely used operating system platform on the planet. So, let’s get started.

Structure

We will cover the following topics:
  • Download essential tools for Windows
  • Installing Visual Studio 2019 with .NET Core 3.1
  • PerfMon
  • ProcMon
  • Proc exe
  • PerfView
  • JustDecompile
  • DebugDiag
  • WinDbg
  • Create your first .NET Core 3.1 application using Visual Studio 2019
  • Summary
  • Exercise

Objective

By the end of this chapter, the reader would:
  • Learn to download and install all the required tools for .NET Core 3.1 and C# 8
  • Create a “Hello World” application using .NET Core 3.1 template using Visual Studio 2019
  • Learn to set up the development, debugging, troubleshooting and monitoring tools

Download essential tools for Windows

In this section, we will discuss the prerequisites. To have a seamless experience in learning .NET Core 3.1, we need to download and install a few developer tools. Microsoft recommends the Visual Studio Integrated Development Environment (IDE) to develop programs for Android, iOS, Windows applications, mobile applications, web applications, websites, web services, and cloud.
Navigate to the URL https://visualstudio.microsoft.com/%20downloads/ in your preferred browser. Microsoft gives us options to select from 4 Visual Studio variations:
  • Community:Powerful IDE, free for students, open-source contributors, and individuals, open-source contributors, and individuals
  • Professional: Professional IDE best suited to small teams
  • Enterprise:Scalable, end-to-end solution for teams of any size
  • Code: The fast, free and open-source code editor that adapts to your needs
We can download one of these depending on our choice and description stated above. These descriptions are taken as-is from the download site. However, depending upon the selected option, you may or may not have features described in this book, like time travel debugging, and so on. For pure development purposes and following the code snippets and samples of this book, Visual Studio 2019 Community version would suffice. The great thing is that this version is free. However, if it is possible for the reader, I would recommend Visual Studio 2019 Enterprise as it has a great set of tools and features for developing an enterprise-grade application. The authors of this book use Visual Studio 2019 Enterprise for code development and demonstration of tools.
We can go through Release Notes of each of the variants available to us to know more about them. Every variant and its small description are available on the above site:
Figure 1.1: Download Visual Studio 2019
Visual Studio Code (VS Code): Apart from Community, Professional, and Enterprise variants of Visual Studio 2019, Microsoft provides a free open source code editor Visual Studio Code. It is a cross-platform code editor, and apart from Windows, VS code works with Linux and Mac OS. It’s a cross-platform editor that can be extended with extensions available based on our requirements, for example, C# extension. It includes provision for embedded Git control, debugging, syntax highlighting, snippets, intelligent code completion, extensions support, and code refactoring.
Note: Visual Studio Code, like notepad, is an editor, and Visual Studio is an IDE. So Visual Studio Code is very lightweight, fast, with great support for debugging and has embedded Git control. It is a file and folders-based editor and doesn’t need to know the project context, unlike an IDE. There is no File | New Project support in Visual Studio Code as we have in Visual Studio IDE. Instead, Visual Studio Code has a terminal, through which we can run .NET commands.
Apart from Visual Studio 2019, we are going to use few more tools in upcoming chapters like PerfMon for performance monitoring and troubleshooting, ProcMon tool for process monitoring, PerfView for performance analysis, and many more. We will see them in action in Chapter 9, Debugging and Troubleshooting.

Installing Visual Studio 2019 with .NET Core 3.1

For coding in Windows, as we discussed above, we can use:
  • Visual Studio 2019 IDE
  • Visual Studio Code editor
If we choose Visual Studio 2019, we just need to download Visual Studio 2019 version 16.4 or higher from https://visualstudio.microsoft.com/vs/. Visual Studio 2019 version 16.4 is the latest at the time of writing this chapter. It may change by the time; this book gets published. It comes with .NET Core 3.1 SDK and its project templates. So, we will be ready for development immediately after installing it.
Here I am installing Visual Studio Enterprise 2019. In workloads section, select .NET Core cross-platform development:
Figure 1.2: Select .NET Core cross-platform development workload
You can select additional workloads based on your needs. For this book, we need .NET Core cross-platform development, so we selected it and performed the installation. With this workload selected, the rest of the steps are straight forward, and the installation can be done without any issues.
Next, we will investigate other tools that we shall be using during this book. Let’s start with the tool that comes installed by default in Windows Enterprise or Pro version of the operating system.

Perfmon

  1. Perfmon, which is an acronym for performance monitoring, is the Windows reliability and performance monitoring tool. It helps us to troubleshoot the issues, including application level to the hardware level. To open perfmon, go to Run (press Windows key + R), type perfmon, and then click the OK button:
    Figure 1.3: Open perfmon through Run or by ...

Indice dei contenuti