All Projects → cjqCN → spring-statemachine-learning

cjqCN / spring-statemachine-learning

Licence: Apache-2.0 License
spring-statemachine 学习记录

Programming Languages

java
68154 projects - #9 most used programming language
d
599 projects

Projects that are alternatives of or similar to spring-statemachine-learning

fs2-es
Event sourcing utilities for FS2
Stars: ✭ 75 (-10.71%)
Mutual labels:  state-machine
Guilds
Guilds de OSW
Stars: ✭ 38 (-54.76%)
Mutual labels:  learning
multi-contact-grasping
This project implements a simulated grasp-and-lift process in V-REP using the Barrett Hand, with an interface through a python remote API.
Stars: ✭ 52 (-38.1%)
Mutual labels:  learning
laraflow
State machine and workflow package for Laravel Eloquent
Stars: ✭ 52 (-38.1%)
Mutual labels:  state-machine
useStateMachine
The <1 kb state machine hook for React
Stars: ✭ 2,231 (+2555.95%)
Mutual labels:  state-machine
xstate-viz
Visualizer for XState machines
Stars: ✭ 274 (+226.19%)
Mutual labels:  state-machine
UnityHFSM
A simple yet powerful class based hierarchical finite state machine for Unity3D
Stars: ✭ 243 (+189.29%)
Mutual labels:  state-machine
nosso-py
Um repositório com materiais e muito mais para aprender, programar e se divertir com Python!
Stars: ✭ 51 (-39.29%)
Mutual labels:  learning
statemachine-go
🚦 Declarative Finite-State Machines in Go
Stars: ✭ 47 (-44.05%)
Mutual labels:  state-machine
xstate-catalogue
Professionally designed, interactive state machines
Stars: ✭ 616 (+633.33%)
Mutual labels:  state-machine
pyrfidhid
Python library to control Chinese USB HID 125Khz RFID Reader/Writer
Stars: ✭ 104 (+23.81%)
Mutual labels:  state-machine
animation-system
An experiment on creating an animation system similar to Unreal Engine 4 from scratch.
Stars: ✭ 24 (-71.43%)
Mutual labels:  state-machine
simple-image-classifier
Simple image classifier microservice using tensorflow and sanic
Stars: ✭ 22 (-73.81%)
Mutual labels:  learning
SMACC2
An Event-Driven, Asynchronous, Behavioral State Machine Library for ROS2 (Robotic Operating System) applications written in C++
Stars: ✭ 58 (-30.95%)
Mutual labels:  state-machine
antares
Digital circuit learning platform
Stars: ✭ 15 (-82.14%)
Mutual labels:  learning
statechart
A rust implementation of statecharts: hierarchical, reactive state machines
Stars: ✭ 41 (-51.19%)
Mutual labels:  state-machine
ember-fsm
[Maintenance Mode] A promise-aware finite state machine implementation for Ember
Stars: ✭ 37 (-55.95%)
Mutual labels:  state-machine
xstate-cpp-generator
C++ State Machine generator for Xstate
Stars: ✭ 33 (-60.71%)
Mutual labels:  state-machine
typed-machine
A strict Finite State Machine, written in TS
Stars: ✭ 21 (-75%)
Mutual labels:  state-machine
videoMultiGAN
End to End learning for Video Generation from Text
Stars: ✭ 53 (-36.9%)
Mutual labels:  learning

spring statemachine

本教程基于spring-statemachine 2.0.0.RELEASE版本。

什么是spring statemachine

Spring Statemachine 是使用 Spring框架下的状态机概念创建的一种应用程序开发框架。它使得状态机结构层次化,简化了配置状态机的过程。

模块

  • spring-statemachine-core
  • spring-statemachine-recipes-common
  • spring-statemachine-kryo
  • spring-statemachine-data-common
  • spring-statemachine-data-jpa
  • spring-statemachine-data-redis
  • spring-statemachine-data-mongodb
  • spring-statemachine-zookeeper
  • spring-statemachine-test
  • spring-statemachine-cluster
  • spring-statemachine-uml
  • spring-statemachine-autoconfigure
  • spring-statemachine-bom
  • spring-statemachine-starter

优点

  • 有简单的教程以供快速入门。
  • 具有简便的方式配置多层次结构复杂的状态机。
  • 可以灵活地配置状态区。
  • 提供触发器、状态转移器、保护机制、状态转移动作和状态机事件监听器。
  • 类型安全的配置适配器。
  • 在spring应用中具有简便的创建模式。
  • 多种通用的用例。
  • 可基于Zookeeper实现分布式状态机。
  • 与spring ioc整合。

适用情况

下列情况适合使用状态机:

  • 应用或者其一部分可以用状态表示。
  • 希望将复杂的逻辑拆分,获得更清晰更简单的逻辑。
  • 应用遇到并发问题,即异步导致的问题。

初步尝试适用状态机:

  • 使用布尔标志和枚举建立状态模型
  • 仅使用在应用生命周期内具有意义的状态。
  • 使用有限的状态,每种状态或状态的组合都有意义和相应的处理方法。

名词解释

  • State Machine
    状态机,将状态结合、转移、事件整合到一起的机器

  • State
    一个不变的状态模型
    主要由一个事件修改实体的状态

  • Extended State
    扩展状态是一组特殊的变量保存在一个状态机中,可以保存业务数据。

  • Transition
    源状态和目标状态之间的关系,它可能是复合过度的一部分,它规定在一个特定的事件发生时某个状态转移的情况。

  • Event
    事件,驱动状态转移的实体。

  • Initial State
    初始状态

  • End State
    终态

  • History State
    记录状态机最后的活动状态,存在两种模式

  • Choice State
    状态转移选择,相当于if/else

  • Fork State
    状态分支

  • Join State
    状态合并

  • Region
    区域,一个父状态与数个子状态组成的状态区

  • guard
    状态保护机制,对一个状态转移进行评估,评估值为true允许状态转移,评估值为false禁止转移

  • Action
    状态转移动作,在转移进行的时候触发的动作

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