All Projects → kbastani → Event Stream Processing Microservices

kbastani / Event Stream Processing Microservices

Licence: gpl-3.0
Using Spring Cloud Stream and Spring State Machine to create event-driven microservices

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Event Stream Processing Microservices

Micro Company
Rest-full, Hipermedia-based distributed application. Spring boot & cloud. Angular. CQRS. Eventsourcing. Axonframework. Microservices. Docker. CloudFoundry
Stars: ✭ 307 (+20.39%)
Mutual labels:  microservice, spring-boot, spring-cloud, cqrs
Piggymetrics
Microservice Architecture with Spring Boot, Spring Cloud and Docker
Stars: ✭ 11,161 (+4276.86%)
Mutual labels:  microservices, microservice, spring-boot, spring-cloud
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-82.35%)
Mutual labels:  microservices, microservice, spring-boot, spring-cloud
Event Sourcing Microservices Example
Learn about building microservices with event sourcing using Spring Boot and how to deploy a social network to Kubernetes using Docker Compose or Helm.
Stars: ✭ 167 (-34.51%)
Mutual labels:  microservices, spring-boot, spring-cloud, cqrs
Microservices Example
Example of a microservices architecture on the modern stack of Java technologies
Stars: ✭ 66 (-74.12%)
Mutual labels:  microservices, microservice, spring-boot, spring-cloud
Spring Cloud Config
External configuration (server and client) for Spring Cloud
Stars: ✭ 1,740 (+582.35%)
Mutual labels:  microservices, spring-boot, spring-cloud
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-45.88%)
Mutual labels:  microservices, microservice, spring-boot
Spring Cloud Cli
Spring Cloud CLI features
Stars: ✭ 139 (-45.49%)
Mutual labels:  microservices, spring-boot, spring-cloud
Quickperf
QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
Stars: ✭ 231 (-9.41%)
Mutual labels:  microservices, microservice, spring-boot
Sample Spring Microservices Advanced
More advanced samples of spring boot and spring cloud microservices showing usage of such tools like api Swagger2 on Zuul, integraction with MongoDB, configuration server, testing with Spring Cloud Contract or Hoverfly
Stars: ✭ 112 (-56.08%)
Mutual labels:  microservices, spring-boot, spring-cloud
My Moments
Instagram Clone - Cloning Instagram for learning purpose
Stars: ✭ 140 (-45.1%)
Mutual labels:  microservices, spring-boot, spring-cloud
Microservices Platform
基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba并采用前后端分离的企业级微服务多租户系统架构。并引入组件化的思想实现高内聚低耦合,项目代码简洁注释丰富上手容易,适合学习和企业中使用。真正实现了基于RBAC、jwt和oauth2的无状态统一权限认证的解决方案,面向互联网设计同时适合B端和C端用户,支持CI/CD多环境部署,并提供应用管理方便第三方系统接入;同时还集合各种微服务治理功能和监控功能。模块包括:企业级的认证系统、开发平台、应用监控、慢sql监控、统一日志、单点登录、Redis分布式高速缓存、配置中心、分布式任务调度、接口文档、代码生成等等。
Stars: ✭ 3,274 (+1183.92%)
Mutual labels:  microservices, spring-boot, spring-cloud
Learning Path Spring Boot Microservices
Curated path for learning Spring Boot & Microservices based on published videos in TechPrimers
Stars: ✭ 116 (-54.51%)
Mutual labels:  microservices, spring-boot, spring-cloud
Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (-12.94%)
Mutual labels:  microservices, spring-boot, cqrs
Spring Cloud Build
Common build concerns, shared plugin configuration, etc. for Spring Cloud modules
Stars: ✭ 114 (-55.29%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Dubbo Together
Spring Cloud与Dubbo共存方案
Stars: ✭ 155 (-39.22%)
Mutual labels:  microservices, spring-boot, spring-cloud
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (-37.65%)
Mutual labels:  microservices, microservice, cqrs
Tenso
Tenso is an HTTP REST API framework
Stars: ✭ 167 (-34.51%)
Mutual labels:  microservices, microservice, cqrs
Java Microservices Examples
Java Microservices: Spring Boot, Spring Cloud, JHipster, Spring Cloud Config, and Spring Cloud Gateway
Stars: ✭ 194 (-23.92%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Example
Stars: ✭ 111 (-56.47%)
Mutual labels:  microservices, spring-boot, spring-cloud

Event Stream Processing Microservice Example

In an event-driven microservices architecture, the concept of a domain event is central to the behavior of each service. Popular practices such as CQRS (Command Query Responsibility Segregation) in combination with Event Sourcing are becoming more common in applications as microservice architectures continue to rise in popularity.

This reference architecture and sample project demonstrates an end-to-end example of building event-driven microservices that use Spring Boot and Spring Cloud. The project aims to show what an ideal development process might look like for building microservices that handle both HTTP and AMQP protocols for exchanging messages.

Demonstrated concepts:

  • Event Sourcing
  • Event Stream Processing
  • Remediating Partial Failures
  • Compensating Transactions
  • Eventual Consistency
  • Hypermedia Event Logs
  • Serverless Functions

Spring projects used:

Architecture

Each microservice in this reference architecture breaks down into three different independently deployable components.

Account microservice

The diagram above details the system architecture of the bounded context for Accounts, which includes deployable units for each Backing Service, Microservice, and AWS Lambda Function.

Usage

The repository contains two parent projects. Each microservice team is responsible for two separate component modules. The first component is the HTTP-driven web service for managing domain entities through a hypermedia-based REST API. The second component is an AMQP-driven event processor that drives the state of domain aggregates.

Deployment Model

Each microservice team will be managing two separate deployment artifacts, one for HTTP-based interactions and one for AMQP-based interactions.

The components break down into two separate concerns: Web and Worker roles.

Web role

The web role contains a REST API with transactions that requires strong consistency. Any workflow that can be transacted within the boundaries of the single microservice can be done within the scope of a single HTTP request/response.

Worker role

The worker role contains an AMQP-based message processor that listens for events generated by the web role and from other microservices. The worker role will be responsible for managing workflows that are eventually consistent. Any transaction the requires complex durable communication between separate microservices will be handled in the worker role.

Packaging

The deployment packaging for each microservice can vary depending on the desired size of the infrastructure footprint. You can either run both workloads as independently scalable components, or alternatively, you can package the components together into a single container.

Single Container Deployment

The first style of packaging is to combine together the HTTP (web role) and AMQP (worker role) components into a single container. The advantages with this approach have to do with minimizing the infrastructure footprint for operating the microservice.

Benefits:

  • Run workloads side-by-side in a single container
  • One microservice deployment per container
  • Reduces infrastructure footprint

Trade-offs:

  • Scales web and worker instances together
  • Tight coupling of components prevents independent release cycles

Multi Container Deployment

The second style of deployment is to independently package the web application separate from the worker application. This approach provides multiple advantages at the cost of a larger and more complex infrastructure footprint.

Benefits:

  • Allows separate release cycles for web and worker roles
  • Independently scale web and worker application instances
  • Changes to one component does not require deployment of other
  • Reduces overall memory consumption

Trade-offs:

  • Requires more application instances
  • Higher operational complexity
  • Requires two independent CI/CD pipelines

Running the Example

This repository is in an experimental state. To build and run the experimental project, run the following command:

mvn clean install -DskipTests -DskipDockerBuild

You will need to run Apache Kafka, Apache Zookeeper, and Redis on your local machine. After the build process has completed, you can start the Spring Cloud Data Flow server on your local machine, which will orchestrate each one of the microservice applications.

Before starting Spring Cloud Data Flow, make sure you're running each one of the backing services, as stated above. Also, you will need to start the Eureka server.

cd ./platform-services/discovery
mvn spring-boot:run

Once Eureka has started, you can start up the Spring Cloud Data Flow server, which will bootstrap the Spring Cloud Stream modules.

From the root of the project:

cd ./platform-services/data-flow-server
mvn spring-boot:run

The Spring Cloud Stream applications will be imported and the event streams will be available in the streams section of the data flow server. The load simulator stream module will begin to slowly pump events into the system and you'll be able to see the activity in the analytics section where you can see counters measuring the event load over time.

This project is working off of snapshots, so there may be issued running the data flow server. Please submit a issue or a pull request with a fix. (Thanks!)

Serverless Functions

Each bounded context in this reference architecture contains a set of action-mapped functions that can be deployed as Serverless functions. To learn more about how this works in practice, please take a look at the documentation for the account-worker application.

License

This project is an open source product licensed under GPLv3.

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].