Skip to content

High performance graph database client (Neo4j / AgensGraph) for TypeScript & Node.js

License

Notifications You must be signed in to change notification settings

saulimus/drivine

 
 

Repository files navigation

DrivineSplash

Drivine is a graph database client for Node.js and TypeScript. It was created with the following design goals:

  • Support multiple graph databases (simultaneously, if you wish). Currently AgensGraph and Neo4j.
  • Scale to hundreds and thousands of transactions per second, without compromising architectural integrity.

With regards to the second point on scaleability, let's break that down into component facets.

Features

Quick Start

Start creating repositories like the one below. Follow the Quick Start guide here.

@Injectable()
export class RouteRepository {
    constructor(
        @InjectPersistenceManager() readonly persistenceManager: PersistenceManager,
        @InjectCypher('@/traffic/routesBetween') readonly routesBetween: CypherStatement) {
    }

    @Transactional() // Has default Propagation.REQUIRED - partipicate in a current txn, or start one.
    public async findFastestBetween(start: string, destination: string): Promise<Route> {
        return this.persistenceManager.getOne(
            new QuerySpecification<Route>()
                .withStatement(this.routesBetween)
                .bind([start, destination])
                .limit(1)
                .transform(Route)
        );
    }
}

Quickest Start

Clone the sample app and start hacking.

The sample app contains a basic starter template. Also, so that you can get rolling as quickly as possible, a number a graph database koans, for typical use-cases - recommendations, social networks, etc, each presented in a Drivine style.

Detailed Documentation

Detailed documentation is here.


Tutorials

New to graph databases? Read some tutorials.

Have a tutorial you'd like to share? Get in touch with me.


About

Drivine was created by Jasper Blues (that's me), who is also the creator of a popular iOS library called Typhoon from AppsQuick.ly. Typhoon is included in thousands of iOS apps including Audible.com, AMEX, Etihad Airlines, Singapore Airlines and others, so you're in good hands.

The ideas behind this library were developed while developing graph-powered applications like Vampr, which serve hundres/thousands of thransactions per second. I wanted to demonstrate how to use clean architecture patterns, and tools that remove boiler-plate, without sacrificing performance. I was informed in this tasks through experience as a past committer to the Spring Framework including on Spring Data Neo4j. More iportantly, discussion and debate with colleagues, especially among those with experience applying mapping frameworks on applications that needed to exhibit high performance guided design choices. I believe that Drivine strikes an excellent balance in these regards. Let me know what you think.

Feedback

I'm not sure how to do [xyz]

If you can't find what you need in the Quick Start or User Guides above, please get in touch.

Interested in contributing?

Great! A contribution guide, along with detailed documentation will be published in the coming days.

I've found a bug, or have a feature request

Please raise a GitHub issue.

License

Copyright (c) 2019 Liberation Data

Drivine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

High performance graph database client (Neo4j / AgensGraph) for TypeScript & Node.js

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%