Skip to content

Details

SPEAKER & TALK

You Should Probably Be Using IAsyncEnumerable
Aaron Stannard (CEO & Founder, Petabridge)

A job has been running for twenty minutes. Is it working, or is it dead?

You can't tell. Not from the outside.

Task⟨T⟩ has three states: pending, completed, faulted. "Alive and making progress" and "stuck forever and never coming back" are the same one. That isn't an observability gap you can instrument your way out of. It's how Task is designed.

What we need is a better primitive for modeling longer running background jobs, intermittent jobs, and producer-consumer relationships. Enter IAsyncEnumerable, which allows us to model these tasks as asynchronous streaming jobs.

IAsyncEnumerable⟨T⟩ isn't a sequence you await. It's a producer / consumer contract - you know it's alive when new events arrive during the progression of the job, rather than at its completion.

In this talk we'll look at several examples of .NET code where IAsyncEnumerable is crucial to ensure the success of the application:

  • AI agent that runs two timers over its own token stream, so it can distinguish "nothing arrived, it's dead" scenarios from "heartbeats arriving, zero real output, it's alive and stuck."
  • A 20-minute re-embedding job that streams progress over ASP.NET Core SSE, where a late subscriber's first element is the current state.
  • And an e-commerce checkout page that used to poll for proof of fulfillment / payment activity, that now instead waits for events via SSE to drive navigation and behavior from the back-end.

In this talk you'll learn about how and where to apply IAsyncEnumerable to solve your problems.

SCHEDULE

5:30pm - Arrival/Registration + Food/Drinks + Networking

6:00pm - Speaker/Presentation

7:15pm - Food/Drinks + Networking

8:00pm - End

FOOD/DRINKS

Food and drinks will be provided! Please contact us if you have any dietary restrictions/food allergies.

DIRECTIONS AND PARKING INSTRUCTIONS

Meeting will be held at Beach Walk Coworking, 96 Beach Walk Blvd, Conroe, TX 77304 in the ground floor meeting room.

Free parking is available on site.

P.S. We're looking for speakers!

Do you have insights, projects, or expertise you'd like to share with the NHDNUG community? Whether you're an experienced speaker or presenting for the first time, we'd love to feature you in one of our upcoming meetups!

If you're interested in speaking at one of our upcoming meetups (held the 3rd Thursday of each month), email us at hi@petabridge.com to discuss your topic ideas, or complete this form: https://forms.gle/aVzeVpvVhAkdfWLy7

Thank you!

Related topics

Sponsors

Petabridge

Petabridge

Food and office space.

You may also like