GithubHelp home page GithubHelp logo

xingkaij / redis-janusgraph-storage-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diegopacheco/redis-janusgraph-storage-backend

0.0 1.0 0.0 46 KB

Redis Storage Backend for JanusGraph

License: Apache License 2.0

Java 100.00%

redis-janusgraph-storage-backend's Introduction

Redis Storage Backend for JanusGraph

JanusGraph is a highly scalable graph database optimized for storing and querying large graphs with billions of vertices and edges distributed across a multi-machine cluster. JanusGraph is a transactional database that can support thousands of concurrent users, complex traversals, and analytic graph queries.

janusgraph-redis is an initial and non-optimal implementation of a Redis JanusGraph storage backend.

Getting started

See janusgraph-examples’s README for instructions to build and run the example adapted from JanusGraph’s.

Features

  • Unordered Scan
  • Ordered Scan
  • Multi Queries
  • Batch Mutations
  • Optimistic Locking

Does not currently support locking nor transactions.

Implementation

Implements KeyColumnValueStorageManager and therefore KeyColumnValueStore, and uses Lettuce to interface with Redis.

Employs a key-indexed HASH (KCV covering index), a column-indexed SET (CK covering index), an all-keys covering index SET, and an all-columns covering index SET with internal Redis transactions—to ensure consistent updates—and asynchronous index (all-keys and all-columns) deletions.

getKeys(KeyRangeQuery query, StoreTransaction txh) and getKeys(SliceQuery query, StoreTransaction txh) are implemented with SSCAN on the all-columns index SET with late-filtering rather than pre-filtering (range scan or range read with ordered values).

More efficient iterations may want to drop the all-keys covering index, use ZSETs instead of SETs for both the all-columns covering index and the CK covering index with ZRANGEBYLEX-based in-Redis pre-filtering instead of in-app late-filtering with matches(StaticBuffer start, StaticBuffer end, StaticBuffer item)—take into account that start is inclusive and end is exclusive. SCAN and derivates should not be used as MATCH does not support byte comparisons and does not pre-filter.

Currently a KeyIterator calls HGET synchronously on next() instead of prefetching results—consider alternatives.

Also, distributed locking and Redis transactions extended to the KeyColumnValueStorageManager may be necessary or desired.

Purpose

The original goal was to extend JanusGraph to support Redis Labs’ CRDB in order to have a geo-distributed alternative to the wonderful RedisGraph by Roi Lipman and contributors.

redis-janusgraph-storage-backend's People

Contributors

ramonpires avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.