Java's persistent application in grid: Integration approach (i)

Source: Internet
Author: User

The Java Persistence API (JPA) is an enterprise-class standard for accessing Java relational data. JPA provides support for mapping Java objects to database diagrams, including a simple API design and query language expression, which is expressed to retrieve results from database mappings, and to change receipts for this result. JPA improves productivity for developers by writing and maintaining their own mapping code, allowing the existence of a single API regardless of platform, application server, or providing lasting execution. These cache solutions allow for frequent access to the entity to memory, reducing the number of database queries and the amount of processing time spent on converting database query results to objects. Caching can have an in-depth positive impact on application.

JPA and data grids

Data grids are software that runs on a typical, Low-power hardware cluster, supporting data storage and processing services. Data Grid products aggregate the ability to handle energy and storage cluster services, allowing clients to use it through APIs, which are designed to protect against the complexities of distributed computing. Data grids are widely used as scalable distributed storage; However, distributed data processing is a common feature. As a memory, the data grid provides a way to go beyond a single server because of the stack size limit, the solution is to access all cluster servers through distributed data.

Although their application in the field of professional technology is limited. But in today's enterprise applications, data grid-related topics are still emerging. Data grids have become a mainstream, and when developing applications, developers need to consider the grid architecture and realize that in the future, the proportion of grid applications will be increased.

Consider a banking system that processes deposits and revokes requests by confirming all items before writing to the database. The confirmation may include the validity of the account, whether the request was made by the head of the household, the amount of deposit requested by the householder in the account, and so on. As you can imagine, there are a lot of places to be identified in such a system. You need to read the sum of the data from the database, and the sum of the data is important to perform a single request for confirmation, and it can cause a lot of queries. Fortunately, creating such a database-centric application in JPA is very simple. Draw every Classe in the field to the database, and write the necessary JP QL queries to retrieve the confirmed objects. The system may have to read a lot of data from the database to handle each request, but it works well.

Now, if we need to significantly improve the productivity of this system, we have to address its only but biggest bottleneck: identifying data by querying the database. Most JPA executions do not provide a L2 storage capability, or support the consolidation of Third-party L2 storage capabilities. However, if we have to deal with a large number of random arrival requests, it is not possible to have the necessary reference data in memory. Memory is very effective in your repeated access to some data. If you are accessing random data, storage is unlikely to store the data you need immediately. Of course, you can constantly increase the capacity of the memory to meet your needs, but each server can only have so many stacks.

The data grid provides a way to transcend the limitations of a single server due to stack size and to distribute storage objects on a clustered server. The challenge now is to integrate data grid technology with JPA to improve productivity without having to completely rewrite the application. Of course, as a representative case of software systems, there are many cases close to integration, each with their own advantages and disadvantages. Let's look at the integrated architecture and how we should use it.

Data grid as intermediate level object storage

As we mentioned earlier, a data grid product can extend storage, access a cluster, and be used as a shared intermediary store. They provide a single logical stack that can be extended from the physical level, with all storage capacity implemented on multiple servers, all of which include the stack of all clustered servers. In the example, this means that by adding more servers to the grid, its storage capacity can be increased, and the point is that all validation data must be preloaded (usually "heated" storage). Since acknowledging that data access has become our bottleneck, accessing all the necessary data actually eliminates the problem.

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.