npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

neoreplicator

v0.1.0

Published

Real time replication from MySQL to Neo4J using binary logs

Downloads

4

Readme

NeoReplicator

A MySQL to Neo4J replicator based on binlog listener running on Node.js.

Update

Thanks to a great feedback from guys from Neo Technology we have updated the cypher queries to use more of the potential Neo4J has. Due to some major changes in cypher queries structure of the mapping has been changed. Take a look at the example.js file. In the future the main focus will be on changing from single connection to a connection pool for connecting to the mysql master.

Goals

The package is still in development and some heavy change can occur. The final goal is to have an app that will more or less instantaneously replicate the changes made in MySQL database to a Neo4J graph database.

TODO list

  • create nodes from insert queries ✓
  • create relations based on foreign keys ✓
  • create relations based on Many-To-Many relations ✓
  • update nodes after update queries ✓
  • delete nodes ✓
  • delete relations ✓
  • improve stability ✓
  • error reporting
  • start from last replicated position
  • write tests
  • Travis Integration
  • Proper git structure(dev branch, git-flow)
  • reconnect after the connection is dropped by mysql server ✓

This package has been tested with MySQL server 5.5.40 and 5.6.19. All MySQL server versions >= 5.1.15 are supported. It is briefly tested with MariaDB 10.0

Quick Start

var neorep = new NeoReplicator({
  mysql: { port: '3306', host: 'localhost', user: 'neorep', password: 'neorep' },
  neo4j: { port: '7474', host: 'localhost', user: 'neo4j', password: 'neo4j' },
  mapping: { /* see in example.js */ }
});

// Replication must be started, as a parameter pass the name of the MySQL database to replicate
neorep.start(
  includeSchema: { 'mysqlDatabaseName': true }
});

For a complete implementation see example.js...

Installation

  • Requires Node.js v0.10+

    $ npm install neoReplicator
  • Enable MySQL binlog in my.cnf, restart MySQL server after making the changes.

    From MySQL 5.6, binlog checksum is enabled by default. Zongji can work with it, but it doesn't really verify it.

    # binlog config
    server-id        = 1
    log_bin          = /var/log/mysql/mysql-bin.log
    expire_logs_days = 10            # optional
    max_binlog_size  = 100M          # optional
    
    # Very important if you want to receive write, update and delete row events
    binlog_format    = row
  • Create an account with replication privileges, e.g. given privileges to account neorep (or any account that you use to read binary logs)

    GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'neorep'@'localhost'

Reference

This package is a further development of 'Zong Ji' library. The main dependencies are:

  • https://github.com/felixge/node-mysql
  • https://github.com/philippkueng/node-neo4j

License

MIT