Database is dead

Source: Internet
Author: User
Tags microsoft sql server server memory ruby on rails linux

The main difference between modern software and traditional software is: Modern software is based on internet internet technology, operating in an open network environment, unlike traditional software just running in a closed LAN, the difference between the operating environment determines the number of users of the software operation, in an open Internet environment, Your software system users are growing, especially those who are open to all groups of community web systems, but also bear unprecedented access to the load. So, what are the main areas of the software that are under pressure from these software systems? If you use traditional software design ideas, then no doubt the pressure is concentrated on the database.

As users explode, you wake up one morning and you find that the database is dead.

Traditional software system should be called Database software system, is a database system, the development of such a system is very simple, the cost is very low, as long as the need to design the data table structure, and then, to find some college graduates write a large number of SQL statements, although also using java/php/. NET and other languages, but in fact these languages just send SQL to the database to carry out the transport workers, there is no value and status.

Therefore, such a system running in the Internet environment, the main load on the database in the SQL operation, that is to say: The entire software system performance key points on the database, the database is the performance of the protagonist, is the king; Although you bought expensive websphere/ WebLogic and other application servers, but because Java is just a transport worker, it does not have the function of load-sharing.

The famous Community web site MySpace is because of a good idea, the user grew wildly, but the system is not smooth to bear the growth of user access, these users visit the Web site slow, inaccessible or even lost data, they after several bones architecture upgrades, with Microsoft SQL Server Direct Technical support , it was hard to cope with the past. Look at their painful experiences, do you want to do it again? Detailed information: http://www.jdon.com/jivejdon/thread/34601.html

From this, we can see that the database performance fine-tuning and tapping potential is always limited, the database performance optimization to improve the pace of high-performance can never keep up with the user growth, some people also put forward the concept of database cluster, in fact, the database cluster is a deceptive concept, generally just backup, in the number of clusters and failover Database giant Oracle will not go to the Java EE camp to flag the flag, also launched the first EJB3 server, and threatened to buy Java EE past boss Bea Weblogic.

It is clear that the database has become the main performance bottleneck for software systems, relying solely on the database to help themselves does not work, is to declare the database exit protagonist time, then who will announce: The Pope database is dead? is undoubtedly java.

The Java community earlier this century introduced the concept of middleware to replace the status of the database, in fact, is to transfer the main software system load from the database to the middleware server to share the load. In other words: the Java community says that since the database has become a bottleneck, tinkering is no good, so give it up and stop relying on it.

That is to say: Java no longer do SQL transport workers, is no longer a role, but the protagonist, then how to make Java the protagonist? That must rely on the concept of objects, the object is living in the middleware server memory, it is the business encapsulation of database data, it and the database has countless relations, but it and relational database there are natural contradictions, the two are incompatible.

In the past, we put business logic into SQL into the database execution, causing the database to become the main operational bottleneck of business logic, then, if we put the business logic in the object concept, rather than SQL, then our business logic around the object in memory, so that the load is not concentrated in Object running on the middleware server (i.e. Application server Weblogic/websphere/jboss/tomcat)? and object/Middleware is expressed in the Java language, no doubt, such a framework, Java has become the protagonist.

Further think: If we start from the beginning of the software system, the use of object analysis design, not with the database, the entire process is completely oo, analysis and design until the code has been freed from the impact of the database, this process is as follows:

Analysis Modeling Refinement design (through Evans DDD) architecture Design Code Implementation Debug test Deployment run.

So when is the database established? The creation of database table structure can be deferred to the deployment runtime, automatically implemented by ORM technology such as HIBERNATE/EJB CMP/JPA. Thus, the entire upstream link does not involve the database technology, but uses the more natural expression Oo way, the software quality is higher. I've already had a lot of detail on the J Road site from OO analysis to the OO implementation process, including my Jdon framework that directly supports such a natural approach.

Now, a lot of people have understood that analysis design to use OO, but the database is running phase is not enough, indeed, this is the right point of view, we seize the throne of the database, not to knock it down, but a rational and peaceful transfer of power center of gravity just, the database out of the lead status, It also heralds the end of the era when the database was king, but the database, like the operating system, becomes an indispensable and essential part of our modern software system.

It is based on the fact that, although I shouted "the end of the database Era" in 2005, the text of hundreds of posts, most of which is skepticism, unbelief, it can be seen that, due to traditional views and not timely and international new ideas synchronized, domestic database loyalist still has a considerable number. I banq two-bit, throwing these ideas out of the royalist cynicism, and looking at a view of the famous ORM framework Hibernate and seam framework founder Gavin King:

In almost all enterprise applications, the database is the primary bottleneck, and the least scalable the tier Environment. The database has become the main bottleneck in most enterprise applications, and it has become the least scalable layer in the running environment. ... Php/ruby users will say that nothing is shared (share) architecture still has a good scalability, .... What these fools really want is a "schema that does not share anything but the database (Share nothing except for the"). See more here

The so-called scalability, is elasticity, the entire software architecture to support both small load operation, but also support the large load support, as long as the server can be added; Since the software system load has been transferred from SQL to an in-memory object, we can increase the number of these application servers through distributed computing and even cloud computing, To achieve business objects in multiple application server transfer sharing, without the link through the database, not only to reduce the database load, but also easy to expand performance, do not have to focus on the main test mainframe road, as long as the purchase of Low-cost PC server can. After the authoritative test: websphere/weblogic 20 PC server cluster performance is no less than a SUN/IBM medium-sized machine, cost-effective has been at a glance.

The advantage of the cluster of Java EE servers in relation to operating system clusters such as Linux is that the Java EE cluster can cluster on a specific business function with a busy load, in other words: to be precise guidance, to solve problems accurately, and obviously, The Linux operating system cluster is not up to the core of the business.

On the other hand: while PHP is now claiming to be on the subject line, Ruby's rails are starting to go into the enterprise, but their environment is actually dependent on the database, especially Ruby on Rails is the best fit for the Evans ddd object modeling route, but for now it's still "wolf in sheep's clothing", The DDD is in fact a database center. Of course I believe that ROR will provide a distributed computing environment in the future, but Java EE in the 2002 through EJB and distributed cache mature stable delivery of distributed computing middleware, and has been a large number of mature applications.

Before the end of this article, I believe you understand that in many language platform competition, why Java can beat the past champion database, won the new champion, and his characteristics. Someone might say: you forgot to talk. NET, this do not need me to answer you, with Microsoft China Chairman Zhang Answer: 8 years ago. NET strategy is naïve, would you rely on a naïve, immature technology for computing your important business enterprise? Unless you are naïve:.

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.