All Projects → alkal-io → Kalium

alkal-io / Kalium

Licence: other
Kalium: a reactive framework for micro-services

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Kalium

Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (+318.87%)
Mutual labels:  microservices, kafka
Surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service gove…
Stars: ✭ 3,088 (+5726.42%)
Mutual labels:  microservices, kafka
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 🔥
Stars: ✭ 228 (+330.19%)
Mutual labels:  microservices, kafka
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (+200%)
Mutual labels:  microservices, kafka
Practical.cleanarchitecture
Asp.Net Core 5 Clean Architecture (Microservices, Modular Monolith, Monolith) samples (+Blazor, Angular 11, React 17, Vue 2.6), Domain-Driven Design, CQRS, Event Sourcing, SOLID, Asp.Net Core Identity Custom Storage, Identity Server 4 Admin UI, Entity Framework Core, Selenium E2E Testing, SignalR Notification, Hangfire Tasks Scheduling, Health Checks, Security Headers, ...
Stars: ✭ 639 (+1105.66%)
Mutual labels:  microservices, kafka
Fero
light, fast, scalable, streaming microservices made easy
Stars: ✭ 175 (+230.19%)
Mutual labels:  microservices, kafka
Every Single Day I Tldr
A daily digest of the articles or videos I've found interesting, that I want to share with you.
Stars: ✭ 249 (+369.81%)
Mutual labels:  microservices, kafka
Goka
Goka is a compact yet powerful distributed stream processing library for Apache Kafka written in Go.
Stars: ✭ 1,862 (+3413.21%)
Mutual labels:  microservices, kafka
Reactive Interaction Gateway
Create low-latency, interactive user experiences for stateless microservices.
Stars: ✭ 465 (+777.36%)
Mutual labels:  microservices, kafka
Micronaut Microservices Poc
Very simplified insurance sales system made in a microservices architecture using Micronaut
Stars: ✭ 394 (+643.4%)
Mutual labels:  microservices, kafka
Reactive Ms Example
An educational project to learn reactive programming with Spring 5
Stars: ✭ 157 (+196.23%)
Mutual labels:  microservices, reactive-programming
Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (+1386.79%)
Mutual labels:  microservices, kafka
Azkarra Streams
🚀 Azkarra is a lightweight java framework to make it easy to develop, deploy and manage cloud-native streaming microservices based on Apache Kafka Streams.
Stars: ✭ 146 (+175.47%)
Mutual labels:  microservices, kafka
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (+290.57%)
Mutual labels:  microservices, kafka
My Moments
Instagram Clone - Cloning Instagram for learning purpose
Stars: ✭ 140 (+164.15%)
Mutual labels:  microservices, kafka
Devicehive Java Server
DeviceHive Java Server
Stars: ✭ 241 (+354.72%)
Mutual labels:  microservices, kafka
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+2520.75%)
Mutual labels:  microservices, kafka
Seldon Server
Machine Learning Platform and Recommendation Engine built on Kubernetes
Stars: ✭ 1,435 (+2607.55%)
Mutual labels:  microservices, kafka
Springy Store Microservices
Springy Store is a conceptual simple μServices-based project using the latest cutting-edge technologies, to demonstrate how the Store services are created to be a cloud-native and 12-factor app agnostic. Those μServices are developed based on Spring Boot & Cloud framework that implements cloud-native intuitive, design patterns, and best practices.
Stars: ✭ 318 (+500%)
Mutual labels:  microservices, reactive-programming
Nakadi
A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
Stars: ✭ 734 (+1284.91%)
Mutual labels:  microservices, kafka

Kalium: a reactive framework for micro-services

Build Status Maintainability Test Coverage codecov Total alerts Language grade: Java Known Vulnerabilities

Kalium in neo-latin is the word for Pottasium- the chemical element of atomic number 19, a soft silvery-white reactive metal of the alkali metal group.

What is Kalium?

Kalium is a framework that makes it easier for micro-services asynchronously to interact with each other.

Here's an example in Java. Let's assume we have an e-commerce site that accepts payments and sends receipts to customers. Upon checkout, a customer is sending a Payment. Once the Payment is processed, a Receipt needs to be sent to the customer.

For scale purposes, we assume payments are processed on one micro-service, while receipts are produced and sent from different micro-services.

Here is how we would use Kalium to help us with these data flows.

Processing a payment

 public class PaymentProcessor {
    ...
    @On
    public void processPayment(Payment payment) {
        if(!payment.isProcessed()) {
            // Do something with the payment, e.g. call Stripe to make the actual payment
            payment.processed = true;
            kalium.post(payment);
        }
    }
 }

Preparing a receipt

 public class ReceiptProducer {
    ...
    @On
    public void prepareReceipt(Payment payment) {
        if(payment.isProcessed()) {
            //convert processed payment into receipt
            Receipt newReceipt = converPaymentToReceipt(payment);
            kalium.post(newReceipt);
        }
    }
 }

Emailing a receipt to a customer

 public class ReceiptMailer {
    ...
    @On
    public void sendReceipt(Receipt receipt) {
        //send the receipt, e.g. convert it to HTML and send it with SendGrid
        prepareReceiptEmailAndSend(receipt);
        receipt.sent = true;
        kalium.post(receipt);
    }
 }

How Kalium works?

Behind the scenes, Kalium is using existing queue technology as a scalable event bus. Kalium uses the @On annotations to define out-of-the-box serializer/de-serializer for the event classes. The object type of the paramater of the annotated method, is used as the topic in the underlying queue.

Currently, Kalium is supporting Java, and can only be used with Apache Kafka as the underlying event bus. However, it is planned to have an implementation for other languages like Javascript and Python and to be used with AWS Kinesis as well.

Adding Kalium to your build

Kalium's Maven group ID is io.alkal and its artifact ID is kalium-kafka. To add a dependency on On using Maven, use the following:

<dependency>
  <groupId>io.alkal</groupId>
  <artifactId>kalium-kafka</artifactId>
  <version>0.0.1</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  compile 'io.alkal:kalium-kafka:0.0.1'
}

Quick start

Sending Hello object between services

public class Hello {
    
    private String value;
    
    public Hello(String value) {
        this.value = value;
    }
    
    public String getValue() {
        return value;
    }
}

Service 1 - greeter

public class Greeter {

    public static void main(String[] args) {
        Kalium kalium = Kalium.Builder()
            .setQueue(new KaliumKafkaQueueAdapter("localhost:9092"))
            .build();
        kalium.start();
        Hello hello = new Hello("world");
        kalium.post(hello);
   }
}

Service 2- printing greeting on another service

public class HelloPrintingService {

    public static void main(String[] args) {
        Kalium kalium = Kalium.Builder()
            .setQueue(new KaliumKafkaQueueAdapter("localhost:9092"))
            .build();
        kalium.addReaction(new HelloReaction);
        kalium.start();
   }
}

public class HelloReaction{
    @On
    public void printHello(Hello hello) {
        System.out.println("Hello " + hello.getValue());
    }
}

contact me: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].