Answers are grounded in this paper and cite their sources.
This paper presents a proof-of-concept framework for distributed transaction coordination in .NET microservices using source generation to address container startup performance challenges. Source generation is a .NET compiler feature that generates coordination code at build time, eliminating runtime reflection overhead. The research employs Roslyn incremental source generators to implement saga-based transaction coordination, where developers specify transactions declaratively through custom attributes. The experimental evaluation compares the prototype against NServiceBus and MassTransit using an e-commerce order processing workflow in containerized environments. Performance measurements utilize BenchmarkDotNet for microbenchmarking, K6 for load testing, and dotMemory Unit for memory profiling. The prototype demonstrates that this compile-time approach achieves 85 percent faster startup times and 18 percent throughput improvement compared to reflection-based frameworks. The declarative approach reduces implementation complexity by 65 percent while maintaining identical business logic. Results demonstrate 60 percent reduction in memory allocations per transaction compared to existing frameworks. Under controlled failure injection conditions using chaos engineering techniques, the prototype maintained performance advantages with effective saga compensation execution. While limited to basic scenarios, results demonstrate potential for addressing both performance overhead and code complexity in containerized deployments. The prototype implementation validates the feasibility of source generation for distributed transactions, providing a foundation for future development of production-ready frameworks. This research contributes initial evidence that modern .NET compilation features can address specific challenges in containerized microservices deployment.
No takes yet. Share an insight, caveat, or question.
Kiral et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: