当前位置:网站首页>Why do you develop middleware when you are young? "You can choose your own way"

Why do you develop middleware when you are young? "You can choose your own way"

2022-06-24 17:05:00 Little brother Fu

author : Little brother Fu

Blog :https://bugstack.cn

precipitation 、 Share 、 grow up , Let yourself and others have something to gain !

One 、 Preface

young , Why middleware development ?

Five years ago , Xianghe Big factory The village , It's a good start . My brothers and I are ambitious , Go to the interview by bus , Who knows the job less than half a month , On average... Every day 1.3 I'm hanging in the Eight Legged essay to build a rocket , Within a year 6 A brother went to outsource .

The Buddha bless ! The fortune teller said I was “CRUD To move the brick 996”, But I don't agree . I think it's going to be , yes 20K yes 40K, It's up to you .

You follow me for the shortest time , The foundation is the thinnest , How can I get there , Let you choose for yourself .

Okay , I wish you all the best , In the big factory , everything is going smoothly ! Cheers, architects !


At the end of the day , Why do you want to open up CRUD Surface , Go deep into the core source code and learn some middleware development skills , I don't want to have a certain depth in learning technology stack , In order to avoid being cheated on the salary during the interview . It's like someone asking you :

  • Proxy for class 、 In what scenario are reflection calls used ?
  • How do custom annotations get information together with facets ?
  • What you need yml How configuration information is SpringBoot Load and initialize ?
  • Bean How is it injected into Spring Containers , serviceable ?
  • ORM How does the framework solve the problem of executing without writing an interface implementation class CRUD Operation of the ?
  • What is the relationship between the disturbance function and the data hash in the database routing implementation ?
  • Distributed task scheduling and zookeeper How does the configuration center interact ?
  • How to intercept the run-time information of the program method ?

Sum up , And so on, these technical points may be many times what you learn can only be called Recite the answer Record the results , Because there is no practical exercise, so later forget and also can't bear the interviewer's continuous questions .

that , In order to make all of them need to deepen their knowledge of technology stack , Practical experience in developing relevant skills , At the same time, we also let the small partners who are interested in middleware development with high salary , There is a tutorial to get started . I hereby prepare a column booklet 《SpringBoot Middleware design and development 》, Welcome aboard !

Full volume 19 Chapters , Include 16 Design and development of middleware , Including test cases 30 A code base for readers to learn to use . The middleware scenarios implemented in the booklet cover : Technical framework 、 Data services 、 Data components 、 Distributed technology 、 Service governance 、 Bytecode 、IDEA Seven aspects of plug-ins , Throughout the Internet system architecture commonly used in the core content . It's worth learning 、 Study 、 From practice to mastery .

Jian The author's level is limited , If the book contains something difficult to understand , It must be that the author lacks the necessary description and strict calibration in the process of writing , Thank you for your comments or questions , Welcome to interact with me more , Make progress and grow together .

Two 、 Middleware development technology

If you usually just do more business code development , Then, the technology of contact is generally in all kinds of components API On use , And the packaging of different interfaces . Middleware development involves the source code and principle of various frameworks , And the corresponding technology migration and reuse . So in our middleware design and Implementation , You'll learn the framework 、 data 、 government 、 Knowledge of distributed and bytecode technology stack , The whole system includes the following :

chart 2-1
  • Technical framework : Include Spring、SpringBoot Configuration is loaded 、 Custom annotation 、 Scan the registration Bean etc. , as well as ORM Framework design principle and implementation . This part of technology is mainly to combine the middleware and framework , Develop corresponding components or package them for various kinds of SpringBoot Starter Ability to learn .
  • Data services :Mysql、Redis、Elasticsearch, It's all data services , It is usually necessary to develop various components to encapsulate the use of data services ,Mysql We know there are JDBC,Redis We know there are Jedis, but Elasticsearch Yes x-pack Do you understand .
  • Data components : This kind of component is developed to simplify the use of data services ,Mysql+JDBC+ORM, It is very convenient to use database services , that Elasticsearch Whether we can also do the corresponding component research and development , So that its queries can also be used like MyBatis The same ? Second, the technical ability of folding needs to MyBatis etc. ORM The implementation principle of the framework is familiar with , At the same time, we need to understand JDBC The concept of .
  • Distributed technology :RPC frame 、 Registry Center 、 Distributed tasks , They are very important technologies in the existing Internet distributed architecture , And how to achieve a RPC frame , Technology is also the focus of R & D personnel , And how to use the registry 、 How to distribute distributed scheduling tasks , wait , The study of these technologies can help us have a deeper understanding of the use of existing frameworks .
  • Service governance : Fuse 、 Downgrade 、 Current limiting 、 Tangent 、 Black and white lists and non intrusive extensions to existing methods , Can be a service governance component , Originally, this kind of technology was integrated with business logic code in the early days , Later, it was gradually disassembled , Develop corresponding components . So we can learn , About the packaging of these components 、 How is integration done .
  • Bytecode & plug-in unit : In the operation and maintenance process of Internet system application , You'll be exposed to all kinds of monitoring systems , And many monitoring systems are non intrusive full link monitoring , So how is this achieved ? In fact, they are based on bytecode instrumentation , Enhancements to the system approach , Collect the corresponding runtime information , Monitoring . And then to expansion JVMTI、IDEA Plug-in development , All for the sustainable delivery and launch of the whole R & D process, improving delivery quality and reducing human efficiency .

