[Book Donation] Scalable Service Architecture: Framework and Middleware!

Executive summary:

"Scalable Service Architecture: Framework and Middleware" focuses on the high-availability service architecture and focuses on explaining the core points of high-availability architecture design: scalable and extensible, from application layer, database, cache, message queue, big data query System, distributed timing task scheduling system, microservices and other levels explain in detail how to design a scalable and extensible framework, and give a methodology and practical summary of solving specific problems in various fields. With the publication of "Scalable Service Architecture: Framework and Middleware", we have also open sourced 4 effective Internet scalable frameworks, including database sub-database sub-table dbsplit, cache fragment redic, and professional issuer vesta And the message queue processor framework kclient, each framework can be used out of the box, it can also be used as a material for learning the Internet platform framework, and it can also be used as an example for developing open source projects.

The first volume of "Scalable Service Architecture: Framework and Middleware", "Distributed Service Architecture: Principles, Design and Practice", introduces in detail how to solve the pain points such as consistency, high performance, high availability, and agility of online high-concurrency services. Scalable Service Architecture: Framework and Middleware" can be combined with the first volume to cover various topics of ensuring online high-concurrency services: consistency, high performance, high availability, scalability, scalability, agility, etc. Each topic is a methodology. Fully understanding these topics can ensure the robust operation of online services, and has an immeasurable role in realizing the n 9s of service stability.

Whether it is for Internet or traditional software engineers, test engineers, architects, or other managers who are deeply involved in IT, "Scalable Service Architecture: Framework and Middleware" has strong reference and reference value. An architecture-level technical book worth reading by every technologist.

content:

Chapter 1 How to Design a High-Performance Distributed Issuer That Never Repeats 1

1.1 Alternative solutions and technical selection 2

1.1.1 Why not use UUID 2

1.1.2 Database-based implementation 2

1.1.3 Snowflake Open Source Project 3

1.1.4 Summary 4

1.2 The basic requirements of distributed systems for signal generators 4

1.3 Architecture Design and Core Points 6

1.3.1 Release Mode 6

1.3.2 ID Type 7

1.3.3 Data Structures 7

1.3.4 Concurrency 9

1.3.5 Assignment of machine IDs 9

1.3.6 Time synchronization 10

1.3.7 Design Verification 11

1.4 How to implement a multi-scene signaler according to the design 11

1.4.1 Project structure 12

1.4.2 Definition of Service Interface 14

1.4.3 Implementation of Service Interfaces 15

1.4.4 Conversion between ID metadata and long ID 22

1.4.5 Time manipulation 25

1.4.6 Generation of machine IDs 27

1.4.7 Summary 32

1.5 How to ensure performance requirements 32

1.5.1 Stress test results in embedded release mode 33

1.5.2 The pressure test results of the central server publishing mode 33

1.5.3 Pressure test results of REST publishing mode (implemented by Netty) 33

1.5.4 Pressure test results of REST publishing mode (implemented by Spring Boot + Tomcat) 34

1.5.5 Performance Test Summary 34

1.6 How to let users use it quickly 35

1.6.1 Guidelines for using the REST publishing model 35

1.6.2 Guidelines for using the service-oriented model 38

1.6.3 Guidelines for using embedded publishing mode 41

1.7 Provide API documentation for users 43

1.7.1 RESTful API Documentation 44

1.7.2 Java API Documentation 45

Chapter 2 Design and Implementation of a Scalable Message Queuing Framework 49

2.1 Background 50

2.2 Project Objectives 50

2.2.1 Ease of use 50

2.2.2 High performance 51

2.2.3 High stability 51

2.3 Architectural difficulties 51

2.3.1 The threading model 51

2.3.2 Exception Handling 53

2.3.3 Graceful Shutdown 53

2.4 Design and Implementation 54

2.4.1 Project structure 54

2.4.2 Planning of the project package 55

2.4.3 Design and Implementation of Producers 57

2.4.4 Consumer Design and Implementation 58

2.4.5 Design and Implementation of Startup Module 67

2.4.6 Architecture of the message handler 76

2.4.7 Reflection Mechanisms 79

2.4.8 Design of Template Projects 80

2.5 User Guide 82

2.5.1 Installation steps 82

2.5.2 Java APIs 83

2.5.3. Integrating with the Spring environment

2.5.4 Annotating the service source code 85

2.6 Introduction to API 87

2.6.1  Producer API  87

2.6.2  Consumer API  88

2.6.3 Message Handlers 88

2.6.4 Annotations defined by message handlers 90

2.7 The Message Handler Template Project 91

2.7.1 Rapid Development Wizard 91

