Design, debug, test, observe, secure, and deploy
Fiodar Sazanavets

#AI
#MCP
#SignalR
#ChatGPT
#AI_agent
🌐 ساخت Distributed Applicationهایی که واقعاً کار میکنن
🚀 کتاب Building Distributed Applications that Work یک راهنمای عملی برای طراحی، توسعه و استقرار سیستمهای Distributed با استفاده از الگوهای معماری استاندارد صنعته. در این مسیر یاد میگیری مشکلاتی مثل شکست ارتباط میان سرویسها، وابستگیهای پیچیده Startup، دادههای تشخیصی پراکنده و Deploymentهای دشوار را با .NET Aspire مدیریت کنی.
✨ ویژگیهای کلیدی
🧩 Microserviceها را با رویکرد Code-First و امکانات Orchestration در .NET Aspire مدیریت میکنی.
🔍 با OpenTelemetry، Distributed Tracing، Structured Logging، Metricها و ابزارهای Observability کار میکنی.
🔐 ارتباط میان سرویسها را با Keycloak، OIDC و انتقال JWT Token ایمن میکنی.
☸️ Workflowهای Containerized را روی Kubernetes و Azure مستقر میکنی.
🤖 مدلهای زبانی محلی و AI Agentهای مستقل و Tool-Calling را با Ollama، MCP و اکوسیستم Aspire میسازی.
📘 توضیح کتاب
🌐 تقسیم یک سیستم به سرویسهای مستقل و متصل از طریق شبکه، مزایای زیادی داره؛ اما طراحی، استقرار و نگهداری چنین معماریهایی ساده نیست. شکست ارتباطات، ترتیب پیچیده راهاندازی سرویسها، Dependencyهای متعدد و پراکندگی Logها و اطلاعات تشخیصی میتونن توسعه و عیبیابی سیستم را دشوار کنن.
🛠️ فیودار سازاناوتس در این کتاب از Architectural Patternهای آماده استفاده در صنعت کمک میگیره تا این مشکلات را بهشکل عملی مدیریت کنی. کتاب برای Developerها و افرادی نوشته شده که فرصت زیادی برای مباحث غیرضروری ندارن و میخوان مستقیماً سراغ تکنیکهایی برن که در پروژههای واقعی به اونها نیاز پیدا میکنن.
⚡ رویکرد کتاب از همون ابتدا عملیه و ابزارها و تکنیکهای لازم را در اختیارت میذاره تا تا پایان فصل اول، یک پروژه واقعی را اجرا کرده باشی. مثالهای کتاب با .NET Aspire پیادهسازی شدن، اما هر مفهوم به شکلی گسترش داده میشه که بتونی اون را در Framework موردنظر خودت هم بازسازی و استفاده کنی.
🛒 مسیر آموزشی حول یک اپلیکیشن E-Commerce واقعگرایانه شکل گرفته و مفاهیم ضروری Cloud-Native را مرحلهبهمرحله آموزش میده. بهجای مطالعه Code Snippetهای جدا از هم یا Configurationهای ساده و انتزاعی، تکامل یک سیستم واقعی را دنبال میکنی.
🧭 در ابتدا، Local Orchestration و Service Discovery را یاد میگیری تا مرزهای روشن و منظمی میان سرویسها ایجاد کنی. این بخش پایهای برای مدیریت ارتباط، Dependency و Startup سرویسهای مختلف در یک Distributed Application فراهم میکنه.
💾 در ادامه، State سیستم را به Relational Databaseها، Document Storeها و Blob Storageهای Cloud-Native منتقل میکنی. Externalize کردن State باعث میشه سیستم Resilientتر و Scalableتر بشه و بتونه تغییرات و رشد واقعی پروژه را بهتر مدیریت کنه.
📡 با بزرگتر شدن سیستم، عناصر بیشتری از اکوسیستم Aspire اضافه میشن. Interactive Tracking با SignalR یکی از این قابلیتهاست که امکان نمایش و انتقال اطلاعات بلادرنگ را در اپلیکیشن فراهم میکنه.
🤖 کتاب Local AI را هم وارد پروژه میکنه. یاد میگیری با Ollama مدلهای زبانی را بهصورت محلی Host کنی و AI Agentهای مستقلی بسازی که میتونن ابزارها را فراخوانی کنن. MCP و Agentها هم در فصل دهم بررسی میشن تا سیستم برای نسل بعدی Enterprise Workloadها آماده باشه.
📨 شکست کنترلشده و Graceful Failure یکی از نیازهای اصلی سیستمهای Distributed است. به همین دلیل، کتاب Asynchronous Message Queueها، Distributed Locking و End-to-End Token Security را بررسی میکنه تا سرویسها در شرایط خطا رفتار قابلکنترلتری داشته باشن.
🔎 Visibility برای سیستمهای Distributed حتی در اپلیکیشنهای ساده ضروریه. با پیکربندی OpenTelemetry، ساخت Integration Testهای قدرتمند و بررسی Logها، Traceها و Metricها، یاد میگیری رفتار سرویسها را از ابتدا تا انتهای درخواست مشاهده و مشکلات را دقیقتر پیدا کنی.
🛡️ برای امنیت Microserviceها، Keycloak، OIDC و JWT Token Propagation وارد پروژه میشن. این بخش نشان میده هویت و Tokenها چطور باید با امنیت مناسب میان سرویسها منتقل بشن تا ارتباطات داخلی سیستم هم قابلاعتماد باقی بمونن.
🚀 در مراحل پایانی، Workflowهای Containerized را روی Kubernetes و Azure مستقر میکنی. این مسیر، توسعه محلی، Testing، Observability، Security و Deployment را در یک جریان منسجم کنار هم قرار میده.
🎯 در پایان، میتونی Distributed Applicationهایی بسازی که در برابر خطا مقاوم، قابلگسترش، امن، Observable و آماده Production باشن. هرچند مثالها از .NET Aspire استفاده میکنن، مفاهیم و Patternهای کتاب را میشه در Frameworkها و پلتفرمهای دیگه هم به کار گرفت.
🎯 چیزهایی که یاد میگیری
🧩 یاد میگیری Microserviceها را با رویکرد Code-First مدیریت و Orchestrate کنی.
🧭 میتونی Local Orchestration، Service Discovery و مرزهای میان سرویسها را پیادهسازی کنی.
💾 یاد میگیری State را به Relational Database، Document Store و Cloud-Native Blob منتقل کنی.
📡 میتونی قابلیتهای بلادرنگ و Interactive Tracking را با SignalR بسازی.
🤖 یاد میگیری مدلهای زبانی محلی را با Ollama اجرا کنی و Agentهای Tool-Calling بسازی.
🔗 با MCP و استفاده از Agentها در Distributed Applicationها آشنا میشی.
📨 میتونی Asynchronous Message Queue و Distributed Locking را در سیستم پیادهسازی کنی.
🔍 یاد میگیری با OpenTelemetry، Distributed Tracing، Structured Logging و Metricها، Observability کاملی ایجاد کنی.
🧪 میتونی Integration Testهای قابلاعتمادی برای سرویسها و ارتباطات میان اونها بسازی.
🔐 یاد میگیری Microserviceها را با Keycloak، OIDC و JWT Token Propagation ایمن کنی.
☸️ میتونی Workflowهای Containerized را روی Kubernetes و Azure مستقر کنی.
📖 فهرست مطالب
بخش اول. از صفر تا اجرا: مبانی Aspire
فصل ۱. شروع کار با سیستمهای Distributed و Aspire
فصل ۲. مدیریت اجزای زیرساخت با Containerها و Integrationها
فصل ۳. استفاده از اجزای Database و Storage
بخش دوم. قابلیتهای بلادرنگ و AI: ساخت اپلیکیشنهای تعاملی
فصل ۴. افزودن قابلیت رهگیری سفارش با SignalR
فصل ۵. ساخت یک نسخه مشابه ChatGPT با Aspire، Ollama و Semantic Kernel
بخش سوم. اپلیکیشنهای Aspire در سطح حرفهای
فصل ۶. Integration Testing و Monitoring
فصل ۷. اجزای Messaging و Caching
فصل ۸. امنیت اپلیکیشن در Aspire
بخش چهارم. استقرار، ارتقا و پذیرش سیستمهای Legacy
فصل ۹. استقرار اپلیکیشنهای Aspire در محیط Production
فصل ۱۰. افزودن اپلیکیشنهای Legacy به Aspire و کار با AI Agentها
📝 نقد و بررسی
💭 «این کتاب تجربه Developer را به مشکلات واقعی Distributed Applicationها متصل میکنه؛ مشکلاتی مثل Configuration، Dependency، Debugging، Testing و Deployment.»
— اسکات هنسلمن، Microsoft
💭 «مثالهای کتاب کاملاً آیندهنگرانه و بسیار واقعگرایانه هستن. خیلی خوشم اومد که MCP و Agentها در فصل دهم بررسی شدن!»
— راب روتش، Little Bird GmbH
💭 «حتی برای اپلیکیشنهای ساده هم مشاهده Logها، Traceها و Metricها ضروریه و این کتاب مقدمه بسیار خوبی برای Observability ارائه میده!»
— دیوید سلن، Sweet Systems
👤 این کتاب برای چه کسانیه؟
👨💻 این کتاب برای Software Engineerهای سطح میانی طراحی شده که میخوان الگوهای عملی ساخت و نگهداری Distributed Applicationهای واقعی را یاد بگیرن.
🏗️ Software Architectها میتونن از مطالب کتاب برای طراحی سیستمهای Resilient، Scalable، Secure و Observable استفاده کنن.
⚙️ DevOps Professionalهایی که مسئول Testing، Monitoring، Containerization و Deployment سیستمهای Distributed روی Kubernetes و Azure هستن هم مخاطب این کتاب محسوب میشن.
👤 درباره نویسنده
👨💻 فیودار سازاناوتس، Senior Software Engineer، مشاور مستقل و نویسندهای متخصص در سیستمهای Distributed بزرگمقیاس و Data-Intensive است که با .NET و Azure ساخته میشن.
🏢 او پیشتر در Microsoft فعالیت کرده و چندین کتاب فنی و دوره آموزشی درباره .NET، Cloud Architecture و Software Engineering نوشته است.
🏅 فیودار همچنین Microsoft MVP در حوزه Developer Technologies است.
"Connects the developer experience to the real problems of distributed applications: configuration, dependencies, debugging, testing, and deployment.”
—Scott Hanselman, Microsoft
Systems that are split into independent, network-connected services, whatever their benefits, can be difficult to design, deploy, and maintain. In Building Distributed Applications that Work, author Fiodar Sazanavets shows you how to conquer the inevitable communication failures, complex startup dependencies, and fragmented diagnostic data using industry-grade architectural patterns. Written for busy builders and software shippers, this book sticks to the techniques you’ll actually need—all demonstrated with examples using the .NET Aspire framework. Practical from the very start, this book gives you the tools and techniques to have a real project up and running by the end of the first chapter!
Building Distributed Applications that Work introduces a realistic e-commerce application that provides a clear, step-by-step progression through essential cloud-native concepts. You’ll start by mastering local orchestration and service discovery to establish clean service boundaries. Then, you’ll make your system resilient and scalable by externalizing state into relational databases, document stores, and cloud-native blobs. This hands-on journey helps you learn how to handle real-world system evolution cleanly rather than studying isolated code snippets or simplified, abstract configurations.
As your distributed system grows, you’ll add other elements from the Aspire ecosystem, including interactive SignalR tracking and local AI capabilities. Reviewer Rob Ruetsch of Little Bird GmbH praised the “forward-leaning” examples, commenting, “Very realistic. I love that MCP and agents were discussed in chapter 10!” You will host local language models using Ollama and build autonomous, tool-calling AI agents. This modern approach to intelligent systems ensures you can safely build smart, responsive applications that are fully prepared for next-generation enterprise workloads.
Because graceful failure is mandatory for distributed systems, you’ll explore asynchronous message queues, distributed locking, and end-to-end token security. Reviewer David Sellen of Sweet Systems pointed out that “even for simple applications, visibility into logs, traces, and metrics is essential, and this book is a great introduction to observability!” By learning to construct robust integration tests, configure Open-Telemetry, and secure microservices via OIDC and JWT token propagation, you ensure your applications are resilient, highly observable, and production-ready. As you build your distributed application in Aspire, author Fiodar Sazanavets carefully expands each concept so you can reproduce it in your framework of choice.
What's inside
• Code-first microservices orchestration
• OpenTelemetry distributed tracing and structured logging
• Securing cross-service communications with Keycloak, OIDC, and JWTs
• Deploying containerized workflows to Kubernetes and Azure
• Examples use the .NET Aspire framework
Table of Contents
Part 1. From Zero to Running: Aspire Fundamentals
1. Getting started with distributed systems and Aspire
2. Managing infrastructure components with containers and integrations
3. Using database and storage components
Part 2. Real-Time Features and AI: Making Apps Interactive
4. Adding order-tracking functionality with SignalR
5. Building a ChatGPT clone with Aspire, Ollama, and Semantic Kernel
Part 3. Professional-Grade Aspire Applications
6. Integration testing and monitoring
7. Components for messaging and caching
8. Application security in Aspire
Part 4. Deployment, Upgrades, and Legacy Adoption
9. Deploying Aspire apps to production
10. Adding legacy apps to Aspire and working with AI agents
Appendix. Setting up the development environment
About the Reader
This book is designed for mid-career software engineers, architects, and DevOps professionals seeking hands-on patterns to build, observe, and deploy resilient distributed systems.
About the Author
Fiodar Sazanavets is a senior software engineer, independent consultant, and author specializing in large-scale, data-intensive distributed systems built with .NET and Azure. He previously worked at Microsoft and has written several technical books and training courses on .NET, cloud architecture, and software engineering. He is a Microsoft MVP in Developer Technologies.









