Skip to content

Instantly share code, notes, and snippets.

View dcomartin's full-sized avatar

Derek Comartin dcomartin

View GitHub Profile

System Architecture Course

This course provides a structured approach for designing and implementing large systems that are scalable and highly available.

The challenges designing and building large systems are in how they are decomposed and communicate with each other. You will learn how to define boundaries based on business capabilities and implement asynchronous messaging for communication.

This course will show architectural patterns and styles that create a system that is resilient when failures occur. And when load and traffic increases are scalable horizontally on-demand as required.

I've developed this course based on my over two decades of experience designing and developing business systems in distribution, transportation, manufacturing, and accounting.

public class PlaceOrderHandler : RequestHandler<PlaceOrder>
{
private readonly IAmACommandProcessor _commandProcessor;
public PlaceOrderHandler(IAmACommandProcessor commandProcessor)
{
_commandProcessor = commandProcessor;
}
[UsePolicy(CommandProcessor.RETRYPOLICY, 3)]
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSales();
services.AddShipping();
services
.AddLogging(builder =>
{
public class OrdersController : Controller
{
private readonly IAmACommandProcessor _commandProcessor;
public OrdersController(IAmACommandProcessor commandProcessor)
{
_commandProcessor = commandProcessor;
}
[HttpPost("/sales/orders/{orderId:Guid}")]
public class OrdersController : Controller
{
private readonly IAmACommandProcessor _commandProcessor;
public OrdersController(IAmACommandProcessor commandProcessor)
{
_commandProcessor = commandProcessor;
}
[HttpPost("/sales/orders/{orderId:Guid}")]
public class DemoBehavior : IPipelineBehavior<PlaceOrder, Unit>
{
private readonly ILogger<DemoBehavior> _logger;
public DemoBehavior(ILogger<DemoBehavior> logger)
{
_logger = logger;
}
public async Task<Unit> Handle(PlaceOrder request, CancellationToken cancellationToken, RequestHandlerDelegate<Unit> next)
using System;
using System.Security.Claims;
using System.Threading;
using System.Threading.Tasks;
using DotNetCore.CAP;
using MediatR;
using MediatR.Pipeline;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace Sales.Contracts
{
public class OrderPlaced
{
public Guid OrderId { get; set; }
public Address ShippingAddress { get; set; }
}
public class Address
{
namespace Sales.Contracts
{
public class OrderPlaced
{
public Guid OrderId { get; set; }
}
}
using Unity;
using Unity.Lifetime;
namespace UnityFactory
{
class Program
{
static void Main(string[] args)
{
var container = new UnityContainer();