ebook img

Microservices: Flexible Software Architecture PDF

432 Pages·2016·16.33 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Microservices: Flexible Software Architecture

ptg18144917 Microservices ptg18144917 This page intentionally left blank ptg18144917 Microservices Flexible Software Architecture ptg18144917 Eberhard Wolff Boston • Columbus • Indianapolis • New York • San Francisco Amsterdam • Cape Town • Dubai • London • Madrid • Milan Munich • Paris • Montreal • Toronto • Delhi • Mexico City São Paulo • Sydney • Hong Kong • Seoul • Singapore • Taipei • Tokyo Many of the designations used by manufacturers and sellers to distinguish their Editor-in-Chief products are claimed as trademarks. Where those designations appear in this book, Mark Taub and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Acquisitions Editor Chris Guzikowski The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors Development Editor or omissions. No liability is assumed for incidental or consequential damages in Chris Zahn connection with or arising out of the use of the information or programs contained herein. Managing Editor For information about buying this title in bulk quantities, or for special sales Sandra Schroeder opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding Project Editor interests), please contact our corporate sales department at corpsales@pearsoned. Lori Lyons com or (800) 382-3419. Production Manager For government sales inquiries, please contact [email protected].  Dhayanidhi For questions about sales outside the United States, please contact [email protected]. Copy Editor Visit us on the Web: informit.com/aw Warren Hapke Library of Congress Control Number: 2016952028 Indexer Copyright © 2017 Pearson Education, Inc. Erika Millen ptg18144917 All rights reserved. Printed in the United States of America. This publication is Proofreader protected by copyright, and permission must be obtained from the publisher prior Sudhakaran to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. Editorial Assistant For information regarding permissions, request forms and the appropriate contacts Olivia Basegio within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/. Cover Designer Chuti Prasertsith ISBN-13: 978-0-134-60241-7 ISBN-10: 0-134-60241-2 Compositor codeMantra Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana. First printing: October 2016 To my family and friends for their support. And to the computing community for all the fun it has provided to me. ptg18144917 This page intentionally left blank ptg18144917 Contents at a Glance Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Part I: Motivation and Basics . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1: Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Microservice Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Part II: Microservices: What, Why, and Why Not? . . . . . . . . 25 Chapter 3: What Are Microservices? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Chapter 4: Reasons for Using Microservices . . . . . . . . . . . . . . . . . . . . . . . 55 Chapter 5: Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ptg18144917 Chapter 6: Microservices and SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Part III: Implementing Microservices . . . . . . . . . . . . . . . . . . 95 Chapter 7: Architecture of Microservice-Based Systems . . . . . . . . . . . . . . . 99 Chapter 8: Integration and Communication . . . . . . . . . . . . . . . . . . . . . . 163 Chapter 9: Architecture of Individual Microservices . . . . . . . . . . . . . . . . 193 Chapter 10: Testing Microservices and Microservice-Based Systems . . . . 213 Chapter 11: Operations and Continuous Delivery of Microservices . . . . . 237 Chapter 12: Organizational Effects of a Microservices-Based Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Part IV: Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Chapter 13: Example of a Microservices-Based Architecture . . . . . . . . . . 303 Chapter 14: Technologies for Nanoservices . . . . . . . . . . . . . . . . . . . . . . . 343 Chapter 15: Getting Started with Microservices . . . . . . . . . . . . . . . . . . . . 369 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 vii This page intentionally left blank ptg18144917 Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii Part I: Motivation and Basics . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1: Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Overview of Microservice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Microservice: Preliminary Definition . . . . . . . . . . . . . . . . . . . . . 3 Deployment Monoliths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Why Microservices? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Strong Modularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 ptg18144917 Easy Replaceability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Sustainable Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Further Development of Legacy Applications . . . . . . . . . . . . . . 6 Time-to-Market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Independent Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Free Choice of Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Continuous Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 2: Microservice Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1 Modernizing an E-Commerce Legacy Application . . . . . . . . . . . . 11 Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Reasons to Use Microservices . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Slow Continuous Delivery Pipeline . . . . . . . . . . . . . . . . . . . . . . 12 Parallel Work Is Complicated . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Bottleneck During Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 ix

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.