Skip to content

I created this solution to use the best of both worlds, the storage power of SQL Server and the read speed of MongoDB.

License

Notifications You must be signed in to change notification settings

avm-sistemas/sqlserver-kafka-mongodb-sync

Repository files navigation

SQL Server Kafka MongoDB Sync

Abstract

I created this solution to use the best of both worlds, the storage power of SQL Server and the read speed of MongoDB.

Architecture

It was built in Docker with 10 application layers divided into 5 categories:

I. Transactional Persistence Database:

  1. SQL Server

II. Fast Read Database:

  1. MongoDB

III. Synchronization:

  1. Zookeeper
  2. Kafka
  3. Kafka Connect
  4. Kafka UI

IV: Synchronization Configuration:

  1. Replicator

V: Restful Services:

  1. Restful API to SQL Server's CRUD (NestJs)
  2. Restful API to Mongodb's reader (NestJs)
  3. Restful API to Mongodb's reader (.NET 8)

Clone & Run

> git clone https://github.com/avm-sistemas/sqlserver-kafka-mongodb-sync.git
> cd sqlserver-kafka-mongodb-sync
> docker-compose up --build -d --force-recreate

Results:

Docker:

image

SQL Server:

image

Kafka:

image

Mongodb:

image

API Restful SQL Server

image

API Restful MongoDB (NestJs)

image

API Restful MongoDB (.NET 8)

image