Azure Building Messaging Endpoints in Azure: WebJobs Posts in this series: * Evaluating the Landscape * A Generic Host * Azure WebJobs * Azure Container Instances * Azure Functions * Azure Container Apps In the last post, I looked at creating a generic host endpoint that many of the deployed versions in Azure can share. By using a hosted service, we can then
Testing Integration Testing with xUnit A few years back, I had given up on xUnit in favor of Fixie because of the flexibility that Fixie provides. The xUnit project is highly opinionated, and geared strictly towards unit tests. It's great for that. A broader testing strategy includes much more than just unit tests.
AutoMapper AutoMapper LINQ Support Deep Dive My favorite feature of AutoMapper is its LINQ support. If you're using AutoMapper, and not using its queryable extensions, you're missing out! Normal AutoMapper usage is something like: var dest = _mapper.Map<Dest>(source); Which would be equivalent to: var dest = new Dest { Thing
AutoMapper AutoMapper 9.0 Released As with the other major releases of AutoMapper, this one introduces breaking API changes with relatively few other additions. The major breaking changes (see upgrade guide for details) include: * Removing the static API * Removing "dynamic" maps (automatically created maps) * Fix on IMappingAction to include a ResolutionContext parameter The
Messaging Immutability in Message Types In just about every custom I've worked with, eventually the topic of immutability in messages comes up. Messages are immutable in concept, that is, we shouldn't change them (except in the case of document messages). Since messages are generally immutable in concept, why not make them
Azure Building Messaging Endpoints in Azure: A Generic Host Posts in this series: * Evaluating the Landscape * A Generic Host * Azure WebJobs * Azure Container Instances * Azure Functions * Azure Container Apps In the last post, we looked at the many ways we can consume messages in Azure as a message endpoint. Unfortunately, there's not an easy answer. We don&
Microservices Message Naming Conventions One of the first design decisions teams starting with messaging are presented with are - what the heck do we name these things? When building out request/response types for typical API/web applications, I name the responses usually after the resource they represent, or the route, or controller/action.
Azure Building Messaging Endpoints in Azure - Evaluating the Landscape Posts in this series: * Evaluating the Landscape * A Generic Host * Azure WebJobs * Azure Container Instances * Azure Functions * Azure Container Apps When looking at moving traditional on-prem solutions to the cloud, I try as much as possible to avoid any kind of lift-and-shift strategy and instead leverage as many platform-as-a-service (PaaS)
Microservices Composite UIs for Microservices: Vertical Slice APIs This is a recent follow-up pattern to my series on Composite UIs in Microservices, which explores various strategies for composing at the edges. Other posts in this series: * A primer * Composition options * Client composition * Server composition * Data composition * Vertical Slice APIs When looking at a client-side composition, the next logical
MediatR MediatR 7.0.0 Released Release notes: * MediatR 7.0.0 * MediatR.Extensions.Microsoft.DependencyInjection 7.0.0 It's a major release bump because of a breaking change in the API of the post-processor. Enjoy!
AutoMapper AutoMapper 8.1.0 Released Today we released AutoMapper 8.1.0: * Upgrade Guide for 8.0 * Release Notes AutoMapper 8.1 adds a major new feature - attribute-based maps. Attribute maps let you easily declare maps on destination types when you have straightforward scenarios. Instead of: public class OrderProfile { public OrderProfile() { CreateMap<Order,
MediatR Sharing Context in MediatR Pipelines MediatR, a small library that implements the Mediator pattern, helps simplify scenarios when you want a simple in-memory request/response and notification implementation. Once you adopt its pattern, you'll often find many other related patterns start to show up - decorators, chains of responsibility, pattern matching, and more.
OSS The Curious Case of the JSON BOM Recently, I was testing some interop with Azure Service Bus, which has a rather useful feature when used with Azure Functions in that you can directly bind JSON to an custom type, to do something like: [FunctionName("SaySomething")] public static void Run([ServiceBusTrigger("Endpoints.SaySomething", Connection
AutoMapper AutoMapper's Design Philosophy While a lot of people use AutoMapper, and love it, I meet just as many people that hate it. When I hear their stories, it becomes clear to me that it's not that AutoMapper was "abused" per se, but that it was used without understanding why
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Conclusion Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion We started out with a common, but nearly always overlooked problem: how do we reliably coordinate activities between different transactional resources? The question we need to ask first is
AutoMapper AutoMapper Usage Guidelines Configuration √ DO initialize AutoMapper once with Mapper.Initialize at AppDomain startup in legacy ASP.NET AutoMapper's static initialization is designed to build configuration once, and cache it. √ DO use the AutoMapper.Extensions.Microsoft.DependencyInjection package in ASP.NET Core with services.AddAutoMapper(assembly[]) The extensions package will perform
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Relational Resources Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series So far in this series we've mainly concerned ourselves with a single resource that can't support distributed (or multi-entity) transactions.
AutoMapper AutoMapper 8.0.0 Released Today we released AutoMapper 8.0.0: * Upgrade Guide * Release Notes AutoMapper 8.0 brings some breaking API changes, meant to simplify our configuration options which have grown quite a bit over time and remove some confusion about what configuration options were effectively equivalent. The upgrade guide walks through the
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Sagas Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series So far in this series, we've looked at the ins and outs of moving beyond distributed transactions using persisted messages as a
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Dispatcher Failure Recovery Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series In the last post, we looked at how we can recover from exceptions from inside our code handling messages. We perform some action in
Architecture Life Beyond Distributed Transactions: An Apostate's Implementation - Failures and Retries Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series In the last post, we looked at an example of dispatching document messages to other documents using a central dispatcher. Our example worked well
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Dispatching Example Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series In the last post, we looked at refactoring our documents to use messaging to communicate changes. We're still missing something, however -
Microservices Life Beyond Distributed Transactions: An Apostate's Implementation - Document Example Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series In the last post, I walked through the "happy path" scenario of coordinated communication/activities between multiple resources that otherwise can'
Distributed Systems Life Beyond Distributed Transactions: An Apostate's Implementation - Document Coordination Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series Quick note - I've updated this post to use the more accurate term "Document" than the less-accurate, DDD-specific term "
Distributed Systems Life Beyond Distributed Transactions: An Apostate's Implementation - A Primer Posts in this series: * A Primer * Document Coordination * Document Example * Dispatching Example * Failures and Retries * Failure Recovery * Sagas * Relational Resources * Conclusion Sample code from this series For those working with SQL databases, working with transactions is more or less a given. The most we may need to worry about is: