Git Product home page Git Product logo

kafka-webhook-dispatcher's Introduction

CircleCI

This is an app for connecting to kafka and sending webhooks.

Design Choices

Language

  • Language should be mature and have a mature kafka client

Kafka Benchmarking:

Client Type Throughput
Java 40,000 - 50,0000
Go 28,000 - 30,0000
Node 6,000 - 8,000
Kafka-pixy 700 - 800
Logstash 250
  • The Language should be performant
  • Language should support concurrency

Language Go or Node are preferable.

Architecture

Document Architecture decisions using ADR TOOLS If you cannot install the tools then use the provided template

Webhooks Received

  • single receiving topic enter the persist-and-validate consumer:
    • This consumer persists all webhooks and validates them afterward.
    • Then if it is invalid it will not send it on to the next consumer.
    • Valid uuid's are passed onto the next topic

Webhooks URL Monitor

  • Unique URL's should be persisted and monitored
    • When a message arrived with a new URL this URL is added to the ENDPOINTS table
    • This URL is monitored periodically for availability

Webhooks Dispatcher

  • single delivering topic from the webhooks received consumer will be dispatched here:
    • This consumer will poll the URL provided for the webhooks and send the webhooks on to the next stage

Developer

Getting Started

git clone [email protected]:simonireilly/kafka-webhook-dispatcher.git

# Build app, compose up and tail logs
make build up tail

# Stop the app
make stop

Testing

Methodology

Unit Tests

  1. Create exported functions to be passed to a consumer and create unit tests for these functions.

Integration Tests

  1. Spin up the app with a consumer and producer and connect to a kafka cluster
  2. Receive messages and process them into the database
  3. Retrieve successfully stored messages and validate the contents
    1. Is valid url for urls in collection
    2. Is a valid json body (can be json parsed - all we can do really)
  4. Post successfully validated webhooks concurrently for all urls provided
  5. Create a container to receive webhooks and test response
    1. Status - 200
    2. Status - 404
    3. Status - 401
    4. Status - 301
    5. Status - 500

kafka-webhook-dispatcher's People

Contributors

simonireilly avatar

Stargazers

Roman avatar  avatar Naren avatar Cesar  Morales avatar ixaxaar avatar Flávio H. Ferreira avatar Pham Quy Hai avatar Sven Frauen avatar Manjesh V avatar Kyle Prifogle avatar Rachel Yordán avatar Shad avatar Dr. Jawa avatar George Lima avatar Silviu Tantos avatar Davi avatar Patrick Savalle avatar

Watchers

Patrick Savalle avatar James Cloos avatar

Forkers

terragona

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.