Architecture of different products related to Java applications (1)

Source: Internet
Author: User

Architecture of different products related to Java applications (1)

When we build a system, we usually need to consider how to interact with other systems. Therefore, we need to first know how various systems interact and what technology is used for implementation.

1. Interaction between different systems and different languages

Now we commonly use WebService and Http requests for interaction between different systems and different languages. WebService, or "Web service", is abbreviated as WS. Literally, it is actually a "Web-based service ". The service is provided by both parties. If there is a service demand side, there will be a service provider. The service provider publishes services externally, and the service demander calls the Services published by the service provider. To be more professional, WS is actually a tool built on the HTTP protocol to implement heterogeneous system communication. That's right! WS is based on the HTTP protocol. That is to say, data is transmitted over HTTP. We first used CXF to develop the SOAP service to implement WS, followed by the REST service to implement WS (which is currently used a lot and most frequently used ). REST services can also be developed based on CXF. However, springMVC or other MVC frameworks are generally used to implement REST services.

However, many people think that Web services generally refer to various XML-based interaction technologies led by IBM more than a decade ago. Currently, few companies are using them. In a broad sense, Webservice is a Web service, and everything is a service.

2. Interaction between different systems in the same language

RPC (Remote Procedure Call) or RMI (remote method call) is used for common interaction between different systems in the same language, and external services are not required, of course, the above can also be used for interaction between the same language, but I usually use RPC.

Architecture of different products

3. Architecture Evolution of a single product

Generally, we only have a product architecture evolution. If we need to provide external WebServices, we usually use REST services.

The following content comes from zhihu

1) evolution of distributed architecture System Architecture Evolution History-Initial Stage Architecture

In the initial stage, all resources such as small system applications, databases, and files are stored on one server.

Features: all resources such as applications, databases, and files are stored on one server.

Description: linux is usually used for server operating systems, applications are developed using PHP, and then deployed on Apache. Mysql is used for databases, by bringing together a variety of free open-source software and a cheap server, you can start the development of the system.

2) evolution of system architecture-separation of application services and data services

It is not a long time, and it is found that as the system traffic increases again, the pressure on the webserver machine will rise to a relatively high level during the peak period. At this time, we began to consider adding a webserver.

Features: applications, databases, and files are deployed on independent resources.

Description: as the data volume increases and the performance and storage space of a single server is insufficient, applications and data must be separated, and the concurrent processing capability and data storage space must be greatly improved.

3) evolution of system architecture-using cache to improve performance

Features: a small portion of data in the database is stored on the cache server, reducing the number of database accesses and reducing the database access pressure.

Description: system access features follow the 80% law, that is, 20% of business access is concentrated on of data. Cache can be divided into local cache and remote distributed cache. Local cache access is faster, but the cache data volume is limited, and there is a situation of contention with applications for memory.

4) evolution of system architecture-using Application Server Clusters

After database and table sharding, the pressure on the database has been reduced to a relatively low level. Then, I began to live a happy life of daily traffic surge. suddenly one day, it is found that the system access has started to slow down again. At this time, first check the database, the pressure is normal, and then check the webserver. It is found that apache has blocked many requests, the application server is also relatively fast for each request. It seems that the number of requests is too high, resulting in waiting in queues and slow response.

Features: multiple servers provide external services through Server Load balancer to solve the problem of processing capacity and storage space ceiling of a single server.

Description: cluster is a common solution to high concurrency and massive data problems. By appending resources to the cluster, the system's concurrent processing capability is improved, so that the load pressure on the server is no longer the bottleneck of the entire system.


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.