Giter VIP home page Giter VIP logo

racing's Introduction

SEDA Java implementation --- racing

java实现的 seda 架构

Stage组成:调度器,执行器,工作单元,接收者,分发者,控制器,性能监控,事件处理器

架构图

  • 与spring-boot完美集成,简单易用
  • 核心实现不依赖任何容器,可随意在各种项目中集成
  • 依赖 java8

集群拓扑结构管理

管理面板

使用指南

首先明确业务逻辑可划分为多个Stage,每个Stage负责一个逻辑计算,相互之间用消息队列传递消息。

在实现Stage时,需要实现三大组件(在架构图中以绿色背景标出)

  1. Sink 输入队列
  2. Decoder 消息解码器
  3. Handler 事件处理器

详细使用参考 racing-demo 子项目

@Component
public class DemoStage extends Stage<String> {

    private ArrayList<Handler<String>> outputHandlers = Lists.newArrayList();

    public DemoStage() {
        super("DemoStage");
        outputHandlers.add(new OutputHandler<String>());
    }

    @PostConstruct
    public void init() {
        setSink(new UuidSink(2000));
        setDecoder(new StringDecoder());
        setHandlers(outputHandlers);
    }
}

SEDA 架构**

Matthew David Welsh--An Architecture for Highly Concurrent

SEDA将应用分为若干由事件队列链接的网状Stage,从而形成一个系统计算拓扑。

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.