Giter VIP home page Giter VIP logo

mssql_elasticsearch_river's Introduction

MSSQL ElasticSearch River

This is a POC for real time updating of elasticsearch indexes from MSSQL using the service broker and an external C# application. It's far from production ready (obviously), but gives a good idea of how to have a scalable solution to real time indexing.

How it Works

  1. User edits a table.
  2. A trigger fires writing a message to the service broker queue. Message contains an ID and the table that got edited.
  3. A C# application picks up that service broker message (Via long polling), and pulls the entire record from the table, and then sends it to an ElasticSearch index of your choice.

Setup

SQL Setup

Install scripts for SQL are located in /sql/install

  1. This is to install the service broker for your database if you haven't already. This only needs to be run once.
  2. This is to install the messages, contracts and queues. You will only have to do this once.
  3. This is the trigger that puts messages on queues. You will need to do this once per table that you wish to trigger.

C# River Setup

  • Configuration is in the app.config.
  • You can run multiple rivers off the single C# application (It can read/write to multiple databases/indexes at once)
  • You will need to also edit the connectionStrings (Obviously)

mssql_elasticsearch_river's People

Contributors

intech avatar mindingdata avatar

Watchers

 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.