zhihuili / flower Goto Github PK
View Code? Open in Web Editor NEW反应式微服务框架Flower
Home Page: https://zhihuili.github.io/flower/#/
License: Apache License 2.0
反应式微服务框架Flower
Home Page: https://zhihuili.github.io/flower/#/
License: Apache License 2.0
支持分布式的,统一的、声明式、补偿式的微服务事务
几个Service构成一个流程segment,部署在一个服务器集群上,应用程序的流程可以接入这个segment作为自己流程的一段。主要是消息流转方案设计。
初步思路:在Flower center上管理应用整体流程,segment之间通过center返回的流程定义以及segment部署信息进行分布式消息通信。
JointService必须收到预设的全部个数消息后,将消息打包发送到后续服务。而LeastJointService在收到第一个消息后,立即将该消息发送到后续服务,后面到达的消息将被丢弃。
思路:TODO
ServiceFacade中实现流程之外的Service调用,扩展服务调用灵活性
测试用例:
一个请求(请求参数:用户ID)返回三个数据库查询:用户信息,推荐商品ID列表,订单状态汇总信息。
三个数据库查询在Flower中通过消息分叉发送给三个服务并行执行。
性能对比(响应时间):和传统的串行阻塞数据库查询对比。
领域驱动设计(Domain-Driven Design)功能支持开发
使用Servlet3.0的异步特性,结合Flower的sync调用,构建一个标准web处理demo,进行性能测试。
对比性能:
目前Service异常发生时,异常会发送到SupervisorActor,目标是使用者可以开发ExceptionService,针对Service异常进行无侵入的处理。
目前在Web模块固定了256个通道
flower运行过程中,可能会有业务阻塞线程,如果线程有阻塞,怎么可以检测到阻塞线程的阻塞点。
flower运行过程中如果检测到阻塞点则通知用户。
问题重现:启动服务,首次调用含有AggregateService的流程,有几率出现聚合消息无法接收,再次调用则正常
收到上游消息后,根据条件判断将消息发送给下游哪个Service处理
利用Spring boot完成url路径dispatch,请求数据封装,并获得AsyncContext对象,将请求数据和AsyncContext对象交给Flower继续异步处理。
分布式Service Segment热部署方案
关联issue#19
【TODO】1. 注册中心元数据存储高可用; 2. @flowerservice扫描内部类
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.