By using tdwi.org website you agree to our use of cookies as described in our cookie policy. Learn More

TDWI Articles

In-Memory Data Grid or Database: Which Is Right for My Enterprise?

Choosing between these two in-memory options depends on several factors, including speed and reliability requirements. This article helps you understand the functionality and limitations of these technologies and make the best choice for your environment.

As company data grows, the threat of performance and scalability issues becomes more apparent. The name of the game is real-time data, and failure to provide fast and reliable data dooms businesses to a cycle of poor decisions and costly patchwork solutions that fail to improve overall operational efficiency.

For Further Reading:

How In-Memory Databases Have Transformed in the Last Decade

In-Memory Computing and the Future of Machine Learning 

In-Memory Computing for Turbo-Powered Analytics 

Technology offers advancements and innovations that help businesses be more efficient, but businesses still face unpredictable workloads, especially in a market that sees consumers increasing consumption and use of data and applications that seem ideally designed at the start but become inefficient due to scalability issues.

Data is complex, and the goal is to reduce that complexity to increase efficiency and decrease cost. In-memory computing solutions have been available for years, and more enterprises are gradually adopting them for their data processing and scalability functions. The main considerations in choosing a solution that works are speed and reliability.

Businesses need to process large amounts of data each day, and they need to do it quickly. A pressing question when choosing the ideal in-memory platform is: Should you choose an in-memory data grid or an in-memory database? It's important to know the differences so you choose the one that will satisfy your business and computing requirements and work best in your existing architecture.

Why In-Memory Databases?

An in-memory database (IMDB) accelerates data processing by distributing data across multiple computers. Companies developing new applications or re-engineering legacy ones choose an IMDB because it supports data-processing APIs such as key value, ANSI-99 SQL, and machine learning. An IMDB is typically used in systems that don't have a disk drive but require fast data access, manipulation, and storage.

The main advantage of an IMDB over an in-memory data grid (IMDG) lies in its architecture. In an IMDB, the usual three-layer architecture is reduced to two. Fewer layers means fewer moving parts as well as quicker and more efficient data processing. The main challenge with an IMDB is that it's almost impossible to use for existing applications. To do so would mean making significant changes to the data set(s) from existing databases.

Another thing to consider is that an IMDB is a system of record; using one means that enterprises must have a fail-safe in place that protects data in case of downtime. A solution can be similar to a capability of IMDGs called persistent store, which protects data and allows processing against the data set immediately after a system reboot.

Before adopting an IMDB, understand its limitations -- namely, the way it's designed for vertical scalability or adding more resources to an existing node. By comparison, an IMDG is designed to scale horizontally. The problem with vertical scaling is that it will eventually reach a breaking point, limiting future possibilities, especially for web and mobile applications that handle complex queries and concurrent processes. Its cost can also eventually be impractical because continuously scaling the system will require increasingly powerful (and expensive) components.

Why In-Memory Data Grids?

In-memory data grids work by distributing data and workloads across computers within a network. Because it's highly distributed, an IMDG is easy to deploy and a smart option for companies looking to accelerate existing applications and services. Despite its distributed nature, an IMDG has a unified API that allows for accelerated analytics and data expansion. An IMDG also collocates the application and its data in the same memory space, making it a high-throughput, low-latency data fabric able to process data in real time. The ability to process data as it arrives from streaming sources is vital so businesses can process active data or data with ongoing purpose.

An IMDG is cost-effective because it's designed to minimize the number of moving parts in a system by reducing the complexity of data movement and simplifying data governance. The multitiered storage option also allows complete control of data so that hardware costs can be optimized. For companies that use a cloud-based platform, the IMDG is also a suitable solution because it can be deployed on hybrid environments, including in the cloud or on premises.

As mentioned earlier, scalability is a major differentiator when choosing a computing platform; it can mean the difference between an efficient, cost-effective solution and one that is hard to manage and expensive in the long run. Although available memory and CPU are shared across the cluster, each computer has its own data structures and all data is synchronized across the network; system scaling can be simplified down to adding new nodes to the computer cluster.

The high cost of RAM previously limited adoption of IMDG, but this is gradually becoming a non-issue because RAM prices have decreased considerably in recent years. Arguably, the benefits of RAM more than pay for it in the long run because RAM reduces the bottlenecks caused by constant disk access. Companies also have the option to process data against the full data set to address problems with limited RAM capacity. This is also known as the persistent store capability, which helps optimize data so the most frequently used data is stored both in-memory and on disk. Persistent store also allows the amount of data to exceed the amount of memory.

Choosing What's Best for Your Business

Ultimately, the differences between IMDG and IMDB are technical issues. Choosing what works for you will depend on your business needs, your existing system, and what you want your system to do for you.

When developing custom applications, an IMDG will accelerate development of applications that require low-latency data access to critical data. On the other hand, the IMDB will help in the acceleration of online transaction processing (OLTP) and online analytical processing (OLAP). If you're looking for a platform that can manage extremely large amounts of data across hundreds of servers, the IMDG is your smarter option.

About the Author

Edward Huskin is a freelance data and analytics consultant. He specializes in finding the best technical solution for companies to manage their data and produce meaningful insights. You can reach him via email or LinkedIn.


TDWI Membership

Accelerate Your Projects,
and Your Career

TDWI Members have access to exclusive research reports, publications, communities and training.

Individual, Student, and Team memberships available.