Java Project Framework Build series (Java learning route)

Source: Internet
Author: User
Tags rabbitmq

Objective:

has been working for 4 years, really time flies.

In fact, when you work in a company for a year or two, the basic use of the development framework used by the company should be yours.

You will copy the project B based on an existing project, build another similar framework, and then develop the business logic on Project B.

If you work harder, you may have to explore some of the functions of the configuration, and some troubleshooting will be more experienced and your own ideas.

If you are more curious, you may be able to understand some of the principles of the framework and how the frameworks help each other work. Can you concatenate the frames from scratch.

Want to write a series of such articles: the Java project development process of some of the framework, how to series together step by step, and combined with the source code to explore its core part of the principle. And the evolution of projects from small projects to large projects requires development frameworks and structural changes. and specific business scenario designs. Please see below for details.

About the development framework and tools used:

Basic tools: Eclipse, Maven, Tomcat

Front end: Jquery, Vue.js, Element

Background core framework: Spring, SPRINGMVC, MyBatis

Background Auxiliary framework: Log framework Logback, security framework Shiro, task scheduling framework Quartz

Distributed framework: Dubbo, RabbitMQ, Redis .......

In addition to these frameworks are some specific business scenarios, as well as high-scale high-availability architecture evolution processes and so on.
Mainly divided into the following three stages of the blog outline.

Phase one: Centralized basic architecture

Basic tools: Eclipse, MAVEN, Tomcat (this does not blog, about Maven Ape friends can install their own online tutorials and blogs)

Spring Introduction and exploration: mainly relies on injection and the principle of AOP, spring use mostly configuration-oriented, so from the configuration, combined with the source code to explore its principles.

Third, Springmvc: To start with examples, combined with the source code to explore its main principles.

Four, Mybatis: To start with examples, combined with the source code and the extension of the page plug-in exploration of its usage and principles.

Five, the log framework Logback: Combined with instances, configuration, source to understand its principles, and the Logback package, so that more in line with the actual business needs.

Six, the front-end framework vue.js+element use, jquery default ape friends have been used.

Vii. Security Framework Shiro: The main login and authorization authentication examples, explore its usage.

Eight, task scheduling framework Quartz: Instance + configuration + source code exploration usage and basic principles.

Nine, asynchronous thread pool usage and business scenarios.

X. Database transaction examples and application scenarios

Xi. Ehcache Local Cache instance and application scenario.

The stage is called a centralized basic architecture, because this structure is suitable for front-end code, the background code in a project, deployed to a server inside. The problems are: performance problem, project is very bloated, the risk is very big, not good iteration.

Of course, performance problems can be clustered by deploying to multiple machines and then diverting to different machine responses based on the IP that the user accesses. Most Web projects currently use this approach.

But once the business and function modules are more up, need to quickly iterate, the module must be split. Therefore, the distributed architecture must be used.
Distributed architecture generally according to the function of the partition module, e-commerce as an example: the external Web side of a module, management web side, commodity backstage a module, order payment backstage, such as a module, user information backstage a module. The distributed caching framework is also required for asynchronous communication through the interface service between the modules, and for the caching through the MQ mode.

Let's look at the blog outline for stage two.

Phase II: Highly scalable, high performance, highly available, fast iterative distributed architecture

First, the Distributed Service Framework Dubbo: The main example and the principle exploration.

Second, log water transmission: Let the same request through the multiple modules of the log water consistency.

Third, the distributed message Framework RABBITMQ: Instance + configuration + source to understand its principle.

Iv. Task Scheduling Framework Quartz Transformation: The job task of all modules is centrally managed and triggered in the form of a service invocation.

V. Distributed Cache Framework Redis: understand the principles and specifications used, each module defines the system code, shared cache memory resources, but the system code is isolated.

Six, front-end separation: The performance and user experience of the Web module is a high-end separation, the front-end module is all static resources, the deployment of static resource server, and controller split.

Seven, session sharing: Before also mentioned according to the function partition module, multiple Web modules to provide external request corresponding, then will involve session sharing, one login can. The main use of Tomcat-redis technology to achieve session sharing.

VIII. OAuth2.0 Certification and authorization: This is the way to expand external cooperation channels, such as authorizing external merchants to obtain your user information. such as the public number is this practice, many can use login and QQ login is also this practice.

Nine, packaging commonly used business Tools class: such as batch import and export, FTP upload and download files, JSON processing and so on.

Ten, the framework integration part of the extraction form a basic framework: this is very meaningful, can simplify the configuration, upgrade the framework and so on.

Phase three: Adapting big data, high concurrency, and automation requirements (probably more operational)

First, log monitoring, automatic alarm: The error log by mail or SMS to the corresponding developers, can play a very good reminder role.

Second, automated deployment and continuous integration: more modules, the deployment of the line becomes more frequent, you need to simplify the deployment process.

Iii. Agent and load Balancing & clustering: According to phase two, the general Web project is offload via IP, and the backend can use Dubbo load balancer.

Iv. Resource Server Setup

V. Data read and write separation

Six, sub-database sub-table

Seven, second kill design

Viii. use of non-relational databases

Ix. use of Big Data tools

I have a public number that often shares some of the dry stuff related to Java technology, and if you like my share, you can use the search for "Java leader" or "Javatuanzhang" for attention.

Java Project Framework Build series (Java learning route)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.