DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

Geode


Apache Geode is an open-source, in-memory distributed database designed to support transactional applications with the demand for low latency and high concurrency.[04][05]

Country of Origin
US
Start Year
2015 [22][23]
Former Name
Gemfire
Project Type
Open Source
Written in
Java
Supported Languages
C#, C++, Groovy, Java, Python, Scala
Derived From
Tanzu GemFire
Compatible With
Memcached, Redis
Operating System
All OS with Java VM
License
Apache v2

Database Entry

Geode


Apache Geode is an open-source, in-memory distributed database designed to support transactional applications with the demand for low latency and high concurrency.[04][05]

History[05][06][07]


Geode was first developed by GemStone Systems in 2002 under the name "GemFire" and used in financial services providers including major Wall Street banks. In 2010, GemStone Systems was acquired by VMWare. In 2013, Pivotal was spun out of VMware and took GemFire with it, and in 2015 they outsourced the project to Apache Incubator as "Geode". Finally, in November 2016, the Apache Software Foundation (ASF) announced that Apache Geode has graduated as a Top-Level Project (TLP).

Compression[08]


By default, Geode supports Snappy compressor, and users are allowed to use their customized compressor by region. When compression is enabled in a region, all the values in memory will be compressed, and they will be decompressed when they are read from the cache.

Concurrency Control[09]


For a partitioned region, all the updates on a specific key will be routed to the primary Geode member serializable.

For a replicated region, as long as a member hosts the region, it can update the key and propagate it to other members. The consistency is retained by storing the version stamp and the Geode member ID which last updated the entry in each entry of a region. The version stamp will get incremented each time an update for that entry appears. When an update message is received, the Geode member/client will compare the version stamp of the update message to the one in the local cache. If the former one is larger, the member/client will perform the update and update the version stamp information. When the update message has the same version stamp as the local cache, the one with the higher member ID will be kept. The concurrency control of non-replicated regions and client cache is similar to the way in replicated regions.

Data Model[10][05]


In a Geode distributed, system, caches are defined as an abstraction that describes the node of the in-memory storage for the data. Each cache contains regions, which data is stored in the form of key-value pairs. So caches are similar to the construct of databases and regions are similar to tables in a relational database.

Foreign Keys[11][12]


Although Geode doesn't support foreign keys, it provides a similar function called data colocation to store related data entries that have the same ID from different data regions into one single member. For example, the Geode system contains one customer records region and one customer orders region and they are related to each other through the customer.

By using colocation, users can maintain all records and orders information for a customer in a cache of a single member, which will be used by all operations regarding this customer only.

Indexes[13][14][15]


Geode uses hashCode() on the key to mapping a data entry to a specific position in the region, and the key is hashed by a fixed number of buckets.

Isolation Levels[16][17]


Geode supports repeatable read isolation. By default, the transactions are isolated at the thread level. So other threads can't see the changes made by one thread of a transaction until the commit begins. But after the commit begins, in the cache the partial results of the transaction are now visible to threads who visit the changing data, which could lead to dirty reads.

Users can prevent dirty reads and acquire a strict isolation model by setting "-Dgemfire.detectReadConflicts=true".

Logging[04]


Geode uses write-ahead-logging.

Query Interface[18][19]


Geode supports Object Query Language (OQL) to query region data. Although OQL and SQL share many syntactical similarities, they differ a lot, such as OQL doesn't support aggregation functions, it supports querying on complex object graphs, and by default, OQL queries on the value of the region rather than the key, etc.

Geode also supports query index hints to filter on the specified index by adding "" at the beginning of the select query.

Storage Architecture[20]


Geode follows the in-memory data grid (IMDG) outline. But it also has a disk store module to deal with data overflow and persistence. With the disk store, users can export data to disk when memory usage becomes too high or to persist data as a backup copy.

System Architecture[01]


Geode is designed in the shared-nothing architecture in order to have low latency and high concurrency performance.

Views[21]


Citations

23 sources
  1. http://geode.apache.org apache.org Dead — Check Archive
  2. http://geode.apache.org/releases apache.org Dead — Check Archive
  3. Overview (geode-core 2.0.0 API) apache.org
  4. Apache Geode — Performance is key. Consistency is a must. apache.org
  5. ApacheConBigData - Introducing Apache Geode - final.key linuxfound.org
  6. Apache Geode Spawns ‘All Sorts of In-Memory Things’ thenewstack.io Dead — Check Archive
  7. The Apache Software Foundation Announces Apache® Geode™ as a Top-Level Project - The ASF Blog apache.org Dead — Check Archive
  8. https://geode.apache.org/docs apache.org
  9. Consistency Checking by Region Type | Geode Docs apache.org
  10. Index - Geode - Apache Software Foundation apache.org
  11. Understanding Custom Partitioning and Data Colocation | Geode Docs apache.org
  12. Colocate Data from Different Partitioned Regions | Geode Docs apache.org
  13. https://gemfire.docs.pivotal.io/99/geode/basic_config/data_entries_custom_classes/managing_data_entries.html pivotal.io Dead — Check Archive
  14. Managing Data Entries | Geode Docs apache.org
  15. FAQ - Geode - Apache Software Foundation apache.org
  16. Adherence to ACID Promises | Geode Docs apache.org
  17. Design Considerations | Geode Docs apache.org
  18. Using Query Index Hints | Geode Docs apache.org
  19. Querying with OQL | Geode Docs apache.org
  20. Disk Storage | Geode Docs apache.org
  21. #GeodeSummit - Where Does Geode Fit in Modern System Architectures | PDF slideshare.net
  22. Open Sourcing GemFire - Apache Geode | PPTX slideshare.net
  23. Announcing Apache Geode Milestone Releases 1.0.0-incubating M1 & M2 – Seeking Testers | Blogs Archive apache.org Dead — Check Archive
Revision #28 Last Updated: