In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "is Tomcat middleware?". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
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.
This is the end of the content of "is Tomcat middleware?". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.