Giter Site home page Giter Site logo

elassandro-dbs-synchronizer's Introduction

Elassandro Databases Synchronizer - Advanced synchronizer

Elassandro is a basic databases synchronizer, that guarantees data synchronization between Cassandra and Elasticsearch.

Structure

Cassandra is considered as a primary data storage. Every inserted row in Cassandra will has its own respective document stored in Elasticsearch. Following the same logic, each update or delete method invoked on Cassandra, will systematically be invoked on Elasticsearch.

Configuration

This API is built over Cassandra 3.0.9 and Elasticsearch 5.4.1.

Cassandra

Before running this API, you can create a keyspace using this command :
CREATE KEYSPACE your_keyspace_name;
USE your_keyspace_name;

After that, you can create your table ; Example :

CREATE TABLE city(
   name text,
   prefecture text,
   country text,
   population bigint,
   PRIMARY KEY (name, prefecture)
);

Elasticsearch

At this point, you can create the respective Elasticsearch index for your Cassandra Table, with this command :

Using kibana :

PUT cities
{
  "mappings": {
  "city": {
    "properties": {
      "name": {
        "type": "text"
      },
      "prefecture": {
        "type": "text"
      },
      "country": {
        "type": "text"
      },
      "population": {
        "type": "long"
      }
      }
    }
  }
  }

Using CURL :

curl -XPUT "http://localhost:9200/cities" -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "city": {
      "properties": {
          "name": {
              "type": "text"
          },
          "prefecture": {
              "type": "text"
          },
          "country": {
              "type": "text"
          },
          "population": {
              "type": "long"
          }
      }
    }
  }
}'

Note :

The work on this branch is not completed ... You may take a look at the basic synchronizer (complete) : https://github.com/ghazi-naceur/elassandro-dbs-synchronizer/tree/elassandro-basic-synchronizer .
The aim of this branch (advanced synchronizer/master branch) is to integrate Apache Camel and ActiveMQ in order to provide an Asynchronous CRUD in distinct routes.
In order to provide a synchronization between Cassandra and Elasticsearch, I recommend using Cassandra Trigger :
https://github.com/ghazi-naceur/cassandra-trigger (forked from gardeup)

elassandro-dbs-synchronizer's People

Contributors

ghazi-naceur avatar

Watchers

 avatar  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.