Speaker

Stephen Cleary

Stephen Cleary

Christian, husband, father, developer

Traverse City, Michigan, United States

Actions

Stephen Cleary is a family man who feels like he does software development in his spare time. :)

He is a Microsoft MVP and the author of "Concurrency in C# Cookbook" (O'Reilly) on asynchronous and parallel programming, as well as several MSDN articles. He's the top async/await answerer on Stack Overflow, he's assisted hundreds of companies with async adoption across all kinds of applications, his blog has been the go-to source for async advice for years, he contributed some of the MS documentation on subjects such as ValueTask, and he's the maintainer of AsyncEx, a library with >25M downloads which provides asynchronous coordination primitives and other async helper types.

He published a .NET-oriented version of the classic TCP/IP FAQ on his blog almost 15 years ago, and has helped countless developers debug their application protocols. At his first job ever, he ended up fixing the primary protocol used in all their systems as well as implementing a TCP/IP replacement for an old serial protocol, and at another job he designed and implemented a multiplexed streaming protocol for embedded devices from scratch. More recently, he recorded a YouTube series where he live-coded a fully asynchronous chat-like TCP/IP protocol using modern .NET pipelines and channels.

Awards

Area of Expertise

  • Information & Communications Technology

Topics

  • .NET
  • C#.Net
  • Microsoft Azure
  • Concurrency
  • GPT
  • Machine Learning and Artificial Intelligence

A Concise History of .NET Asynchronous Component Design

.NET has supported asynchronous code in one form or another since the very beginning. This talk will walk through the various models of asynchronous programming, and how the design of async components has changed over the years.

Starting with the Asynchronous Programming Model (APM), you'll work your way through the Event-based Asynchronous Pattern (EAP), ending at the current Task-based Asynchronous Pattern (TAP). Along the way, you'll learn about older supporting types used for asynchronous code, such as ISynchronizeInvoke, SynchronizationContext, and AsyncOperation.

At the conclusion of this session, you'll be able to recognize the different patterns used by various asynchronous components, and have sufficient knowledge to interoperate any oudated components with a modern asynchronous codebase.

Async Streams

Asynchronous iteration landed in JavaScript last year, and C# is following up with its own async streams. This presentation looks at why these new asynchronous streams are useful, and how they are different from existing libraries like System.Reactive and RxJS.

We'll start with a conceptual overview of why asynchrony is important, and the impact that async/await has had on modern languages. Then we'll address one of the common shortcomings of async/await: the fact that it only deals with single values.

We'll briefly review library-based approaches for dealing with streams of asynchronous data, including the classic producer/consumer queues as well as the more modern reactive approaches. Finally, we'll address how true pull-based asynchronous streams require language constructs, and examine consuming and producing asynchronous streams in C#.

By the end of this session, you'll be equipped to handle asynchronous streams in your own projects.

Deploying a C# URL shortener for free using azd

Join me for demo-heavy tour of how to get started with the Azure Developer CLI (azd) and an exploration of (a small part of) what it can do. In my case, I had a small serverless C# Azure application that I wanted to deploy reliably, and azd was a perfect fit!

If you're like I was not long ago, you've probably heard of azd, but may not be entirely sure of what it entails or how cleanly it will deploy. Fear not; I'll show you everything I've learned! We'll start with a simplified project and explore what azd gives you and how it works under the hood (including how to clean up manually if you need to).

By the end of this talk, you'll have a good grasp of azd and how good of a fit it would be for your own personal or professional projects.

Background Services in .NET

Many applications have a need to do background work, whether that is sending emails, maintenance tasks, or periodic data imports/exports. In this session, we'll cover a few different approaches for background tasks for on-premises, VM, and native cloud deployments. This talk covers all kinds of background services, including queue-based and scheduled services, with an eye to supporting distributed deployments.

There is one specific scenario (adding background services to ASP.NET applications) where most developers make a very common mistake (in-memory queues), so we'll also cover how to properly architecture a solution for this scenario in detail.

You'll learn tips and tricks for running background processes as Win32 services, Linux systemd, and Docker containers. And you'll learn several "gotchas" present in the .NET Core BackgroundService class that make background services behave oddly by default.

You'll be left with actionable advice for how to architect and develop reliable, predictable background services!

Become a logging hero!

On-call alerts and user bug reports can be annoying, but they don't have to be! Imagine if your application was already instrumented with all the logging and tracing you need to easily track down issues... This talk has the capability of granting you Hero Status within your organization!

We'll cover the forms of modern telemetry for .NET applications. Starting with centralized semantic logging, we'll emphasize the secret sauce that will make your coworkers love you: semantic logging scopes! Once you see them in action, you'll never want to be without them!

Other forms of telemetry are also included. Leaning into the Open Telemetry standard, we'll cover how to add metric measurements and timings into your application with extremely low overhead.

We'll also cover techniques for distributed tracing, including the standard span-based approach as well as linking techniques for disassociated backend processors.

Throughout this talk, we'll cover common visualization tools that are compatible with your newly-instrumented applications. Azure Application Insights will be included, along with free OSS solutions.

By the end of this talk, you'll have concrete ideas to take back to your day job, earning you the respect and heartfelt thanks of anyone who has to track down issues in your website or client application!

DevContainers

An introduction, some exploration, and many experiments with DevContainers! You'll learn how this technology makes your development environment amazing. It's especially awesome when working on Windows and needing Linux utilities!

Atomic State: The Missing State Management System for .NET

Escape the "state spaghetti" trap of large client-side and mobile applications! Atomic state is the state management library that you've been needing.

This demo-heavy session will show you a new way of handling state in your application that is designed to be easy to use, stable, fast, and flexible. Once you start using atoms, you'll wonder how you lived without them!

Atomic state is open-source, but commercial use requires a paid license.

Brownfield Async Development

Writing asynchronous code is not too hard when backwards compatibility is not a concern. This session teaches you how to apply asynchronous code to an existing codebase, which brings its own unique challenges.

In this session, learn how to tell which operations are naturally asynchronous, and the best approaches for introducing async/await to a synchronous system. This talk will cover how to create a vertical partition of async code within an application, even if the existing app doesn't have the best design. We'll also cover a variety of approaches for mixing synchronous and asynchronous code, and discuss the advantages and drawbacks of each approach.

You'll walk away with an understanding of how to get async's foot in the door of your system, and how to expand it gradually through your codebase while keeping backwards compatibility throughout.

TCP/IP Protocol Design

This language-agnostic talk will examine the design of application protocols, with a focus on TCP/IP.

This talk is part history and part practical implementation. If you have a need to design a TCP/IP protocol, then this talk will cover everything you need. Most bugs in TCP/IP applications are actually misunderstandings about TCP/IP itself, so this talk highlights the parts of TCP/IP that are most problematic with practical advice about avoiding pitfalls with your application protocol.

We'll also be covering several mistakes from history as we go along, most specifically HTTP and the improvements it made with HTTP/1.1, HTTP/2, and the new HTTP/3 based on QUIC. Spoiler alert: QUIC is the future for almost all protocols; we'll cover how QUIC compares to TCP/IP specifically in terms of application protocol design. Today TCP/IP is more available (in terms of APIs), but QUIC is not that far off, and this talk will cover application protocol design considerations for both.

CosmosDb in the Real World

An exploration of CosmosDb combined with Azure Functions.
This session starts with an overview of these technologies and some basic instruction focusing on how to model data, choose partition keys, and use Azure Functions with the CosmosDb change feed to create secondary indexes and summary views, all guided by an overall goal of minimizing cost.
But this ain't no sales pitch; we'll approach these topics from a distinctly critical perspective. Marketing features aren't as important as how it actually behaves in the real world, so we'll focus on the hard parts: limitations of the change feed, handling error conditions in Azure Functions, using stored procedures when you need ACID updates, changing partition keys after deployment, and maintaining multiple change feeds. This is CosmosDb in the real world!

Avoiding common pitfalls with async/await

Did you know that most async/await mistakes are the result of misconceptions? Join this talk to discover how to detect common async/await mistakes, and how to fix them!

We'll be covering What You Need To Know about async/await in C#, including several different correct conceptual models of async/await that you can switch between at will. We will take a look at the common async pitfalls, best practices, and guidelines along with a careful examination of when to ignore the best practices. We'll be including some semi-advanced topics (specifically ValueTasks and Channels) to round out techniques for modern asynchronous development.

While this talk is geared towards developers who already use async and await, it would also be appropriate for those who do not (yet). Feel free to bring questions!

Async Masterclass

You've mastered async and await, but you find you need more powerful tools. This is how to build them.

Tired of reading articles about async that just don't go deep enough? Here you go. This is the async masterclass. There are no breakfast food analogies here. Except bacon, because bacon is awesome. Bacon.

Forget Task. We'll be learning ValueTask. And IAsyncDisposable. And AsyncLocal. Oh, and asynchronous queues - time to learn some Channels. Let's throw in asynchronous synchronization primitives. And I mean building those - seeing how they actually work - not just using them. This ain't your momma's SemaphoreSlim; it's time to build your *own* asynchronous "pause" primitive with TaskCompletionSource. Speaking of TCS, we'll also cover the dictionary completion technique. Let's build our own AsyncLazy, too. Maybe we'll even tackle asynchronous caching and the challenges that come with that (spoiler: we will).

It sounds like a random assortment of topics, but each of these skills are valuable as soon as you move from basic async/await into real-world complexity. By the end of this masterclass, you'll be equipped to take your async to the next level!

Mmm... bacon...

Write code to fix your code with C# Analyzers!

This talk is an intermediate-level walkthrough of writing analyzers and code fixes with Roslyn. Code fixes are a great way to perform code transformation to fix bugs, apply styles, or even update older code patterns to newer ones. Code analyzers are a useful tool to help you maintain multiple large code bases.

This talk introduces analyzers, and also goes beyond the basics into more complex subjects, including useful techniques for keeping track of syntax nodes, preserving trivia, pattern-matching code trees, transforming code trees with visitors, debugging and unit testing the code transformations themselves, and finally distributing your own company-specific code analyzers via NuGet.

By the end of this talk, you'll be empowered to develop your own custom analyzers, relieving the burden of code maintenance (at least a little bit)!

Focusing ChatGPT on Your Data

Learn how to implement ChatGPT on your own data, without needing to train language models or learn data science! This entire talk only uses Azure OpenAI APIs with .NET - there is no Python at all.

This talk starts with a review of ChatGPT, with a specific focus on the limitations and problems that we've all heard about. Then we examine, step by step, how to provide additional custom data to ChatGPT without requiring expensive retraining. The techniques provided in this talk allow your company to enhance and focus ChatGPT on your own data and requirements, providing a surprisingly good experience! We'll be using a mixture of both GPT and ChatGPT as well as a handful of supplemental technologies in the final solution.

By the end of this talk, you'll know how to build a complete ChatGPT-based solution that is focused on your own data, using only .NET, some inexpensive Azure APIs, and a few common services. This talk concludes with recommendations on how to move your solution into production, including the necessity of responsible AI development guidelines.

TechBash 2024 Sessionize Event

September 2024 Mount Pocono, Pennsylvania, United States

Michigan Technology Conference 2024 Sessionize Event

March 2024 Pontiac, Michigan, United States

CodeMash 2024 Sessionize Event

January 2024 Sandusky, Ohio, United States

Update Conference Prague 2023 Sessionize Event

November 2023 Prague, Czechia

Stephen Cleary

Christian, husband, father, developer

Traverse City, Michigan, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top