当前位置:网站首页>Cluster method synchronous execution framework suona
Cluster method synchronous execution framework suona
2022-07-01 02:25:00 【Cocowwy dot cn】
Suona
Suona
A decentralized cluster method synchronous execution framework
Git Address : Poke me
explain
Project reference XXL-job Source code , as well as SpingCloud Service registration for , Realize the method of waking up the rest of the cluster nodes when the single node method is called , To achieve decentralized broadcasting effect
scene
The situation a : Like in use caffine
/ hashMap
As the memory cache of the service node , There are drawbacks to this , Because in the cluster , If cache cleanup is required , Cache cleaning is required for each node
Scenario two : Similar to scenario 1 , Each node of the cluster that needs this service executes a certain method
If you need to solve this kind of solution , should MQ
Wait for middleware to realize broadcast operation , So if the middleware hangs , Or what if you don't want to bother to rely on external components ?
that , You can try to use @Suona
, It aims to enable developers to call methods on a single node , Trigger the synchronization of other nodes to call , To simulate the operation of broadcasting , And developers Just use an annotation to mark this method , It can be used immediately after unpacking
Usage mode
You just need to use it like this :
@Service
public class ServiceA {
@Suona
public void sayA() {
// do sth.
}
}
such , When the method of any node in the cluster is called , Other nodes will also call at the same time
Usage environment
TECHNOLOGY | ENV |
---|---|
JDK | 1.8+ |
SpringCloud | discovery |
Be careful
If you use the permission framework or customize web The interceptor needs attention :
because Suona The trunking communication adopts embedded web interfaces , Therefore, it is necessary to web Request release : /suona/call
Stable version
<dependency>
<groupId>cn.cocowwy</groupId>
<artifactId>suona</artifactId>
<version>1.0.0</version>
</dependency>
See the following for snapshot version , Release the latest code
<dependency>
<groupId>cn.cocowwy</groupId>
<artifactId>suona</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<repositories>
<repository>
<id>snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
边栏推荐
- What other hot spots are hidden under 1500W playback? Station B 2 future trends you can't miss
- SWT / anr problem - SWT caused by too long dump time
- Pytorch —— 基础指北_贰 高中生都能看懂的[反向传播和梯度下降]
- Viewing JVM parameters
- Find the length of the common part of two line segments
- 现在开户有优惠吗?另外,手机开户安全么?
- Laravel event & subscription
- (翻译)实时内联验证更容易让用户犯错的原因
- How to learn and read code
- 手机上怎么开户?还有,在线开户安全么?
猜你喜欢
How to add a condition for an associated table in an SQL statement [null value required or not required]
Delete duplicate email
如何在智汀中實現智能鎖與燈、智能窗簾電機場景聯動?
My PMP learning test experience
Short message sending solution in medical his industry
Batch import of Excel data in applet
Int and bit group turn to each other
Calculate special bonus
Image preloading in JS
详解数据治理知识体系
随机推荐
Clickhouse 消除由group by产生的间隙
Live shopping mall source code, realize left-right linkage of commodity classification pages
【2022年】江西省研究生数学建模方案、代码
零基础自学SQL课程 | 窗口函数
SWT / anr problem - anr/je causes SWT
Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]
2022年最新csdn涨薪技术栈-app自动化测试概述
7_ Openresty installation
SWT / anr issues - ams/wms
(translation) reasons why real-time inline verification is easier for users to make mistakes
视觉特效,图片转成漫画功能
Batch import of Excel data in applet
SWT / anr problem - SWT caused by long execution time of native method
halcon数组的一些使用
Video tutorial | Chang'an chain launched a series of video tutorial collections (Introduction)
十大劵商如何开户?还有,在线开户安全么?
Machine learning 9-universal approximator radial basis function neural network, examining PDA and SVM from a new perspective
LabVIEW calculates the camera image sensor resolution and lens focal length
详解数据治理知识体系
Clickhouse eliminates the gap caused by group by