Git Product home page Git Product logo

Atleon

License Main Build Workflow Maven Central Javadoc

Atleon is a lightweight reactive stream processing framework that scalably transforms data from any supported infrastructure, and allows sending that data nearly anywhere, while seamlessly maintaining at least once processing guarantees.

Atleon is based on Reactive Streams and backed by Project Reactor.

Documentation and Getting Started

Atleon documentation and instructions on how to get started are available in the Wiki.

An example message processing pipeline in Atleon looks like the following:

import io.atleon.core.AloStream;
import io.atleon.core.DefaultAloSenderResultSubscriber;
import io.atleon.kafka.AloKafkaSender;
import reactor.core.Disposable;

public class MyStream extends AloStream<MyStreamConfig> {

    @Override
    public Disposable startDisposable(MyStreamConfig config) {
        AloKafkaSender<String, String> sender = config.buildKafkaMessageSender();

        return config.buildKafkaMessageReceiver()
            .receiveAloRecords(config.getSourceTopic())
            .map(record -> config.getService().transform(record.value()))
            .filter(message -> !message.isEmpty())
            .transform(sender.sendAloValues(config.getDestinationTopic(), message -> message.substring(0, 1)))
            .resubscribeOnError(config.name())
            .doFinally(sender::close)
            .subscribeWith(new DefaultAloSenderResultSubscriber<>());
    }
}

In applications where it is possible for the stream to be self-configured (i.e. Spring), the above stream definition can be simplified to not require an instance of AloStreamConfig:

import io.atleon.core.AloStream;
import io.atleon.core.DefaultAloSenderResultSubscriber;
import io.atleon.kafka.AloKafkaSender;
import reactor.core.Disposable;

public class MyStream extends AloStream<MyStreamConfig> {
    
    private final KafkaConfigSource configSource;
    
    private final MyService service;
    
    private final String sourceTopic;
    
    private final String destinationTopic;
    
    public MyStream(KafkaConfigSource configSource, MyService service, String sourceTopic, String destinationTopic) {
        this.configSource = configSource;
        this.service = service;
        this.sourceTopic = sourceTopic;
        this.destinationTopic = destinationTopic;
    }

    @Override
    public Disposable startDisposable(MyStreamConfig config) {
        AloKafkaSender<String, String> sender = AloKafkaSender.create(configSource);

        return AloKafkaReceiver.<String, String>create(configSource)
            .receiveAloRecords(sourceTopic)
            .map(record -> service.transform(record.value()))
            .filter(message -> !message.isEmpty())
            .transform(sender.sendAloValues(destinationTopic, message -> message.substring(0, 1)))
            .resubscribeOnError(name())
            .doFinally(sender::close)
            .subscribeWith(new DefaultAloSenderResultSubscriber<>());
    }
}

The examples module contains runnable classes showing Atleon in action and intended usage.

Building

Atleon is built using Maven. Installing Maven locally is optional as you can use the Maven Wrapper:

./mvnw clean verify

Docker

Atleon makes use of Testcontainers for some unit tests. Testcontainers is based on Docker, so successfully building Atleon requires Docker to be running locally.

Contributing

Please refer to CONTRIBUTING for information on how to contribute to Atleon

Legal

This project is available under the Apache 2.0 License.

atleon's Projects

atleon icon atleon

Lightweight infinite reactive stream processing framework

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.