Java Microservices cover

Java Microservices

No rating yet
Chapters
22
ISBN
9787121304934

Tags

Summary

Java Microservices is the Chinese translation of Mastering Microservices with Java by Indian-American developer Sourabh Sharma, translated by Lu Tao and published by Publishing House of Electronics Industry in January 2017. The book is aimed at developers with some Java foundation who want to transform monolithic applications into microservice architecture. It begins with "why microservices," first analyzing the limitations of traditional monolithic architecture in scalability, version rollback, adoption of new technologies, and alignment with agile practices, and explaining why microservices can break large systems into small, lightweight, process-driven components. It then introduces setting up the development environment, including quickly building REST services with Spring Boot, embedding the Jetty container, packaging and running with Maven, and performing positive and negative API tests with Postman. Dedicated chapters explain the basic principles of domain-driven design (DDD), ubiquitous language, layered architecture, and entities, and apply the domain model to coding practice in "implementing microservices." The latter half covers deployment and testing, security implementation, front-end web applications calling back-end services, and continuous integration and containerized delivery, finally summarizing best practices and general principles of microservice design and offering troubleshooting ideas. The book is relatively compact (about 230 pages in Chinese) and reads more like a roadmap-style introduction and implementation guide than an exhaustive framework manual. Because it was written relatively early, its examples mainly reflect the Spring Boot and Netflix OSS ecosystem of the time; readers can compare them with today's mainstream Spring Cloud, container, and cloud-native toolchains.

Editor's review

如果你是从“单体 Java 应用”起步、正被拆分服务这件事卡住的开发者,这本书的价值在于它不把微服务当成一堆技术名词的堆砌,而是先讲清“为什么要拆”“拆完之后怎么跑起来”。作者用很短的篇幅搭出一条完整路径:单体架构的痛点 → Spring Boot 起一个 REST 服务 → 用领域驱动设计划出服务边界 → 部署、测试、安全、前端调用 → 最后收拢为设计准则。对于首次接触微服务的人来说,这条路线足以建立一张正确的地图,避免一上手就陷进组件选型和配置泥潭。全书中文版约230页,通勤几晚就能读完,作为团队内部分享或新人培训的入门读物也很合适。需要提醒的是,本书2017年引进,示例中仍有 Netflix OSS、Postman Chrome 扩展等今天已淡出的技术,Netflix 组件大多进入维护状态,容器与云原生生态也几经迭代。因此建议把它当作“方法论读物”而非“操作手册”:读懂拆分逻辑和工程流程,具体的框架选型和配置则交给更近期的资料。同时书中对分布式事务、服务网格、可观测性等话题着墨有限,不能指望它覆盖生产环境的全部细节。

Who it's for

A good fit for

  • 有 Java/Spring 基础、第一次系统接触微服务的后端开发者
  • 正在把单体应用拆分为微服务的开发或架构团队成员
  • 需要向团队讲清微服务基本概念与实施流程的技术负责人
  • 想借一本篇幅不长的读物快速建立微服务知识框架的学生或转岗者

Not a good fit for

  • 完全没有 Java 与 Web 开发经验、需要从语法起步的零基础读者
  • 寻找当前主流 Spring Cloud Alibaba 版本实操手册的开发者
  • 期望深入分布式事务、服务网格、可观测性等专题的资深架构师

Reading tips

  1. 先读第1章和第8章,理解拆分动机与设计原则,再回过头补技术实现细节。
  2. 动手把第2章的 Spring Boot 示例亲自跑通,再对照 DDD 章节为示例重画服务边界。
  3. 遇到 Netflix OSS 等旧组件时,可在理解其职责(注册、容错、网关)后替换为当前常用方案。
  4. 读完一章就用自己项目中的一两个模块做拆分练习,把书中的准则落到实际决策上。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Preface
  2. 1 A Solution: The Evolution of Microservices
  3. Monolithic Applications and Microservices
  4. Limitations of Scalability and Version Rollback
  5. Alignment with Agile Practices
  6. Build Pipelines and Docker-Based Container Deployment
  7. 2 Setting Up the Development Environment
  8. Spring Boot Configuration and Embedded Jetty
  9. Writing REST Controller Classes
  10. Building and Running the Sample Application
  11. Testing REST APIs with Postman
  12. Installing and Configuring NetBeans IDE
  13. 3 Domain-Driven Design
  14. Basic Principles of Domain-Driven Design
  15. Ubiquitous Language and Layered Architecture
  16. Main Building Blocks of Domain-Driven Design
  17. 4 Implementing Microservices
  18. 5 Deployment and Testing
  19. 6 Implementing Security for Microservices
  20. 7 Consuming Services with a Microservice Web Application
  21. 8 Best Practices and General Principles
  22. 9 Troubleshooting Guide

FAQ

这本书和《Spring Cloud Alibaba 微服务架构实战派》有什么区别?
本书是 Mastering Microservices with Java 的中译本,偏重微服务的整体思路与实施流程,技术示例以早期 Spring Boot 与 Netflix OSS 为主;后者是中文原创的大部头实战书,围绕 Spring Cloud Alibaba 组件与完整项目案例展开。入门选前者,做当前技术栈落地选后者。
书中的示例过时了吗?还能照着做吗?
基本流程如 Spring Boot 构建 REST 服务、Maven 打包、接口测试仍然适用,但 Netflix OSS 相关组件大多已进入维护状态,Postman 也早已不再是 Chrome 扩展。建议把示例当作思路示范,具体配置按当前框架文档更新。
需要什么基础才能读懂?
需要会写 Java,了解 Spring 的依赖注入和基本的 Web/REST 概念,并熟悉 Maven 构建。若尚未接触过 Spring Boot,建议先补齐这部分,否则环境搭建章节会读得吃力。
书里讲领域驱动设计讲得深吗?
有一章专门介绍 DDD 的基本原理、通用语言、分层架构与实体等构件,并承接后续的服务实现,属于“够用且有落地指向”的入门级讲解,不涉及复杂的战略设计进阶内容。
中文版篇幅和原版差别大吗?
中文版实体书约229至248页(不同来源著录略有差异),体量与原版相当,全书九章加前言,属于篇幅紧凑的技术书。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category