طراحی پورتال های سازمانی شرکت پروجان

شیرپوینت و پراجکت سرور پروجان

استقرار شیرپوینت و پراجکت سرور

مسیر سایت

کتاب Mastering microservices with Java 9.pdf

Mastering microservices with Java 9-build domain-driven microservice-based applications with Spring, Spring Cloud, and Angular.pdf

دانلود رایگان کتاب Mastering microservices with Java 9.pdf

Second Edition 

build domain-driven microservice-based applications with Spring, Spring Cloud, and Angular

Sourabh Sharma

Copyright © 2017 Packt Publishing

لینک دانلود کتاب Mastering microservices with Java 9.pdf

 

 

Preface
Microservices are the next big thing in designing scalable, easy-to-maintain applications.They not only makes application development easier, but also offer great flexibility to utilize various resources optimally. If you want to build an enterprise-ready implementation of a microservice 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 them effectively using REST Java clients and other tools such as RxJava 2.0. We'll show you the best patterns, practices, and common principles of microservice design, and you'll learn to troubleshoot and debug the issues faced during development. We'll show you how to design and implement reactive microservices. Finally, we'll show you how to migrate a monolithic application to a microservice-based application.
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.

 

What this book covers
Chapter 1, A Solution Approach, covers the high-level design of large software projects and helps you understand the common problems faced in a production environment and the solutions to these problems.
Chapter 2, Setting up the Development Environment, shows how to set up the development environment and configure Spring Boot effectively. You will also learn how to build a sample REST service.
Chapter 3, Domain-Driven Design, teaches you the fundamentals of domain-driven design and how is it used practically by design sample services.
Chapter 4, Implementing Microservices, shows you how to code the service and then write the unit test for the developed code.
Chapter 5, Deployment and Testing, covers how to deploy microservices and develop them on Docker. You will also learn to write the Java test client for microservices.
Chapter 6, Reactive Microservices, shows how to design and implement reactive microservices.
Chapter 7, Securing Microservices, covers the different security methods and the different ways to implement OAuth. You will also understand Spring Security implementation.
Chapter 8, Consuming Microservices Using Web Application, explains how to develop a web application (UI) using the Knockout. You will require Bootstrap JS libraries to build a prototype of a web application that will consume microservices to show data and flow of sample project—a small utility project.
Chapter 9, Best Practices and Common Principles, talks about microservice design principles. You will learn an effective way of developing microservices and how Netflix has implemented microservices.
Chapter 10, Troubleshooting Guide, explains the common problems encountered during the development of microservices and their solutions. This will help you follow the book smoothly and would make learning swift.
Chapter 11, Migrating a Monolithic Application to a Microservice-Based Application, shows you how to migrate a monolithic application to a microservice-based application.

 

What you need for this book
For this book, you can use any operating system (Linux, Windows, or Mac) with a minimum of 2 GB RAM. You will also require NetBeans with Java, Maven, Spring Boot, Spring Cloud, Eureka Server, Docker, and a CI/CD application. For Docker containers, you may need a separate VM or a cloud host with preferably 16 GB or more of RAM.

 

Who this book is for
This book is for Java developers who are familiar with microservice architectures and now wants to take a deeper dive into effectively implementing microservices at an enterprise level. A reasonable knowledge of core microservice elements and applications is expected.

 

 

 

Table of Contents

 

1. A Solution Approach

Evolution of microservices
Monolithic architecture overview
Limitation of monolithic architecture versus its solution with microservices
Traditional monolithic design
Monolithic design with services
Services design
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
Deployment
Summary

2. Setting Up the Development Environment

NetBeans IDE installation and setup
Spring Boot configuration
Spring Boot overview
Adding Spring Boot to our main project
Sample REST program
Writing the REST controller class
The @RestController annotation
The @RequestMapping annotation
The @RequestParam annotation
The @PathVariable annotation
Making a sample REST application executable
Adding a Jetty-embedded server
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
Summary

3. Domain-Driven Design

Domain-driven design fundamentals
Fundamentals of DDD
Ubiquitous language
Multilayered architecture
Presentation layer
Application layer
Domain layer
Infrastructure layer
Artifacts of domain-driven design
Entities
Value objects
FAQs
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 microservices
Restaurant microservice
OTRS implementation
Controller class
API versioning
Service classes
Repository classes
Entity classes
Registration and discovery service (Eureka service)
Eureka client
Booking and user services
Execution
Testing
References
Summary

5. Deployment and Testing

Mandatory services for good microservices
Service discovery and registration
Edge servers
Load balancing
Circuit breakers
Monitoring
An overview of microservice architecture using Netflix OSS
Load balancing
Server-side load balancing
Client-side load balancing
Circuit breakers and monitoring
Using Hystrix's fallback methods
Monitoring
Setting up the Hystrix dashboard
Creating Turbine services
Building and running the OTRS application
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. Reactive Microservices

An overview of the reactive microservice architecture
Responsive
Resilient
Elastic
Message driven
Implementing reactive microservices
Producing an event
Consuming the event
References
Summary

7. 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
Client profiles
Client identifier
Client authentication
OAuth 2.0 protocol endpoints
Authorization endpoint
Token endpoint
Redirection endpoint
OAuth 2.0 grant types
Authorization code grant
Implicit grant
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

8. Consuming Services Using a Microservice Web Application

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 application
References
Summary

9. Best Practices and Common Principles

Overview and mindset
Best practices and principles
Nanoservice, 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

10. Troubleshooting Guide

Logging and the ELK stack
A brief overview
Elasticsearch
Logstash
Kibana
ELK stack setup
Installing Elasticsearch
Installing Logstash
Installing Kibana
Running the ELK stack using Docker Compose
Pushing logs to the ELK stack
Tips for ELK stack implementation
Use of correlation ID for service calls
Let's see how we can tackle this problem
Use of Zipkin and Sleuth for tracking
Dependencies and versions
Cyclic dependencies and their impact
Analyzing dependencies while designing the system
Maintaining different versions
Let's explore more
References
Summary

11. Migrating a Monolithic Application to Microservice-Based Application

Do you need to migrate?
Cloud versus on-premise versus both cloud and on-premise
Cloud only solution
On-premise only solution
Both cloud and on-premise solution
Approaches and keys to successful migration
Incremental migration
Process automation and tools setup
Pilot project
Standalone user interface applications
Migrating modules to microservices
How to accommodate a new functionality during migration
References
Summary

 

لینک دانلود کتاب Mastering microservices with Java 9.pdf

 

عضویت در خبرنامه