万本电子书0元读

万本电子书0元读

顶部广告

Spring Microservices电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Rajesh RV

出  版  社:Packt Publishing

出版时间:2016-06-01

字       数:689.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build scalable microservices with Spring, Docker, and Mesos About This Book Learn how to efficiently build and implement microservices in Spring, and how to use Docker and Mesos to push the boundaries of what you thought possible Examine a number of real-world use cases and hands-on code examples. Distribute your microservices in a completely new way Who This Book Is For If you are a Spring developers and want to build cloud-ready, internet-scale applications to meet modern business demands, then this book is for you Developers will understand how to build simple Restful services and organically grow them to truly enterprise grade microservices ecosystems. What You Will Learn Get to know the microservices development lifecycle process See how to implement microservices governance Familiarize yourself with the microservices architecture and its benefits Use Spring Boot to develop microservices Find out how to avoid common pitfalls when developing microservices Be introduced to end-to-end microservices written in Spring Framework and Spring Boot In Detail The Spring Framework is an application framework and inversion of the control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions to build web applications on top of the Java EE platform. This book will help you implement the microservice architecture in Spring Framework, Spring Boot, and Spring Cloud. Written to the latest specifications of Spring, you'll be able to build modern, Internet-scale Java applications in no time. We would start off with the guidelines to implement responsive microservices at scale. We will then deep dive into Spring Boot, Spring Cloud, Docker, Mesos, and Marathon. Next you will understand how Spring Boot is used to deploy autonomous services, server-less by removing the need to have a heavy-weight application server. Later you will learn how to go further by deploying your microservices to Docker and manage it with Mesos. By the end of the book, you'll will gain more clarity on how to implement microservices using Spring Framework and use them in Internet-scale deployments through real-world examples. Style and approach The book follows a step by step approach on how to develop microservices using Spring Framework, Spring Boot, and a set of Spring Cloud components that will help you scale your applications.
目录展开

Spring Microservices

Table of Contents

Spring Microservices

Credits

About the Author

Acknowledgments

About the Reviewer

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Demystifying Microservices

The evolution of microservices

Business demand as a catalyst for microservices evolution

Technology as a catalyst for the microservices evolution

Imperative architecture evolution

What are microservices?

Microservices – the honeycomb analogy

Principles of microservices

Single responsibility per service

Microservices are autonomous

Characteristics of microservices

Services are first-class citizens

Characteristics of services in a microservice

Microservices are lightweight

Microservices with polyglot architecture

Automation in a microservices environment

Microservices with a supporting ecosystem

Microservices are distributed and dynamic

Antifragility, fail fast, and self-healing

Microservices examples

An example of a holiday portal

A microservice-based order management system

An example of a travel agent portal

Microservices benefits

Supports polyglot architecture

Enabling experimentation and innovation

Elastically and selectively scalable

Allowing substitution

Enabling to build organic systems

Helping reducing technology debt

Allowing the coexistence of different versions

Supporting the building of self-organizing systems

Supporting event-driven architecture

Enabling DevOps

Relationship with other architecture styles

Relations with SOA

Service-oriented integration

Legacy modernization

Service-oriented application

Monolithic migration using SOA

Relations with Twelve-Factor apps

A single code base

Bundling dependencies

Externalizing configurations

Backing services are addressable

Isolation between build, release, and run

Stateless, shared nothing processes

Exposing services through port bindings

Concurrency to scale out

Disposability with minimal overhead

Development and production parity

Externalizing logs

Package admin processes

Microservice use cases

Microservices early adopters

The common theme is monolithic migrations

Summary

2. Building Microservices with Spring Boot

Setting up a development environment

Developing a RESTful service – the legacy approach

Moving from traditional web applications to microservices

Using Spring Boot to build RESTful microservices

Getting started with Spring Boot

Developing the Spring Boot microservice using the CLI

Developing the Spring Boot Java microservice using STS

Examining the POM file

Examining Application.java

Examining application.properties

Examining ApplicationTests.java

Testing the Spring Boot microservice

Developing the Spring Boot microservice using Spring Initializr – the HATEOAS example

What's next?

The Spring Boot configuration

