Integrate Distributed Data Grids With Database Servers
Step No. 2: Integrate the distributed data grid with database servers as part of an overall storage strategy
Of course, distributed data grids are used to complement and not replace database servers, which are the authoritative repositories for transactional data and long-term storage.
For example, in an e-commerce Website, a distributed data grid would hold shopping carts to efficiently handle a large workload of online shopping traffic. Meanwhile, a back-end database server would store completed transactions, inventory and customer records.
The key to integrating a distributed data grid into an enterprise application's overall storage strategy is to carefully separate application code used for business logic from other code used for data access. Distributed data grids naturally fit into business logic, which usually manages data as objects. This code is also where rapid access to data is needed, and that's where distributed data grids provide the greatest benefit. In contrast, the data access layer typically focuses on converting objects into a relational form (or vice versa) for storage in database servers.
Interestingly, a distributed data grid can be integrated with a database server so that it can automatically access data from the database server if it's missing from the distributed data grid. This is very useful for certain types of data such as product or customer information (which is kept in the database server and just retrieved when needed by the application). However, most types of fast-changing, business logic data can be kept solely in a distributed data grid and never be written out to a database server.