Sum up , These kinds of typical middleware run through the whole Internet system architecture , They will be explained in the following chapters , How they are designed and implemented , A little bit of middleware to take you out of the mystery , Let your technology stack knowledge also increase some in-depth and hands-on content .

3、 ... and 、 Middleware design and implementation list

Serial number

Icon

name

describe

1

Service governance , Unified white list control

Solve the risk of online verification , White list specific user opening verification

2

Service governance , Timeout fusing

Packaging timeout call , Reduce the cost of business system access

3

Service governance , Call current limiting

Wrapper interface calls current limiting , Reduce the cost of business system access

4

Service governance , Custom interception method

Do not destroy existing methods , Enhance method service capabilities

5

ORM Framework implementations

Study ORM Framework core design , Implement the simple version MyBatis

6

ORM Framework and Spring aggregate

be familiar with Bean scanning 、 agent 、 register 、 Management etc. , And right ORM Packaging

7

combination SpringBoot Development ORM Starter

ORM、Spring And SpringBoot combination , Automating initial configuration , Development Starter

8

ES-JDBC Query engine

understand Elasticsearch JDBC Source code implementation of component ,x-pack-jdbc

9

ES SpringBoot Starter Service Framework

Application ORM Technology migration , Development ES Class ORM frame , Solve the query mapping complexity , Do object-oriented development packaging

10

RPC Framework implementations

Study RPC Framework design and development , Understand the communication principle and implementation

11

Database routing component

Hash algorithm 、 Section treatment 、 Data source switching 、 Custom configuration combined with practice , Developing routing components

12

Redis Simplify the use of encapsulation

Handle Redis The second packaging of , Simplify to interface proxy mode , Reduce application costs , And make it easier to upgrade

13

Distributed task scheduling

In registration 、 Mission 、 Console , Develop distributed task scheduling under multi-party content composition

14

Non intrusion monitoring design ,ASM Bytecode stub

Learn about bytecode instrumentation , Study Javaagent Non intrusive monitoring mode of processing

15

Non intrusion monitoring design ,JVMTI Location code

understand JVMTI Technical ability , Development C++ dll Components , Enhance monitoring capability

16

IDEA Plug in is combined with bytecode stub

combination IDEA Plug in development and bytecode enhancement technology , Collect the execution information in the process of code development and operation , Analyze and improve delivery quality


Pamphlet 16 A middleware implementation , Including test engineering, etc 30 Code base , Each chapter will correspond to the design and implementation of middleware , In order to facilitate readers to quickly and effectively learn the technical content in the booklet , Here is the content structure of the chapters in the booklet , Cover the following 5 Aspect content :

  1. Introduction , In technology 、 Experience 、 Growth and other aspects of the summary of the content , Help you broaden your knowledge and increase your growth experience .
  2. Demand background , Describe the scenarios of this middleware 、 What needs are put forward to solve what pain points .
  3. The project design , Pain points in the context of demand , Do middleware architecture design , Including design draft and implementation description .
  4. Technical realization , It is mainly the implementation of the scheme design , This process will include the complete implementation of the source code and all the core code explanation . Ensure that you can complete the design and development of Middleware in the process of learning .
  5. Test verification , Every middleware implementation has a corresponding test project , for example :whitelist-spring-boot-starter And whitelist-spring-boot-starter-test. The expected verification of middleware is realized through test engineering , It can make it easier for you to understand the background of a requirement 、 Design 、 The process from implementation to delivery verification .
  6. At the end of the paper , It's a summary of each article , It is also a helpful reminder for readers to study this article at the end of the article , I also hope that the information you learn is far more perfect than what you summarize from the perspective of the author .

Four 、 What will you learn ?

  • Spring Loading of configuration files 、Bean scanning 、 Definition 、 Registration, etc.
  • Spring Boot About Starter Common technical means and skills of development
  • ORM、RPC、 Database routing 、 Service governance 、 System monitoring 、IDEA Middleware design in plug-ins and other scenarios
  • Proxy for class 、 Reflection call 、 Section treatment 、 Bytecode stub 、 Perturbation function enhanced hashing and JVMTI And other core technologies
  • 30 A code base allows you to design middleware 、 Realization 、 verification , Have a clear understanding of

5、 ... and 、 Appropriate crowd

  • Have Java R & D personnel of programming foundation , Understand part of the framework source code , All kinds of technology components are often used
  • We need to improve our core technical ability
  • Interested in middleware development , But I don't know where to start
  • Yes SpringBoot Development Starter Technical requirements of

6、 ... and 、 Data learning

  1. 《SpringBoot Middleware design and development 》 Full access to columns and pamphlets undefined Good! , It's with your help 、 Support 、 recognition 、 Encouraging , What you want to see Middleware design and development I'm here to meet you ! It's a growing stage for programmers to break through technical bottlenecks and improve technical cognition , Should understand and learn the content , come on. ! Remember to have any problems with your column , Please contact this excellent man : Little brother Fu , WeChat :fustack
  2. get csdncode The code base ,https://codechina.csdn.net/,30 Group corresponding to a set of code base , You can communicate, discuss and submit at any time issues
  3. You can join the middleware communication group , Add my wechat :fustack remarks : Middleware cluster
原网站

版权声明
本文为[Little brother Fu]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/04/20210401145515301g.html