Understanding the Spring Boot autoconfiguration

Overriding default configuration values

Changing the location of the configuration file

Reading custom properties

Using a .yaml file for configuration

Using multiple configuration profiles

Other options to read properties

Changing the default embedded web server

Implementing Spring Boot security

Securing microservices with basic security

Securing a microservice with OAuth2

Enabling cross-origin access for microservices

Implementing Spring Boot messaging

Developing a comprehensive microservice example

Spring Boot actuators

Monitoring using JConsole

Monitoring using SSH

Configuring application information

Adding a custom health module

Building custom metrics

Documenting microservices

Summary

3. Applying Microservices Concepts

Patterns and common design decisions

Establishing appropriate microservice boundaries

Autonomous functions

Size of a deployable unit

Most appropriate function or subdomain

Polyglot architecture

Selective scaling

Small, agile teams

Single responsibility

Replicability or changeability

Coupling and cohesion

Think microservice as a product

Designing communication styles

Synchronous style communication

Asynchronous style communication

How to decide which style to choose?

Orchestration of microservices

How many endpoints in a microservice?

One microservice per VM or multiple?

Rules engine – shared or embedded?

Role of BPM and workflows

Can microservices share data stores?

Setting up transaction boundaries

Altering use cases to simplify transactional requirements

Distributed transaction scenarios

Service endpoint design consideration

Contract design

Protocol selection

Message-oriented services

HTTP and REST endpoints

Optimized communication protocols

API documentations

Handling shared libraries

User interfaces in microservices

Use of API gateways in microservices

Use of ESB and iPaaS with microservices

Service versioning considerations

Design for cross origin

Handling shared reference data

Microservices and bulk operations

Microservices challenges

Data islands

Logging and monitoring

Dependency management

Organization culture

Governance challenges

Operation overheads

Testing microservices

Infrastructure provisioning

The microservices capability model

Core capabilities

Infrastructure capabilities

Supporting capabilities

Process and governance capabilities

Summary

4. Microservices Evolution – A Case Study

Reviewing the microservices capability model

Understanding the PSS application

Business process view

Functional view

Architectural view

Design view

Implementation view

Deployment view

Death of the monolith

Pain points

Stop gap fix

Retrospection

Shared data

Single database

Native queries

Stored procedures

Domain boundaries

Microservices to the rescue

The business case

Plan the evolution

Evolutionary approach

Identification of microservices boundaries

Analyze dependencies

Events as opposed to query

Events as opposed to synchronous updates

Challenge requirements

Challenge service boundaries

Final dependency graph

Prioritizing microservices for migration

Data synchronization during migration

Managing reference data

User interfaces and web applications

Session handling and security

Test strategy

Building ecosystem capabilities

Migrate modules only if required

Target architecture

Internal layering of microservices

Orchestrating microservices

Integration with other systems

Managing shared libraries

Handling exceptions

Target implementation view

Implementation projects

Running and testing the project

Summary

5. Scaling Microservices with Spring Cloud

Reviewing microservices capabilities

Reviewing BrownField's PSS implementation

What is Spring Cloud?

Spring Cloud releases

Components of Spring Cloud

Spring Cloud and Netflix OSS

Setting up the environment for BrownField PSS

Spring Cloud Config

What's next?

Setting up the Config server

Understanding the Config server URL

Accessing the Config Server from clients

Handling configuration changes

Spring Cloud Bus for propagating configuration changes

Setting up high availability for the Config server

Monitoring the Config server health

Config server for configuration files

Completing changes to use the Config server

Feign as a declarative REST client

Ribbon for load balancing

Eureka for registration and discovery

Understanding dynamic service registration and discovery

Understanding Eureka

Setting up the Eureka server

High availability for Eureka

Zuul proxy as the API gateway

Setting up Zuul

High availability of Zuul

High availability of Zuul when the client is also a Eureka client

High availability when the client is not a Eureka client

Completing Zuul for all other services

Streams for reactive microservices

Summarizing the BrownField PSS architecture

Summary

6. Autoscaling Microservices

Reviewing the microservice capability model

Scaling microservices with Spring Cloud

Understanding the concept of autoscaling

The benefits of autoscaling

Different autoscaling models

Autoscaling an application

Autoscaling the infrastructure

Autoscaling in the cloud

Autoscaling approaches

Scaling with resource constraints

Scaling during specific time periods

Scaling based on the message queue length

Scaling based on business parameters

Predictive autoscaling

Autoscaling BrownField PSS microservices

The capabilities required for an autoscaling system

Implementing a custom life cycle manager using Spring Boot

Understanding the deployment topology

Understanding the execution flow

A walkthrough of the life cycle manager code

Running the life cycle manager

Summary

7. Logging and Monitoring Microservices

Reviewing the microservice capability model

Understanding log management challenges

A centralized logging solution

The selection of logging solutions

Cloud services

Off-the-shelf solutions

Best-of-breed integration

Log shippers

Log stream processors

Log storage

Dashboards

A custom logging implementation

Distributed tracing with Spring Cloud Sleuth

Monitoring microservices

Monitoring challenges

Monitoring tools

Monitoring microservice dependencies

Spring Cloud Hystrix for fault-tolerant microservices

Aggregating Hystrix streams with Turbine

Data analysis using data lakes

Summary

8. Containerizing Microservices with Docker

Reviewing the microservice capability model

Understanding the gaps in BrownField PSS microservices

What are containers?

The difference between VMs and containers

The benefits of containers

Microservices and containers

Introduction to Docker

The key components of Docker

The Docker daemon

The Docker client

Docker concepts

Docker images

Docker containers

The Docker registry

Dockerfile

Deploying microservices in Docker

Running RabbitMQ on Docker

Using the Docker registry

Setting up the Docker Hub

Publishing microservices to the Docker Hub

Microservices on the cloud

Installing Docker on AWS EC2

Running BrownField services on EC2

Updating the life cycle manager

The future of containerization – unikernels and hardened security

Summary

9. Managing Dockerized Microservices with Mesos and Marathon

Reviewing the microservice capability model

The missing pieces

Why cluster management is important

What does cluster management do?

Relationship with microservices

Relationship with virtualization

Cluster management solutions

Docker Swarm

Kubernetes

Apache Mesos

Nomad

Fleet

Cluster management with Mesos and Marathon

Diving deep into Mesos

The Mesos architecture

Marathon

Implementing Mesos and Marathon for BrownField microservices

Setting up AWS

Installing ZooKeeper, Mesos, and Marathon

Configuring ZooKeeper

Configuring Mesos

Running Mesos, Marathon, and ZooKeeper as services

Running the Mesos slave in the command line

Preparing BrownField PSS services

Deploying BrownField PSS services

Reviewing the deployment

A place for the life cycle manager

Rewriting the life cycle manager with Mesos and Marathon

The technology metamodel

Summary

10. The Microservices Development Life Cycle

Reviewing the microservice capability model

The new mantra of lean IT – DevOps

Reducing wastage

Automating every possible step

Value-driven delivery

Bridging development and operations

Meeting the trio – microservices, DevOps, and cloud

Cloud as the self-service infrastructure for Microservices

DevOps as the practice and process for microservices

Practice points for microservices development

Understanding business motivation and value

Changing the mindset from project to product development

Choosing a development philosophy

Design thinking

The start-up model

The Agile practice

Using the concept of Minimum Viable Product

Overcoming the legacy hotspot

Addressing challenges around databases

Establishing self-organizing teams

Building a self-service cloud

Building a microservices ecosystem

Defining a DevOps-style microservice life cycle process

Value-driven planning

Agile development

Continuous integration

Continuous testing

Continuous release

Continuous monitoring and feedback

Automating the continuous delivery pipeline

Development

Continuous integration

Automated testing

Different candidate tests for automation

Automated sanity tests

Regression testing

Automated functional testing

Automated acceptance testing

Performance testing

Real user flow simulation or journey testing

Automated security testing

Exploratory testing

A/B testing, canary testing, and blue-green deployments

Other nonfunctional tests

Testing in production

Antifragility testing

Target test environments

Continuous deployment

Monitoring and feedback

Automated configuration management

Microservices development governance, reference architectures, and libraries

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部