Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Is Tomcat middleware?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, I would like to share with you the relevant knowledge of Tomcat as middleware. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

Brief introduction of Middleware

When it comes to middleware, the first thing that comes to mind is message middleware, but what about message middleware? In fact, we come into contact with too many middleware in our daily development. Let's take a look at a Wikipedia introduction:

Middleware (English: Middleware), which also translates middleware and intermediary layer, is the software that provides the connection between the system software and the application software, so as to facilitate the communication between the software components. It is widely used in modern information technology application frameworks such as Web services, service-oriented architecture and so on. Such as database, Tomcat of Apache, WebSphere of IBM, WebLogic application server of BEA, Tong series middleware of Dongfang Tong, and Kingdee all belong to middleware.

You may be surprised to see this, because we have used so many middleware before we know it. Even Tomcat is a middleware!

Middleware, as the name implies, is something connected between two software, is a glue between the software, a glue-like thing. It is located between the operating system and our applications, allowing developers to easily handle communications, input and output, so that developers can focus on their own business logic development.

In this way, it seems that Tomcat does look a bit like middleware! Located between our operating system and applications!

Middleware classification

There are many middleware. As early as 1998, IDC divided middleware into six categories. In domestic books related to middleware published before 2005, many of them are classified according to these six categories. They are:

Terminal emulation / screen conversion

Data access Middleware (UDA)

Remote procedure call middleware (RPC)

Message middleware (MOM)

Transaction Middleware (TPM)

Object middleware

With the exception of message middleware and transaction middleware that you may have heard of, other middleware is rarely heard of here, because times are changing, and some middleware is gradually eliminated (such as terminal emulation / screen conversion middleware). Some are slowly merged into other frameworks (such as remote procedure call middleware).

Database middleware

So what is database middleware?

As we mentioned in the previous article, if the amount of data is relatively large, we need to divide the data into databases and tables. After that, the data that originally existed in one database will now exist in multiple databases. So our project structure may look like this:

We need to configure complex multiple data sources in the Java code, configure the separation of read and write, and preprocess the data when querying, for example, the data loaded from multiple DB must be sorted, filtered and so on. In this way, our Java code is mixed with a lot of business-independent methods, and most of these codes are repeated.

To get developers to focus more on the business, let's introduce database middleware, like this:

This picture vividly illustrates what middleware is! Something between two applications. After the introduction of MyCat middleware, our application will only need to connect to MyCat, and then MyCat will operate a variety of different DB. Sorting, result set merging, data filtering and other operations of each distributed database are completed in MyCat, so that our Java application can focus on business development again, and those tedious and repetitive operations will be handed over to MyCat to complete.

If there is no database middleware, then our Java application will directly face many problems such as sharding cluster, data source switching, transaction processing, data aggregation and so on. So the Java application, which is supposed to focus on business, will spend a lot of work to deal with the problems after sharding, and most of the code is repetitive!

With database middleware, applications only need centralized and business processing, and a large number of general data aggregation, transactions, and data source switching are handled by middleware, and the performance and processing capacity of middleware will directly determine the reading and writing performance of the application. So it is very important to choose a good database middleware in the project.

These are all the contents of the article "is Tomcat middleware?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report