Discussing how exceptions can be handled in a centralized spot and how to return consistent responses. Exception logging is also centralized in the same approach.



Discussing a GitHub starter project to build a web API using Partitioned Repository Pattern with Azure Cosmos DB, ASP.NET Core, and Clean Architecture.

Clean Architecture — Onion View (From Microsoft documentation)
  • Clean Architecture (Onion Architecture)
  • ASP.NET Core 3.1
  • Azure Cosmos DB .NET SDK V3
  • Repository Design Pattern
  • Partition Key and Partitioned Repository
  • Cosmos DB database initial creation and data seeding
  • Query data using Parameterized Query, LINQ and IQueryable, Specification Pattern in Cosmos DB
  • REST API with OData support and Swagger UI
  • MediatR Command/Query pattern
  • MediatR pipeline behaviour for exception handling
  • FluentValidation for validation

How to build an ASP.NET Core API endpoint for time series anomaly detection, particularly spike detection, using ML.NET to identify interesting intraday stock price points.

Spikes identified by Anomaly Detection Model (Image by Author)


What is Anomaly Detection?

How to deploy a trained sentiment analysis machine learning model to a REST API using Microsoft ML.NET and ASP.NET Core, in just 15 mins.

Photo by Robert Zunikoff

Why fast integration?

Discussing how to scale the barebones TinyURL system using Load Balancer and Database Horizontal Partitioning, and related topics like partition key design strategy, partition vs replica vs backup, SQL vs NoSQL.

Image credit to Jason Chen

Discuss how to choose and design a database for telemetry data sent from IoT devices in a smart home.

Smart Home System using Azure Cosmos DB and IoT Hub


  • smart thermostat sending telemetry data on room temperature…

Discuss how to design and complete long-running tasks outside of HTTP requests in RESP API, as recommended by Microsoft on ASP.NET Core Performance Best Practices.

Photo credit to Mike van den Bos on unsplash.com


Discuss how to add a message producer to a distributed messaging system using REST API with ASP.NET Core and publish messages to the message broker using RabbitMQ.

What Will Be Built (System Diagram by Author)



Get Redis, SQL Server, MongoDB, and more up and running in docker in 15 mins!

Image credit to Frank Mckenna from unsplash.com


  • Have you installed a full SQL Server on your dev machine? Yes, I have.
  • Have you installed Redis on your dev machine? Yes, I have.
  • Have you installed all the other databases that you temporarily need on your dev machine? Yes, I have….
  • Do you need them all running in the background on your dev machine, eating all the CPU and Memory, until the world ends? No, I do not…

Discuss how to quickly setup a distributed messaging system, including consumers and RabbitMQ with Docker in ASP.NET Core, hopefully, in less than an hour.

What Will Be Built (System Diagram by Author)


Shawn Shi

Software Engineer, Machine Learning Engineer. When I am not dived into data and code, I am hanging out with my young daughter or outside rock climbing!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store