Hands-On Microservices with C# 8 and .NET Core 3
Third Edition
Refactor you monolith architecture into microservices using Azure
Gaurav Aroraa
Ed Price
BIRMINGHAM - MUMBAI
Hands-On Microservices with C# 8 and.NET Core 3Third Edition
Copyright 2020 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Richa Tripathi
Acquisition Editor: Denim Pinto
Content Development Editor: Tiksha Abhimanyu Lad
Senior Editor: Afshaan Khan
Technical Editor: Romy Dias
Copy Editor: Safis Editing
Project Coordinator: Francy Puthiry
Proofreader: Safis Editing
Indexer: Priyanka Dhadke
Production Designer: Nilesh Mohite
First published: June 2017
Second edition: December 2017
Third edition: March 2020
Production reference: 1260320
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78961-794-8
www.packt.com
To my younger sister, Preeti, who always inspires me with her positive attitude toward life.
I have learned a lot from her on how to be positive in life: how to achieve your goals in life
even when there are obstacles preventing you from reaching them.
Gaurav Aroraa
Packt.com
Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Fully searchable for easy access to vital information
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Foreword
Microservices is more than just a buzzword. They represent a fresh new way of thinking about systems architecture that builds upon the designs and layering of the last two decades, combined with the real-world experiences of building large scalable systems at a size we once thought impossible.
We've all learned about three-tiered architecture: we design our systems with the single responsibility principle, and we have tried different ways to scale and deploy our systems. Microservices combines the best of all these worlds. It aims to build systems that separate responsibility appropriately; that manage, version, and deploy services individually; and that elastically scale, backed by the power of the cloud.
This new generation of cloud-native applications needed a new way of thinking about architecture. Gaurav and Ed have put together a journey that walks you through the process of creating effective microservices, using C# 8 and the new open source, cross-platform .NET Core.
The book covers everything that you'll need, from architecture, an introduction to containers, and how services communicate, to the concepts behind a service mesh. Everything is backed by practical examples in real-world use cases, including IoT.
I'm thrilled that you're coming along this journey with us, and I'm excited to see what you'll be able to build with this new knowledge.
Scott Hanselman
Partner Program Manager
.NET Open Source
Contributors
About the authors
Gaurav Aroraa is a serial entrepreneur and start-up mentor. He has done an M.Phil in computer science. He is a Microsoft MVP award recipient. He is a lifetime member of the Computer Society of India (CSI), is an advisory member and senior mentor at IndiaMentor, is certified as a Scrum trainer/coach, is ITIL-F certified, and is PRINCE-F and PRINCE-P certified. He is an open source developer and a contributor to the Microsoft TechNet community. Recently, Gaurav was awarded "Icon of the year excellence in Mentoring Technology Startups" for 2018-19 by Radio City, a Jagran initiative, for his extraordinary work during his 22-year career in the industry in the field of technology mentoring.
In life, it's hard to understand things when you don't find support. My family is one such support system and I am the luckiest to have them. I would like to thank my wife, Shuby Aroraa, and my little angel, Aarchi Arora, who gave me permission to write and invest time in this book.
A special thanks to the Packt team (especially Tiksha, Afshaan, and Richa) and Andreas Helland. Also, a big thanks to Ed Price (my coauthor) and Scott Hanselman.
Ed Price is a senior program manager in engineering at Microsoft, with an MBA in technology management. He has run Microsoft customer feedback programs for Azure Development, Service Fabric, IoT, and Visual Studio. He was also a technical writer at Microsoft for 6 years, helped to lead TechNet Wiki, and now leads efforts to publish key guidance from AzureCAT (Customer Advisory Team), especially in the development of microservices. He is the coauthor of Learn to Program with Small Basic.
About the reviewer
Andreas Helland has a degree in software engineering and over 20 years of experience in building products and services. He has worked both with the development side and the infrastructure side and holds a number of Microsoft certifications across various skill sets. This also led him to become an early adopter of Azure. After building up his knowledge working in the telecommunications industry, he switched to consulting, and currently works as an architect for Capgemini where he assists customers on how to utilize the cloud in the best ways possible. He specializes in Azure Active Directory and works closely with the Identity teams at Microsoft, both in testing new services and providing feedback based on learnings from the field.
Next page