Skip to main content

In-memory data model with Apache Gora

Open source in-memory data model and persistence for big data framework Apache Gora™ version 0.3, was released in May 2013. The 0.3 release offers significant improvements and changes to a number of modules including a number of bug fixes. However, what may be of significant interest to the DynamoDB community will be the addition of a gora-dynamodb datastore for mapping and persisting objects to Amazon's DynamoDB. Additionally the release includes various improvements to the gora-core and gora-cassandra modules as well as a new Web Services API implementation which enables users to extend Gora to any cloud storage platform of their choice.
This 2-part post provides commentary on all of the above and a whole lot more, expanding to cover where Gora fits in within the NoSQL and Big Data space, the development challenges and features which have been baked into Gora 0.3 and finally what we have on the road map for the 0.4 development drive.

Introducing Apache Gora
Although there are various excellent ORM frameworks for relational databases, data modeling in NoSQL data stores differ profoundly from their relational cousins. Moreover, data-model agnostic frameworks such as JDO are not sufficient for use cases, where one needs to use the full power of the data models in column stores for example. Gora fills this gap by providing an easy-to-use in-memory data model and persistence for big data framework with data store specific mappings and built in Apache Hadoop™ support.
The overall goal for Gora is to become the standard data representation and persistence framework for big data. From a development point of view, this challenge however comes in many shapes and sizes and in many flavors, some of which we discuss shortly. For the time being however lets consider the following  (founding) goals for Gora as a top level project within the Apache Software Foundation. Gora aims to provide:
·         Data Persistence : Persisting objects to Column stores such as Apache HBase™, Apache Cassandra™, Hypertable; key-value stores such as Voldemort, Redis, etc; SQL databases, such as MySQL, HSQLDB, flat files in local file system of Hadoop HDFS;
·      Data Access : An easy to use Java-friendly common API for accessing the data regardless of its location;
·      Indexing : Persisting objects to Apache Lucene and Apache Solr indexes, accessing/querying the data with Gora API;
·      Analysis : Accesing the data and making analysis through adapters for Apache Pig, Apache Hive and Cascading;
·      MapReduce support : Out-of-the-box and extensive MapReduce (Apache Hadoop™) support for data in the data store.
In terms of where the Gora community is relative to the above, there are currently data store implementations for the distributed key/value store Apache Accumulo, data serialization system Apache Avro, column family data store Cassandra, distributed big data store HBase, the HDFS and now Amazon's DynamoDB.

One underlying formality which has come apparent when attempting to provide a common persistence layer for all of the above data stores (and more), is that the NoSQL and Big Data communities are moving extremely quickly. As expected, communities and consequently code bases also move in myriad of directions meaning that an overwhelming practical hurdle involves keeping up with the rush. The NoSQL space in particular is young and has such experienced astronomical growth in recent years with the best open source products being the ones which have ridden the wave. It is however important to consider that the NoSQL storage abstraction space is even younger, consequently Gora (being the leading open source ASLv2 licensed NoSQL storage abstraction product) is evolving in parallel. By nature the Gora community is diverse in its entirety and the product reflects this entirely. In the second part of this post we provide somewhat of a deep dive covering both the goodies and the technical challenges we encountered during the development of Gora 0.3.

2nd part of the post:

About the Authors:

Renato Marroquin is a Computer Science Master by the Pontifical University of Rio de Janeiro with the thesis titled "Experimental Statistical Analysis of MapReduce Jobs". He is currently a Computer Science Professor at Universidad Catolica San Pablo in Arequipa, Peru and also an Apache Gora PMC Member and Committer, Open Source and Big Data Enthusiast.

Lewis John McGibbney holds his PhD in Legislative Informatics from Glasgow Caledonian University in Glasgow Scotland. He is currently a Post Doctoral Research Scholar at Stanford University, CA ,a member of the Apache Software Foundation and Apache Committer at several Apache projects including Gora where he is VP.


  1. How does it stand up with SAP HANA?

  2. Hi Kerry,
    To answer your question directly... we do not currently have such figures. Additionally, I have not seen any benchmarks of Hana against other solutions currently within the commercial marketplace so for us to benchmark our in-memory computing against Hana would be something new indeed!

    A little bit more commentary from me though. From what I understand, SAP Hana focuses solely on in-memory computing and processing. In-memory computing in Gora is merely one aspect of the framework which we (predominantly) use for testing. The in-memory store fundamentally consists of a TreeMap which extends the core Gora API to allow get(K key, String[] fields), put(K key, T object), delete(K key) and deleteByQuery(Query query) operations. As with TreeMap delete operations in MemStore provide guaranteed log(n) time cost.
    We are working on concurrency with this store and there is more work to be done but we are getting there :0)

    I hope this gives a bit more substantial info on MemStore. If you have some more questions, please feel free to head over to

  3. Please feel free to post any comments on this article here or alternatively on Thank you

  4. Thanks for explaining this across. Looks useful


Post a Comment

Popular articles

5 online tools in data visualization playground

While building up an analytics dashboard, one of the major decision points is regarding the type of charts and graphs that would provide better insight into the data. To avoid a lot of re-work later, it makes sense to try the various chart options during the requirement and design phase. It is probably a well known myth that existing tool options in any product can serve all the user requirements with just minor configuration changes. We all know and realize that code needs to be written to serve each customer’s individual needs. To that effect, here are 5 tools that could empower your technical and business teams to decide on visualization options during the requirement phase. Listed below are online tools for you to add data and use as playground. 1)      Many Eyes : Many Eyes is a data visualization experiment by IBM Research and the IBM Cognos software group. This tool provides option to upload data sets and create visualizations including Scatter Plot, Tree Ma

Data deduplication tactics with HDFS and MapReduce

As the amount of data continues to grow exponentially, there has been increased focus on stored data reduction methods. Data compression, single instance store and data deduplication are among the common techniques employed for stored data reduction. Deduplication often refers to elimination of redundant subfiles (also known as chunks, blocks, or extents). Unlike compression, data is not changed and eliminates storage capacity for identical data. Data deduplication offers significant advantage in terms of reduction in storage, network bandwidth and promises increased scalability. From a simplistic use case perspective, we can see application in removing duplicates in Call Detail Record (CDR) for a Telecom carrier. Similarly, we may apply the technique to optimize on network traffic carrying the same data packets. Some of the common methods for data deduplication in storage architecture include hashing, binary comparison and delta differencing. In this post, we focus o