万本电子书0元读

万本电子书0元读

顶部广告

Mastering Microservices with Java电子书

售       价:¥

37人正在读 | 0人评论 9.8

作       者:Sourabh Sharma

出  版  社:Packt Publishing

出版时间:2016-06-01

字       数:320.4万

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

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Master the art of implementing microservices in your production environment with ease About This Book Build, deploy, and test microservices from scratch with ease Design and implement sample projects using domain-driven design Confidently resolve the issues faced during development and deployment Who This Book Is For If you are a Java developer who is familiar with the microservices architecture and now wants to take a deeper dive into effectively implementing microservices at an enterprise level, then this book is for you. A reasonable knowledge level and understanding of core microservice elements and applications is expected. What You Will Learn Use domain-driven design to design and implement microservices Secure microservices using Spring Security Deploy and test microservices Troubleshoot and debug the issues faced during development Consume microservices using a JavaScript web application Learning best practices and common principals about microservices In Detail With the introduction of the cloud, enterprise application development moved from monolithic applications to small lightweight process-driven components called microservices. Microservices are the next big thing in designing scalable, easy-to-maintain applications. It not only makes app development easier, but also offers great flexibility to utilize various resources optimally. If you want to build an enterprise-ready implementation of the microservices architecture, then this is the book for you! Starting off by understanding the core concepts and framework, you will then focus on the high-level design of large software projects. You will gradually move on to setting up the development environment and configuring it before implementing continuous integration to deploy your microservice architecture. Using Spring security, you will secure microservices and test it effectively using REST Java clients and other tools. Finally, we’ll show you the best practices and common principals of microservice design and you’ll learn to troubleshoot and debug the issues faced during development. By the end of the book, you will know how to build smaller, lighter, and faster services that can be implemented easily in a production environment. Style and approach This book starts from the basics, including environment setup and provides easy-to-follow steps to implement the sample project using microservices. It gives you the complete lifecycle of enterprise app development from designing and developing to deploying, testing, and security. Each topic is explained and placed in context, and for the more inquisitive, there are more details of the concepts used.
目录展开

Mastering Microservices with Java

Table of Contents

Mastering Microservices with Java

Credits

About the Author

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. A Solution Approach

Evolution of µServices

Monolithic architecture overview

Limitation of monolithic architecture versus its solution with µServices

One dimension scalability

Release rollback in case of failure

Problems in adopting new technologies

Alignment with Agile practices

Ease of development – could be done better

Microservices build pipeline

Deployment using a container such as Docker

Containers

Docker

Docker's architecture

Docker image

Docker container

Deployment

Summary

2. Setting Up the Development Environment

Spring Boot configuration

Spring Boot overview

Adding Spring Boot to the rest sample

Adding a Jetty-embedded server

Sample REST program

Writing the REST controller class

@RestController

@RequestMapping

@RequestParam

@PathVariable

Making a sample REST app executable

Setting up the application build

Running the Maven tool

Executing with the Java command

REST API testing using the Postman Chrome extension

Some more positive test scenarios

Negative test scenarios

NetBeans IDE installation and setup

References

Summary

3. Domain-Driven Design

Domain-driven design fundamentals

Building blocks

Ubiquitous language

Multilayered architecture

Presentation layer

Application layer

Domain layer

Infrastructure layer

Artifacts of domain-driven design

Entities

Value objects

Frequently asked questions

Services

Aggregates

Repository

Factory

Modules

Strategic design and principles

Bounded context

Continuous integration

Context map

Shared kernel

Customer-supplier

Conformist

Anticorruption layer

Separate ways

Open host service

Distillation

Sample domain service

Entity implementation

Repository implementation

Service implementation

Summary

4. Implementing a Microservice

OTRS overview

Developing and implementing µServices

Restaurant µService

Controller class

API versioning

Service classes

Repository classes

Entity classes

Booking and user services

Registration and Discovery service (Eureka service)

Execution

Testing

References

Summary

5. Deployment and Testing

An overview of microservice architecture using Netflix OSS

Load balancing

Client-side load balancing

Server-side load balancing

Circuit breaker and monitoring

Using Hystrix's fallback methods

Monitoring

Setting up the Hystrix Dashboard

Setting up Turbine

Microservice deployment using containers

Installation and configuration

Docker Machine with 4 GB

Building Docker images with Maven

Running Docker using Maven

Integration testing with Docker

Pushing the image to a registry

Managing Docker containers

References

Summary

6. Securing Microservices

Enabling Secure Socket Layer

Authentication and authorization

OAuth 2.0

Usage of OAuth

OAuth 2.0 specification – concise details

OAuth 2.0 roles

Resource owner

Resource server

Client

Authorization server

OAuth 2.0 client registration

Client types

Confidential client type

Public client type

Web application

User agent-based application

Native application

Client identifier

Client authentication

OAuth 2.0 protocol endpoints

Authorization endpoint

Token endpoint

Redirection endpoint

OAuth 2.0 grant types

Authorization code grant

Authorization code requests and responses

Implicit grant

Implicit grant requests and responses

Resource owner password credentials grant

Client credentials grant

OAuth implementation using Spring Security

Authorization code grant

Implicit grant

Resource owner password credential grant

Client credentials grant

References

Summary

7. Consuming Services Using a Microservice Web App

AngularJS framework overview

MVC

MVVM

Modules

Providers and services

Scopes

Controllers

Filters

Directives

UI-Router

Development of OTRS features

Home page/restaurant list page

index.html

app.js

restaurants.js

restaurants.html

Search Restaurants

Restaurant details with reservation option

restaurant.html

Login page

login.html

login.js

Reservation confirmation

Setting up the web app

Summary

8. Best Practices and Common Principles

Overview and mindset

Best practices and principals

Nanoservice (not recommended), size, and monolithic

Continuous integration and deployment

System/end-to-end test automation

Self-monitoring and logging

A separate data store for each microservice

Transaction boundaries

Microservices frameworks and tools

Netflix Open Source Software (OSS)

Build – Nebula

Deployment and delivery – Spinnaker with Aminator

Service registration and discovery – Eureka

Service communication – Ribbon

Circuit breaker – Hystrix

Edge (proxy) server – Zuul

Operational monitoring – Atlas

Reliability monitoring service – Simian Army

AWS resource monitoring – Edda

On-host performance monitoring – Vector

Distributed configuration management – Archaius

Scheduler for Apache Mesos – Fenzo

Cost and cloud utilization – Ice

Other security tools – Scumblr and FIDO

Scumblr

Fully Integrated Defence Operation (FIDO)

References

Summary

9. Troubleshooting Guide

Logging and ELK stack

A brief overview

Elasticsearch

Logstash

Kibana

ELK stack setup

Installing Elasticsearch

Installing Logstash

Installing Kibana

Tips for ELK stack implementation

Use of correlation ID for service calls

Let's see how we can tackle this problem

Dependencies and versions

Cyclic dependencies and their impact

It needs to be analyzed while designing the system

Maintaining different versions

Let's explore more

References

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部