2.7.2 Background monitoring and management 92

Chapter 3 Lightweight database sub-database sub-table structure and framework 93

3.1 What is a sub-library and sub-table 94

3.1.1 The three stages of using a database 94

3.1.2 Under what circumstances do you need to sub-library and sub-table 95

3.1.3 Typical examples of sub-database and sub-table 96

3.2 Three Divide and Conquer Solutions 97

3.2.1 Client Sharding 97

3.2.2 Proxy sharding 100

3.2.3 Distributed databases that support transactions 101

3.3 Architecture design of sub-database and sub-table 102

3.3.1 The overall segmentation method 102

3.3.2 Routing Process and Fragmentation Dimension of Horizontal Split Mode 106

3.3.3 Transaction processing mechanism after fragmentation 107

3.3.4 Read-write separation 119

3.3.5 Problems caused by sub-database and sub-table 119

3.4 Initial experience of popular proxy fragmentation framework Mycat 123

3.4.1 Installing Mycat 123

3.4.2 Configuring Mycat 124

3.4.3 Configuring Database Nodes 128

3.4.4 Data Migration 129

3.4.5 Sharding Rules Supported by Mycat 129

3.5 First experience of the popular client-side sharding framework Sharding JDBC 138

3.5.1 Introduction to Sharding JDBC 138

3.5.2 Features of Sharding JDBC 139

3.5.3 The use of Sharding JDBC 141

3.5.4 Sharding JDBC usage restrictions 152

3.6 Design, implementation and use of self-developed client-side fragmentation framework dbsplit 153

3.6.1 Project structure 154

3.6.2 Package structure and execution flow 155

3.6.3 Slice subscript naming strategy 159

3.6.4 SQL parsing and assembly 167

3.6.5  SQL实用程序  168

3.6.6  反射实用程序  173

3.6.7  分片规则的配置  177

3.6.8  支持分片的SplitJdbcTemplate和SimpleSplitJdbcTemplate接口API  179

3.6.9  JdbcTemplate的扩展SimpleJdbcTemplate接口API  184

3.6.10  用于创建分库分表数据库的脚本工具  187

3.6.11  使用dbsplit的一个简单示例  192

3.6.12  使用dbsplit的线上真实示例展示  199

第4章  缓存的本质和缓存使用的优秀实践  201

4.1  使用缓存的目的和问题  202

4.2  自相似,CPU的缓存和系统架构的缓存  203

4.2.1  CPU缓存的架构及性能  205

4.2.2  CPU缓存的运行过程分析  206

4.2.3  缓存行与伪共享  208

4.2.4  从CPU的体系架构到分布式的缓存架构  218

4.3  常用的分布式缓存解决方案  221

4.3.1  常用的分布式缓存的对比  221

4.3.2  Redis初体验  225

4.4  分布式缓存的通用方法  229

4.4.1  缓存编程的具体方法  229

4.4.2  应用层访问缓存的模式  233

4.4.3  分布式缓存分片的三种模式  235

4.4.4  分布式缓存的迁移方案  238

4.4.5  缓存穿透、缓存并发和缓存雪崩  244

4.4.6  缓存对事务的支持  246

4.5  分布式缓存的设计与案例  248

4.5.1  缓存设计的核心要素  248

4.5.2  缓存设计的优秀实践  250

4.5.3  关于常见的缓存线上问题的案例  253

4.6  客户端缓存分片框架redic的设计与实现  257

4.6.1  什么时候需要redic  258

4.6.2  如何使用redic  258

4.6.3  更多的配置  258

4.6.4  项目结构  260

4.6.5  包结构  261

4.6.6  设计与实现的过程  261

第5章  大数据利器之Elasticsearch  268

5.1  Lucene简介  269

5.1.1  核心模块  269

5.1.2  核心术语  270

5.1.3  检索方式  271

5.1.4  分段存储  273

5.1.5  段合并策略  275

5.1.6  Lucene相似度打分  278

5.2  Elasticsearch简介  286

5.2.1  核心概念  286

5.2.2  3C和脑裂  289

5.2.3  事务日志  291

5.2.4  在集群中写索引  294

5.2.5  集群中的查询流程  295

5.3  Elasticsearch实战  298

5.3.1  Elasticsearch的配置说明  298

5.3.2  常用的接口  300

5.4  性能调优  305

5.4.1  写优化  305

5.4.2  读优化  308

5.4.3  堆大小的设置  313

5.4.4  服务器配置的选择  315

5.4.5  硬盘的选择和设置  316

5.4.6  接入方式  318

5.4.7  角色隔离和脑裂  319

第6章  全面揭秘分布式定时任务  321

