An Open-Source Object-Graph-Mapping Framework for Neo4j and Scala: Renesca

The usage and application of graph databases is increasing. Many research problems are based on understanding relationships between data entities. This is where graph databases are powerful. Nevertheless, software developers model and think in object-orie

  • PDF / 332,680 Bytes
  • 15 Pages / 439.37 x 666.142 pts Page_size
  • 69 Downloads / 187 Views

DOWNLOAD

REPORT


Human-Computer Interaction Center, RWTH Aachen University, Campus Boulevard 57, Aachen, Germany {dietze,calero-valdez,ziefle}@comm.rwth-aachen.de 2 RWTH Aachen University, Aachen, Germany [email protected] Learning Technologies Research Group, RWTH Aachen University, Ahornstr. 55, Aachen, Germany {greven,schroeder}@cs.rwth-aachen.de

Abstract. The usage and application of graph databases is increasing. Many research problems are based on understanding relationships between data entities. This is where graph databases are powerful. Nevertheless, software developers model and think in object-oriented software. Combining both approaches leads to a paradigm mismatch. This mismatch can be addressed by using object graph mappers (OGM). OGM adapt graph databases for object-oriented code, to relieve the developer. Most graph database access frameworks only support tablebased result outputs. This defeats one of the strongest purposes of using graph databases. In order to harness both the power of graph databases and object-oriented modeling (e.g. type-safety, inheritance, etc.) we propose an open-source framework with two libraries: (1) renesca, which is a graph database driver providing graph-query-results and changetracking. (2) renesca-magic, a macro-based ER-modeling domain specific language (DSL). Both were tested in a graph-based application and lead to dramatic improvements in code size (factor 10) and extensibility of the code, with no significant effect on performance. Keywords: Graph databases Object-graph-mapper · OGM

1

·

Scala

·

Neo4j

·

REST API

·

Introduction

An increasing amount of today’s applications uses graph-based data structures. Social Network Analysis [1], bibliometrics [2], biomedical data [3], recommender The framework is available at https://github.com/renesca/. c IFIP International Federation for Information Processing 2016  Published by Springer International Publishing Switzerland 2016. All Rights Reserved F. Buccafurri et al. (Eds.): CD-ARES 2016, LNCS 9817, pp. 204–218, 2016. DOI: 10.1007/978-3-319-45507-5 14

An Open-Source Object-Graph-Mapping Framework for Neo4j and Scala

205

systems, and neural networks are just some of the research fields that use graphbased data structures (e.g. railroad-planning [4], remote sensing [5]). Even software development itself can benefit from the power of graph databases [6]. Graph databases differ from other forms of databases as they rely on graph-based data storage internally. This comes with the benefit of naturally modeling data that derives meaning from structure and relations. Another benefit of graph databases is their performance in local search tasks that are based on relationships of the stored data. This is particularly helpful when using social network data [7]. On the other hand a lot of software development today is done using the object-oriented software paradigm. Object-oriented modeling and programming allows an intuitive organization of code as it allows the developer to think in object terms that are natural to the human mi