全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 藏经阁
852 0
2018-06-20
mastering-microservices-java-9-2nd.pdf
大小:(6.47 MB)

只需: 12 个论坛币  马上下载



mastering-microservices-java-9-2nd.epub
大小:(4.91 MB)

只需: 12 个论坛币  马上下载


Table of Contents
Preface 1
Chapter 1: A Solution Approach 6
Evolution of microservices 7
Monolithic architecture overview 8
Limitation of monolithic architecture versus its solution with
microservices 8
Traditional monolithic design 9
Monolithic design with services 10
Services design 10
One dimension scalability 12
Release rollback in case of failure 12
Problems in adopting new technologies 13
Alignment with Agile practices 14
Ease of development – could be done better 15
Microservices build pipeline 16
Deployment using a container such as Docker 17
Containers 18
Docker 19
Docker's architecture 19
Deployment 21
Summary 21
Chapter 2: Setting Up the Development Environment 22
NetBeans IDE installation and setup 23
Spring Boot configuration 31
Spring Boot overview 31
Adding Spring Boot to our main project 32
Sample REST program 37
Writing the REST controller class 40
The @RestController annotation 40
The @RequestMapping annotation 41
The @RequestParam annotation 41
The @PathVariable annotation 42
Making a sample REST application executable 45
Adding a Jetty-embedded server 46
Setting up the application build 47

Running the Maven tool 47
Executing with the Java command 48
REST API testing using the Postman Chrome extension 49
Some more positive test scenarios 52
Negative test scenarios 52
Summary 54
Chapter 3: Domain-Driven Design 56
Domain-driven design fundamentals 57
Fundamentals of DDD 58
Ubiquitous language 58
Multilayered architecture 59
Presentation layer 60
Application layer 60
Domain layer 60
Infrastructure layer 60
Artifacts of domain-driven design 61
Entities 61
Value objects 62
FAQs 63
Services 64
Aggregates 65
Repository 67
Factory 68
Modules 70
Strategic design and principles 70
Bounded context 71
Continuous integration 71
Context map 72
Shared kernel 73
Customer-supplier 74
Conformist 75
Anticorruption layer 75
Separate ways 75
Open Host Service 76
Distillation 76
Sample domain service 77
Entity implementation 77
Repository implementation 79
Service implementation 81
Summary 85
Chapter 4: Implementing a Microservice 86
OTRS overview 87

Developing and implementing microservices 88
Restaurant microservice 89
OTRS implementation 91
Controller class 93
API versioning 93
Service classes 96
Repository classes 98
Entity classes 100
Registration and discovery service (Eureka service) 103
Eureka client 105
Booking and user services 105
Execution 106
Testing 106
References 110
Summary 110
Chapter 5: Deployment and Testing 111
Mandatory services for good microservices 112
Service discovery and registration 112
Edge servers 112
Load balancing 112
Circuit breakers 113
Monitoring 113
An overview of microservice architecture using Netflix OSS 113
Load balancing 115
Server-side load balancing 115
Client-side load balancing 119
Circuit breakers and monitoring 122
Using Hystrix's fallback methods 123
Monitoring 125
Setting up the Hystrix dashboard 126
Creating Turbine services 128
Building and running the OTRS application 131
Microservice deployment using containers 131
Installation and configuration 132
Docker machine with 4 GB 132
Building Docker images with Maven 132
Running Docker using Maven 135
Integration testing with Docker 136
Pushing the image to a registry 138
Managing Docker containers 139
References 141

Summary 142
Chapter 6: Reactive Microservices 143
An overview of the reactive microservice architecture 143
Responsive 145
Resilient 145
Elastic 145
Message driven 145
Implementing reactive microservices 146
Producing an event 146
Consuming the event 153
References 156
Summary 157
Chapter 7: Securing Microservices 158
Enabling Secure Socket Layer 158
Authentication and authorization 162
OAuth 2.0 162
Usage of OAuth 163
OAuth 2.0 specification - concise details 163
OAuth 2.0 roles 165
Resource owner 166
Resource server 166
Client 166
Authorization server 166
OAuth 2.0 client registration 167
Client types 167
Client profiles 167
Client identifier 171
Client authentication 171
OAuth 2.0 protocol endpoints 171
Authorization endpoint 172
Token endpoint 172
Redirection endpoint 173
OAuth 2.0 grant types 174
Authorization code grant 174
Implicit grant 178
Resource owner password credentials grant 181
Client credentials grant 183
OAuth implementation using Spring Security 184
Authorization code grant 189
Implicit grant 193
Resource owner password credential grant 193
Client credentials grant 194

References 196
Summary 196
Chapter 8: Consuming Services Using a Microservice Web Application 197
AngularJS framework overview 198
MVC 198
MVVM 198
Modules 199
Providers and services 200
Scopes 201
Controllers 202
Filters 202
Directives 203
UI-Router 203
Development of OTRS features 204
Home page/restaurant list page 204
index.html 206
app.js 210
restaurants.js 212
restaurants.html 219
Search restaurants 220
Restaurant details with reservation option 220
restaurant.html 221
Login page 223
login.html 224
login.js 224
Reservation confirmation 226
Setting up the web application 226
References 242
Summary 242
Chapter 9: Best Practices and Common Principles 243
Overview and mindset 243
Best practices and principles 245
Nanoservice, size, and monolithic 245
Continuous integration and deployment 247
System/end-to-end test automation 248
Self-monitoring and logging 248
A separate data store for each microservice 250
Transaction boundaries 251
Microservices frameworks and tools 252
Netflix Open Source Software (OSS) 252


Build - Nebula 252
Deployment and delivery - Spinnaker with Aminator 253
Service registration and discovery - Eureka 253
Service communication - Ribbon 253
Circuit breaker - Hystrix 254
Edge (proxy) server - Zuul 254
Operational monitoring - Atlas 255
Reliability monitoring service - Simian Army 255
AWS resource monitoring - Edda 256
On-host performance monitoring - Vector 257
Distributed configuration management - Archaius 257
Scheduler for Apache Mesos - Fenzo 258
Cost and cloud utilization - Ice 258
Other security tools - Scumblr and FIDO 258
Scumblr 259
Fully Integrated Defence Operation (FIDO) 259
References 260
Summary 260
Chapter 10: Troubleshooting Guide 261
Logging and the ELK stack 261
A brief overview 263
Elasticsearch 263
Logstash 264
Kibana 264
ELK stack setup 265
Installing Elasticsearch 265
Installing Logstash 266
Installing Kibana 267
Running the ELK stack using Docker Compose 268
Pushing logs to the ELK stack 270
Tips for ELK stack implementation 272
Use of correlation ID for service calls 273
Let's see how we can tackle this problem 273
Use of Zipkin and Sleuth for tracking 273
Dependencies and versions 275
Cyclic dependencies and their impact 275
Analyzing dependencies while designing the system 276
Maintaining different versions 276
Let's explore more 276
References 277
Summary 277
Chapter 11: Migrating a Monolithic Application to Microservice-Based
Application 279
Do you need to migrate? 280
Cloud versus on-premise versus both cloud and on-premise 280
Cloud only solution 280
On-premise only solution 281
Both cloud and on-premise solution 281
Approaches and keys to successful migration 282
Incremental migration 282
Process automation and tools setup 283
Pilot project 283
Standalone user interface applications 283
Migrating modules to microservices 285
How to accommodate a new functionality during migration 286
References 287
Summary 287
Index 288


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群