Coder Social home page Coder Social logo

ksml's Introduction

Build and test

Axual KSML

KSML is a wrapper around Kafka Streams that allows for development of low code stream processing applications. It was developed by Axual early 2021 and released as open source in May 2021.

Introduction

Kafka Streams has captured the hearts and minds of many developers that want to develop streaming applications on top of Kafka. But as powerful as the framework is, Kafka Streams has had a hard time getting around the requirement of writing Java code and setting up build pipelines. There were some attempts to rebuild Kafka Streams, but up until now popular languages like Python did not receive equally powerful (and maintained) stream processing frameworks. KSML provides a new declarative approach to unlock Kafka Streamsto a wider audience. Using only a few simple basic rules and Python snippets, you will be able to write streaming applications in very little time.

Project Overview

The project is divided into modules based functionality in order to be included separately depending on the use case.

The submodules are as follows:

  • ksml the core component that can parse KSML definition files and convert them to a Kafka Streams topology

  • ksml-axual adaption of the KSML serde generator, intended for use with Axual Platform and/or Axual Cloud

  • ksml-runner standalone Java application, that combines both Kafka Streams and KSML in a runnable jar

  • ksml-runner-axual adaption of the standard runner, intended for use with Axual Platform and/or Axual Cloud

The following example project is also included:

  • ksml-example-producer example producer, which writes random SensorData messages to a Kafka topic for demo purposes

Building KSML

Building and running KSML requires an installation of GraalVM and the corresponding Python module. There are two ways to do this:

  1. Use the supplied multistage Docker build file
  2. Install GraalVM locally

See the paragraphs below for details.

Using the multistage Docker build

You can build either the standard KSML runner, or the runner for the Axual platform using one of the following commands:

docker build -t axual/ksml -f Dockerfile-build-runner . --build-arg runner=ksml-runner
docker build -t axual/ksml -f Dockerfile-build-runner . --build-arg runner=ksml-runner-axual

If you do not specify a --build-arg, the plain Kafka runner will be built by default.

Install GraalVM locally

Download GraalVM from this page and install it for your platform as explained. Once installed, use the command gu install python to install the Python module. For more information, check out the Python Reference pages.

Once installed, select GraalVM as your default Java JVM. Then you can build KSML using the normal Maven commands:

mvn clean package

Then build the runtime container by passing in either ./ksml-runner or ksml-runner-axual as build context:

docker build -t axual/ksml -f Dockerfile ./ksml-runner
docker build -t axual/ksml -f Dockerfile ./ksml-runner-axual

Running KSML

To run the KSML demo, we provide a Docker compose file which will start Kafka, create the demo topics, and start a container with a demo producer. You can then start the runner you generated in the previous step, passing in a KSML configuration of your choice. See Getting started or Runners for details.

To run the demo, Docker 19.x is required.

Contributing

Axual is interested in building the community; we would welcome any thoughts or patches. You can reach us here.

See Contributing.

ksml's People

Contributors

tonvanbart avatar jeroenvandisseldorp avatar richard-axual avatar netgio avatar jorisjumanne 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.