6.1  什么是定时任务  322

6.2  分布式定时任务  341

6.2.1  定时任务的使用场景  342

6.2.2  传统定时任务存在的问题  342

6.2.3  分布式定时任务及其原理  344

6.3  开源分布式定时任务的用法  347

6.3.1  Quartz的分布式模式  347

6.3.2  TBSchedule  356

6.3.3  Elastic-Job  365

第7章  RPC服务的发展历程和对比分析  377

7.1  什么是RPC服务  378

7.2  RPC服务的原理  379

7.2.1  Sokcet套接字  379

7.2.2  RPC的调用过程  380

7.3  在程序中使用RPC服务  382

7.4  RPC服务的发展历程  383

7.4.1  第一代RPC:以ONC RPC和DCE RPC为代表的函数式RPC  384

7.4.2  第二代RPC:支持面对象的编程  388

7.4.3  第三代RPC:SOA和微服务  398

7.4.4  架构的演进  402

7.5  主流的RPC框架  403

7.5.1  Thrift  403

7.5.2  ZeroC Ice  410

7.5.3  gRPC  418

7.5.4  Dubbo  430

第8章  Dubbo实战及源码分析  436

8.1  Dubbo的四种配置方式  437

8.1.1  XML配置  437

8.1.2  属性配置  440

8.1.3  API配置  441

8.1.4  注解配置  443

8.2  服务的注册与发现  446

8.2.1  注册中心  446

8.2.2  服务暴露  449

8.2.3  引用服务  451

8.3  Dubbo通信协议及序列化探讨  455

8.3.1  Dubbo支持的协议  455

8.3.2  协议的配置方法  456

8.3.3  多协议暴露服务  457

8.3.4  Dubbo协议的使用注意事项  458

8.3.5  Dubbo协议的约束  459

8.4  Dubbo中高效的I/O线程模型  459

8.4.1  对Dubbo中I/O模型的分析  459

8.4.2  Dubbo中线程配置的相关参数  460

8.4.3  在Dubbo线程方面踩过的坑  461

8.4.4  对Dubbo中线程使用的建议  462

8.5  集群的容错机制与负载均衡  462

8.5.1  集群容错机制的原理  462

8.5.2  集群容错模式的配置方法  464

8.5.3  六种集群容错模式  464

8.5.4  集群的负载均衡  465

8.6  监控和运维实践  467

8.6.1  日志适配  467

8.6.2  监控管理后台  467

8.6.3  服务降级  473

8.6.4  优雅停机  475

8.6.5  灰度发布  475

8.7  Dubbo项目线上案例解析  477

8.7.1  线上问题的通用解决方案  477

8.7.2  耗时服务耗尽了线程池的案例  480

8.7.3  容错重试机制引发服务雪崩的案例  481

8.8  深入剖析Dubbo源码及其实现  483

8.8.1  Dubbo的总体架构设计  483

8.8.2  配置文件  486

8.8.3  Dubbo的核心RPC  488

8.8.4  Dubbo巧妙的URL总线设计  491

8.8.5  Dubbo的扩展点加载SPI  492

8.8.6  Dubbo服务暴露的过程  493

8.8.7  服务引用  502

8.8.8  集群容错和负载均衡  503

8.8.9  集群容错  504

8.8.10  负载均衡  509

第9章  高性能网络中间件  512

9.1  TCP/UDP的核心原理及本质探索  513

9.1.1  网络模型  513

9.1.2  UDP、IP及其未解决的问题  515

9.1.3  TCP详解  519

9.1.4  是否可以用UDP代替TCP  527

9.1.5  网络通信的不可靠性讨论  529

9.2  网络测试优秀实践  530

9.2.1  网络测试的关键点  530

9.2.2  那些必不可少的网络测试工具  532

9.2.3  典型的测试报告  539

9.3  高性能网络框架的设计与实现  544

9.3.1  对代理功能的测试及分析  545

9.3.2  网络中间件的使用介绍  549

9.3.3  内存和缓存的优化  551

9.3.4  快速解析流数据  554

支持作者直接购买

640

赠书说明:

活动对象:公众号读者;

抽奖规则,长按小程序抽奖二维码参与即可;

中奖后在抽奖小程序填写好收货信息,收货人、联系方式、收货地址;

640

点击图片查看更多推荐内容

↓↓↓

640?

从Nginx、Apache工作原理看为什么Nginx比Apache高效!

640?

【面试题】2018年最全Java面试通关秘籍第四套!

640?

大话程序猿眼里的高并发!

640?

那些鲜为人知的序列化和反序列化底层实现原理!

640?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326035307&siteId=291194637